# GAMS Support Wiki

### Site Tools

gams:formulate_logical_expressions_in_equations

# Differences

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

 gams:formulate_logical_expressions_in_equations [2009/03/05 17:18]support gams:formulate_logical_expressions_in_equations [2013/08/05 10:00] (current)support Both sides previous revision Previous revision 2013/08/05 10:00 support 2009/03/05 17:18 support 2008/09/25 17:00 support 2008/09/23 12:18 support 2008/09/23 12:17 support 2008/09/23 12:16 support 2008/09/23 12:14 support 2008/09/23 12:13 support 2008/09/23 12:11 support created 2013/08/05 10:00 support 2009/03/05 17:18 support 2008/09/25 17:00 support 2008/09/23 12:18 support 2008/09/23 12:17 support 2008/09/23 12:16 support 2008/09/23 12:14 support 2008/09/23 12:13 support 2008/09/23 12:11 support created Line 9: Line 9: ''​a > b - bigM * (1-i)''​ ''​a > b - bigM * (1-i)''​ - Try to evaluate: If ''​i=1''​ then the first constraint will not be effective if ''​bigM''​ is big enough while the second equation will read ''​a>​b''​. If ''​i=0'',​ the first constraint ensures ''​a<​=b''​ while the second will + Try to evaluate: If ''​i=1''​ then the first constraint will not be effective if ''​bigM''​ is big enough while the second equation will read ''​a>​b''​. If ''​i=0'',​ the first constraint ensures ''​a%%<=%%b''​ while the second will never be active if ''​bigM''​ is big enough. The second constraint has some issues since we can't have strict "​greater than" constraints in a mathematical programs. So you either don't care what happens to i at never be active if ''​bigM''​ is big enough. The second constraint has some issues since we can't have strict "​greater than" constraints in a mathematical programs. So you either don't care what happens to i at the point ''​a=b''​ or you rewrite the constraint as ''​a > b + 1e-6 - bigM*(1-i)''​ or some other small number. ''​bigM''​ can be usually calculated from the data of the problem, don't make it just "​big",​ since the solvers won't the point ''​a=b''​ or you rewrite the constraint as ''​a > b + 1e-6 - bigM*(1-i)''​ or some other small number. ''​bigM''​ can be usually calculated from the data of the problem, don't make it just "​big",​ since the solvers won't
gams/formulate_logical_expressions_in_equations.txt ยท Last modified: 2013/08/05 10:00 by support