Forum Discussion
FICO
5 years agoCommunity Manager
How to debug E-108: Logical expression expected here for If statement.
I am trying to minimize the absolute difference between some value dependent on "g" and some constant. I have attached some partial code that I would like to fix. The thing is that I just don't under...
FICO
5 years agoCommunity Manager
I would suggest that you simply use the 'abs' constraint relation to state lines 7-13 of your first code snippet:
forall(g in Groups) points_diff(g):=abs(Points_Total(g) - mean_points)or if you declare 'points_diff' as mpvar:
forall(g in Groups) points_diff(g)=abs(Points_Total(g) - mean_points)Note that you need to work with the 'mmxnlp' module in place of 'mmxprs', but the resulting model will still be handled by the MIP solver.
For further discussion of formulation alternatives for absolute value constraints please refer to the 'MIP formulations' whitepaper: https://www.fico.com/fico-xpress-optimization/docs/latest/mipform/dhtml/chap2s1_sec_ssecabsval.html
Related Content
Related Content
Combining sum and overall statement
Hi, I am trying to build a perishable supply chain model. To include perishability, I want to include a constraint in which for every period in time (T is the set of periods, indexed by t) the model...5 years agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum2 unread comments2 unread12Views0likes2Comments