# GAMS Support Wiki

### Site Tools

gams:model_piecewise_linear_functions

# Differences

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

 gams:model_piecewise_linear_functions [2007/10/20 07:52]Franz Nelissen gams:model_piecewise_linear_functions [2009/10/27 13:59] (current)support Both sides previous revision Previous revision 2009/10/27 13:59 support 2007/10/20 07:52 Franz Nelissen 2007/08/10 11:03 external edit 2009/10/27 13:59 support 2007/10/20 07:52 Franz Nelissen 2007/08/10 11:03 external edit Line 10: Line 10: CONOPT like smooth continuous-differentiable functions). ​ CONOPT like smooth continuous-differentiable functions). ​ - In fact the piecewise linear function you describe can be modeled with some MIP solvers using socalled SOS 2 variables, or with general binary variables. Check textbooks like Nemhauser and Wolsey, Integer and Combinatorial Optimization (page 10) and H.P. Williams, Model Building in Mathematical Programming (section 7.3,9.3) for more information. ​ + In fact the piecewise linear function you describe can be modeled with some MIP solvers using socalled SOS 2 variables, or with general binary variables. Check textbooks like Nemhauser and Wolsey, Integer and Combinatorial Optimization (page 10) and H.P. Williams, Model Building in Mathematical Programming (section 7.3,9.3) for more information. Some examples are collected [[gams:​linearize_a_non-linear_function ​   |here]]. Sometimes the following trick can be used: if you are minimizing Q one can introduce the inequalities: ​ q >= aP+b q >= cP+d q >= eP+f  because of the form of the P-Q curve. [here a picture approximately Sometimes the following trick can be used: if you are minimizing Q one can introduce the inequalities: ​ q >= aP+b q >= cP+d q >= eP+f  because of the form of the P-Q curve. [here a picture approximately 