Cplex 是否支持对决策变量使用 ln 或指数函数?

Does Cplex support using of ln or exponential function for a decision variable?

我正在尝试使用 ln 和 exp 函数编写约束,但我收到 Cplex 无法提取表达式的错误。

forall (t in time)
   Gw_C["Mxr"] == 20523 + 17954 * ln(maxl(pbefore[t]));

  Ed_c ["RC"]== 0.0422* exp(0.1046* (maxl(pbefore[t])));
   
   Gw_C["RC"] == 3590* pow((maxl(pbefore[t]), 0.6776);

是否有任何其他可能的方法来对 cplex 上的这些约束进行编码? 谢谢

如果您依赖 CPLEX 中的约束编程,则可以使用 exp 和 log:

using CP;

int scale=1000;

dvar int scalex in 1..10000;
dexpr float x=scalex/scale;

maximize x;

subject to
{
  exp(x)<=100;
}

execute
{
  writeln("x=",x);
}

工作正常并给出:

x=4.605

但是对于 CPLEX 中的数学编程,您不能那样使用 exp。

如果通过 linearization.

你可以做什么