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

About dual multipliers of a constraint #175

Closed
sarpon opened this issue Jan 26, 2019 · 2 comments
Closed

About dual multipliers of a constraint #175

sarpon opened this issue Jan 26, 2019 · 2 comments

Comments

@sarpon
Copy link

sarpon commented Jan 26, 2019

Hi Oscar:

I have been trying to get the dual multipliers of several constraints in the first stage problem.

I have tried to store the the cuts (using the cut_output_file flag in the solving procedure), then create the first stage model using SDDP, load the cuts, then select the first stage problem, then write it to an .lp file using JuMP.writeLP. Then I have to load the saved problem (first stage + cuts) problem and solve it using CVX.

I have been reading

#125

and

af0a4a6

But I can't figure it out a simpler way to get the dual multipliers. Is there any simpler way?

Kind Regards

@odow
Copy link
Owner

odow commented Jan 27, 2019

Do you have a small example of the problem?

Basically, add a named constraint like

@constraint(sp, demand_eq, g[1] + g[2] + u == 150)

Then add the name as a symbol (e.g. :demand_eq) when simulating

result = simulate(m, [:g, :u, :s, :demand_eq], noises=[1,1,1])

And the result will be the dual multipliers

@test result[:demand_eq] == [541.0, 190.0, 100.0]

@sarpon
Copy link
Author

sarpon commented Feb 16, 2019

Sorry for the late answer. It was totally solved by your answer Oscar.
Thank you very much.

Kind Regards

@odow odow mentioned this issue Mar 13, 2019
@odow odow closed this as completed in #180 Mar 20, 2019
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