Lagrangian multiplier for constraints
Moderator: aileen
Forum rules
Please ask questions in the other sub-forums
Please ask questions in the other sub-forums
Lagrangian multiplier for constraints
Is it possible to get the Lagrangian multiplier for the constraints from my solution?
Re: Lagrangian multiplier for constraints
The Lagrange multipliers, also known as marginals, can be accessed after a solve as follows.
Say the constraint of interest is called CON(j,k) and you want to set lamda(j,k) to the value of its marginal after the solve. Then anywhere after the solve statement, just write:
Say the constraint of interest is called CON(j,k) and you want to set lamda(j,k) to the value of its marginal after the solve. Then anywhere after the solve statement, just write:
Code: Select all
lamda(j,k) = CON.M(j,k);