-
Notifications
You must be signed in to change notification settings - Fork 42
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
Access to dual value of constraints of the master problem #591
Comments
Hello, The only way to generate constraints during optimization is to use the method As I'm going to be busy the next 2/3 weeks, I don't think I'll have time to implement that and write the tests. Thanks for the report ! |
Hi @guimarqu ! Thank you for the quick response. Here is a tiny example of what I can see #Variables
@variable(model, 0<= x[1:7] <= 1)
@variable(model, y[1:2] >= 0)
@variable(model, u >=0)
#Constraints
xCon = @constraint(model, sum(x[i] for i = 1:7) <= 1)
yCon = @constraint(model, sum(y[i] for i = 1:2) == 1)
initCon1 = @constraint(model, u >= 0.9*y[1] + y[2] - x[1] - x[2] - x[3])
initCon2 = @constraint(model u >= y[1] + y[2] - x[7])
#Objective function
@objective(model, Min, u) Solving
Some additional results in case they can be useful. If we solve newCon = @constraint(model, u >= y[1] + 0.9*y[2] - x[5] - x[6]) then the solution is:
Thanks again for your help! |
Hi, thanks for the MWE, In the tests, you have an example of how you can retrieve the dual value of the cut : The callback Coluna.jl/test/issues_tests.jl Lines 432 to 443 in d79d546
The line to get the dual value Coluna.jl/test/issues_tests.jl Line 450 in d79d546
It will be available in the next release (very soon). |
This is wonderful! Thank you!! |
Hello,
I would like to access the duals associated with the constraints in the master problem for a separate model, and it seems like I can't if they are added as lazy constraints. (I could be completely wrong about this, but I did not see a solution when looking into the topic.)
Would it be possible to iteratively add constraints to the master problem without the use of lazy constraints, perhaps something similar to @constraint() in JuMP?
Thank you so much!
The text was updated successfully, but these errors were encountered: