-
Notifications
You must be signed in to change notification settings - Fork 61
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
Conic subproblem numerical issue #477
Comments
Ah nice! I've been trying to find a test-case for this: jump-dev/Gurobi.jl#415. Can you run it to get the Gurobi log? You can save the file with I assume what happens is that the solution is at the point of the cone where the dual is not defined. What happens if you add |
Your parameterize code is incorrect: SDDP.parameterize(subproblem, support, nominal_probability) do ω
if ω isa Int
# Change generator bounds
for g in fData.genIDList
if g == ω
JuMP.set_normalized_rhs(spUb[ω], 0.0)
JuMP.set_normalized_rhs(sqUb[ω], 0.0)
JuMP.set_normalized_rhs(spLb[ω], 0.0)
JuMP.set_normalized_rhs(sqLb[ω], 0.0)
JuMP.set_normalized_rhs(genRamp_up[ω], 1000*fData.RU[g])
JuMP.set_normalized_rhs(genRamp_down[ω], 1000*fData.RD[g])
end
end
else
# Change line bounds
for l in fData.brList
if ((l[1] == ω[1])&&(l[2] == ω[2]))||((l[1] == ω[2])&&(l[2] == ω[1]))
JuMP.set_normalized_rhs(linDistFlow_ub[l], -1000*fData.rateA[l]);
JuMP.set_normalized_rhs(linDistFlow_lb[l], 1000*fData.rateA[l]);
JuMP.set_normalized_rhs(thermal[l], 0.0);
end
end
end
end It's not sufficient to just change the current values, you need to set the values for all elements that change in any of the scenarios (i.e., we don't set values back to their defaults). |
Thanks! I fixed the rhs part. The Gurobi error disappears when we add a strictly positive constraints to the second order conic constraint, sum(|x_i|) >= 0.00001. I am not sure if I am running it correctly, but after I train the SDDP and saw the error of Gurobi 10005, I tried to do I got this error: But when I only set up the model and run the write_to_file, it gives me this error: I have commited the change to my repo. The added constraints are in Line 128-142. Commenting them out will give the error of Gurobi 10005. |
I thought about this a little bit more. When we generate the cut, sddp.jl uses the dual value obtained from the solver. Is there an option to derive the dual problem, solve the dual, and then directly use the dual variable's value obtained from this dual problem? My past experience is that when we directly derive the dual (I performed this step by hand), at least we can get a dual value and it is usually much more numerically stable than relying on the dual output from the solver. |
Yeah you need to call
The dual is not defined at the point of the cone, because you have a
No. When we encounter issues like this we usually throw away the basis matrix and start a fresh solve. The issue is that Gurobi.jl lies to us and says it has a dual solution when it actually doesn't. |
@haoxiangyang89 how do I reproduce this? I tried running the |
I tried with |
Closing in favor of jump-dev/Gurobi.jl#415. This doesn't seem to be something we can fix in SDDP.jl. |
I am running a conic subproblem for SOCP relaxation of the OPF problem. For the first a few iteration of SDDP, it works fine. However, for the test case I had, at about iteration 25, I saw Gurobi error 10005. The error message is displayed below:
I have turned on the QCPDual option for Gurobi so it can generate conic dual. I am just wondering if this is a general issue or is there any way to improve the stability.
Also I checked the solution output by the simulation results. It seems for the constraints are changed and all scenarios need to follow those constraints. What I would like to achieve is to have scenario specific constraints. According to different contingencies, different sets of constraints are applied.
The test can be found here: https://github.com/haoxiangyang89/disruptionN-1/blob/master/src/convex/ms_sddp.jl. @odow should have access to this repo. Thanks!
The text was updated successfully, but these errors were encountered: