Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Duals of All Constraints #876

Open
ccoffrin opened this issue Aug 13, 2023 · 1 comment
Open

Support for Duals of All Constraints #876

ccoffrin opened this issue Aug 13, 2023 · 1 comment

Comments

@ccoffrin
Copy link
Member

Consider adding support for reporting duals of all constraints as per the discussion in #409.

@jbarberia
Copy link
Contributor

It seems reasonable to replace constraint with lambda or lam in the naming convention for duals. For example:

  • constraint_power_balance duals becomes lambda_power_balance_real and lambda_power_balance_imag.
  • constraint_ohms_y_to duals becomes lambda_ohms_y_to_real and lambda_ohms_y_to_imag.
  • constraint_power_generation_real becomes lambda_power_generation_real

Would adding an snippet like this to each constraint function in constraint_template.jl and in form/*.jl files be sufficient to implement this?

if _IM.report_duals(pm)
    sol(pm, n, :bus, i)[:lambda_power_balance_real] = cstr_p
    sol(pm, n, :bus, i)[:lambda_power_balance_imag] = cstr_q
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants