gams:get_the_lagrangian_multiplier_for_the_constraints

This shows you the differences between two versions of the page.

gams:get_the_lagrangian_multiplier_for_the_constraints [2007/08/10 11:10] 127.0.0.1 external edit |
gams:get_the_lagrangian_multiplier_for_the_constraints [2020/05/25 18:16] (current) Lutz Westermann add link to docu |
||
---|---|---|---|

Line 4: | Line 4: | ||

- | The Lagrange multipliers, also known as marginals, can be accessed after a solve as follows. \\ | + | The Lagrange multipliers, also known as [[https://www.gams.com/latest/docs/UG_Equations.html#UG_Equations_Attributes|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: | ||

lamda(j,k) = CON.M(j,k) ; | lamda(j,k) = CON.M(j,k) ; |

IMPRESSUM / LEGAL NOTICE
PRIVACY POLICY
gams/get_the_lagrangian_multiplier_for_the_constraints.txt ยท Last modified: 2020/05/25 18:16 by Lutz Westermann