getting decision varaibles from current solution to update Lagrange multipliers using subgradient method
Awaiting user inputHello,
I have applied correctly the Lagrange algorithm on a toy example given by (Fisher 1985), and solved it by Gurobipy, however, when I tried to apply it to a bigger problem,I did not get any improvement in terms of solution.
The lagrange multipliers took three dimensions. Let's call it λ[h,t,p].
I have relaxed the following constraint given that the problem is a minimization problem:
Then I have written it in the objective function as follows:
I have written lamda(k+1) as follows:
I tried to retrieve the solution of the following from Gurobipy as follows:
where:
and pi_m=2 , step size.
ItThe following error appears, I think I am calling the solution from Gurobi in the wrong way
0
-
Hi,
Could you please try to simplify the computation of \(\texttt{b_Ax}\) to try to localize the source of the error.
First try
b_Ax = (demand[h,t,p] for h in ... for p in ... for t in ...)
If this works then proceed with
b_Ax = (demand[h,t,p] - sum(...) for h in ... for p in ... for t in ...)
and so on until you find the exact source of error.
My guess is that you cannot multiply the object generated by \(\texttt{sum}\) with \(\texttt{1-p_b[t]}\), but you can avoid it by writing
b_Ax = (demand[h,t,p] - sum(...) + sum(QW_wh_[w,h,t,p].x * p_b[p] ...) ...)
0
Please sign in to leave a comment.
Comments
1 comment