| |||||||||||

Non-linear constraints Description Defining non-linear constraints over discrete and continuous variables. Further explanation of this example:
'Xpress Kalis Mosel User Guide', Section 2.4 Continuous variables
Source Files By clicking on a file name, a preview is opened at the bottom of this page.
nonlinctr.mos (!**************************************************************** CP example problems =================== file nonlinctr.mos `````````````````` Nonlinear constraints over discrete and continuous variables. (c) 2008 Artelys S.A. and Fair Isaac Corporation Creation: 2005, rev. Mar. 2013 *****************************************************************!) model "Nonlinear constraints" uses "kalis" setparam("KALIS_DEFAULT_LB", 0) setparam("KALIS_DEFAULT_UB", 5) setparam("KALIS_DEFAULT_CONTINUOUS_LB", -10) setparam("KALIS_DEFAULT_CONTINUOUS_UB", 10) declarations a,b,c: cpvar x,y,z: cpfloatvar end-declarations x = ln(y) y = abs(z) x*y <= z^2 z = -a/b a*b*c^3 >= 150 while (cp_find_next_sol) writeln("a:", getsol(a), ", b:", getsol(b), ", c:", getsol(c), ", x:", getsol(x), ", y:", getsol(y), ", z:", getsol(z)) end-model | |||||||||||

© Copyright 2023 Fair Isaac Corporation. |