getting decision varaibles from current solution to update Lagrange multipliers using subgradient method
ユーザーの入力を待っています。Hello,
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
-
正式なコメント
This post is more than two years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support. -
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
投稿コメントは受け付けていません。
コメント
2件のコメント