I want to ask what method is utilized for AMPL piecewise linear approximation technique for objective functions? I used the method that is described in chapter 16 of AMPL book, but unable to see which method or technique is used in the backend?
Since creating piecewise linear approximation makes several general constraints and sos2 constraints.
Please let me know about the method, I will be needing it for referencing in my research, also it would be perfect if you can name the papers where the references have been taken for the implementation of piecewise linear approximation function of AMPL.
Do you mean that you are using the AMPL piecewise-linear function expressions described in Chapter 17 of the AMPL book? There are two ways that AMPL may handle these expressions, depending on the setting of the AMPL option pl_linearize:
Setting optionpl_linearize1 (the default value) tells AMPL to linearize all piecewise-linear expressions; variables and constraints must be added for this purpose, and in nonconvex cases some of the variables must be binary. (Setting optionshow_stats1 will display a summary of the transformation that was made.)
Setting optionpl_linearize0 tells AMPL to treat all piecewise-linear expressions as nonlinear expressions, which are sent directly to the interface for the chosen solver without any linearization.
When using either option, the AMPL-solver interface decides what conversions to make before sending the problem to the solver. These conversions use SOS2 features for some solvers, but not always.
Do you have a particular solver that you have decided to use? Then it may be possible to give you more details about how AMPL’s interface for that solver handles piecewise-linear expressions.
I got your answer, thanks a lot, I think I missed that detail of pl_linearize option. And yes I am using piecewise-linear function expressions as described in chapter 17 of AMPL book.
I am checking and I think I would be needing to insert pl_linearize = 1 option. I would like to request the detail which are working behind so I can explain in my research work, how the piecewise-linear function expressions are working.
I am using gurobi and xpress simultaneously in some problems and gurobi solely for a linear problem.
No, that is just a general mathematical paper about minimizing convex piecewise-linear objectives using a form of the simple method.
There have been some changes in the solver interfaces, so you should check that you are using recent versions of the Gurobi and Xpress solvers. If you are not sure, you can get the versions by executing these AMPL commands:
and if there are references to driver(2024...) and MP(2024...) then you have a version from this year that uses that latest interface. (If you see something different, let us know if you need advice for downloading the current versions.)
I think there’s a misunderstanding, actually I am looking for AMPL research paper reference for piecewisw linear terms. I mean what they are using in the background for decomposing it as piecewise linear approximations, or is it solely depands upon the solver?
OK, with pl_linearize=1, AMPL does construct a linearization, and sends the linearization to the solver. In certain easy, convex cases, the linearization only uses continuous variables. In other cases, additional binary variables are needed. Either way, the linearization is not documented in any paper. You can get an idea of how it works by using the AMPL command solexpand; after the model and data are set up; it will show you the constraints that AMPL is sending to the solver after linearization.
When there are additional binary variables, AMPL also creates suffixes .sosno and .ref for some of the variables. These suffixes are used by some solver interfaces (including those of Gurobi and Xpress) to send the piecewise-linear expressions to the solver using a special representation called “special ordered sets of type 2” (SOS2). The original paper on SOS2 is attached, but details of how today’s solvers handle the SOS2 representation are not documented in any papers known to me.