# GAMS Support Wiki

### Site Tools

solver:division_by_a_variable_makes_model_infeasible

# Differences

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

 solver:division_by_a_variable_makes_model_infeasible [2017/09/02 19:40]support — (current) Both sides previous revision Previous revision 2021/01/07 17:19 Atharv Bhosekar removed2017/09/02 19:40 support 2015/09/18 15:11 Jarungjit Parnjai 2009/05/29 13:40 support 2009/05/29 13:39 support 2007/08/31 09:04 external edit Next revision Previous revision 2021/01/07 17:19 Atharv Bhosekar removed2017/09/02 19:40 support 2015/09/18 15:11 Jarungjit Parnjai 2009/05/29 13:40 support 2009/05/29 13:39 support 2007/08/31 09:04 external edit Line 1: Line 1: - ====== Division by a Variable makes model infeasible ====== - Q: //Within a NLP I wrote an equation like this at first:// - <​code>​POWER_DEMAND( I ) =E= SUBSTATION_SUPPLY( I ) + ADDTIONAL_SUPPLY( I )​ - //and got a good solution back. But if I write that equation this way:// - <​code>​POWER_DEMAND( I ) / SUBSTATION_SUPPLY( I )=E= 1 + ADDTIONAL_SUPPLY( I ) / SUBSTATION_SUPPLY( I )​ - with  ''​SUBSTATION_SUPPLY( I ) > 0''​ // I get  an infeasible solution. Why is that the case?// - - Your first equation was '​linear'​ meaning all your Jacobian entires were constant. The second one (although mathematically equivalent) is treated completely different by the NLP solver (which is called by GAMS). Try to stay linear where ever you can. - - I recommend the [[https://​www.gams.com/​latest/​docs/​S_CONOPT.html|GAMS/​CONOPT manual]] for reading since it contains plenty of modeling tips for nonlinear modeling.