Using the logarithm function with AMPL-XPRESS

I use XPRESS through AMPL. I consider the equation

1 - prod{i in I} S[i] >= 0.95

where variables S[i] are positive real variables. I translate this constraint as:

sum{i in I} log(S[i]) <= log(1-0.95);

Is the piecewise linear approximation performed by AMPL or XPRESS? If it’s done by AMPL, where can I find details on how it’s done?

Thanks in advance


the documentation is here: Expressions supported — AMPL MP Documentation. To refine the PL approximation, set cvt:plapprox:reltol=1e-3 or even smaller.

See the option descriptions here: FICO XPRESS — AMPL Resources.

We are working on truly nonlinear interface for Xpress Global and Local solvers, which should be ready in a few days. But for smaller instances, PL approximation should solve fast enough.

Thank you for your answer.
I can’t quite understand how the log function is handled, by ampl or by the solver. From what I understand, it’s different for XPRESS and Gurobi. In fact, I get very different behavior when using XPRESS or Gurobi from ampl.
What about cplex?
If we consider log(E), what conditions must the expression E satisfy? It seems to me that we can consider, for example, log(log(x)) by posing y=log(x) and considering log(y).
In addition, when I used XPRESS, I observed that the constraint was verified with cvt:plapprox:reltol=0.0001 but not with a higher precision cvt:plapprox:reltol=0.00001.

AMPL does not change the log() expressions and sends them to AMPL Xpress or Gurobi. AMPL Xpress solver PL-approximates the function, same for CPLEX. AMPl Gurobi uses GRBaddgenconstrLog(), i.e., it uses Gurobi’s native handling of log(), which currently performs Gurobi’s internal PL approximation, but can be changed to spatial branching by setting global=1, see Expressions supported — AMPL MP Documentation.

You can write log(log(x)) but make sure to set tight bounds on x, otherwise having y=log(x) and tight bounds on y may be helpful. To help you more, I need the examples.