Hi AllI am trying to linearize x*[min(a, S+d)-max(b,S)] where a, b, an d are parameters, S is continuous variable, x is binary variable.Thanks--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To post to this group, send email to am...@googlegroups.com.
Visit this group at http://groups.google.com/group/ampl?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
I would suggest thinking of the subexpression
min(a,S+d) - max(b,S)
as a single (concave) piecewise-linear function of S, which you can represent using AMPL's piecewise-linear expression notation (chapter 17 in the AMPL book, www.ampl.com/BOOK/download.html). Then your entire expression is Z where
x = 0 ==> Z = 0 else Z = Y
Y = <piecewise-linear expression>
You can use the ==> ("implies") operator with CPLEX, but in general you can replace it with a couple of linear mixed-integer constraints.
Bob Fourer
From: am...@googlegroups.com [mailto:am...@googlegroups.com]
On Behalf Of hesam eivazy
Sent: Monday, January 28, 2013 6:33 PM
To: am...@googlegroups.com
Subject: [AMPL 6528] any hint to linearize max and min