I am working on a code and have all my constraints in ‘for’ loop.
Can I assign and get the dual variable values associated with an equality constraint? I’m trying the method given in the examples but the code always gives an error (Dual variable “lambda” has already been assigned.)
excerpt from the code:
variables pG(5) qG(5)
dual variable lambda
for k=1:5 bus(:,k)'*pG - pD(k) == pf %%% need dual variable value for these set of equations end