我正在尝试最小化具有三个参数的目标函数:i,p,j,如下所示:
param mlu{i in I, p in P, j in out[p]} := traffic[i,p]/capacity[j];
minimize MAXLU{i in I, p in P, j in out[p]}: mlu[i,p,j] * x[i,p,j];
但目标函数必须大于 0,否则会违背我的最小化目的。
我试图通过在目标函数上添加一个约束来确保这一点:
s.t. constraint1{i in I, p in P, j in out[p]} : MAXLU[i,p,j] != 0;
但我收到以下错误:
LP.mod:66: invalid reference to status, primal value, or dual value of objective MAXLU above solve statement
Context: i in I , p in P , j in out [ p ] } : MAXLU [ i , p , j ] !=
glp_mpl_generate: invalid call sequence
Error detected in file glpapi14.c at line 79
Aborted
甚至有可能做到这一点吗?感谢您的任何帮助/建议!