自己去看@if函数的解释 不要滥用
@if(logical_condition,true_result,false_result)
@if 函数将评价一个逻辑表达式logical_condition,如果为真,返回true_ result,
否则返回false_result.
model:
min=fx+fy;
fx=@if(x #gt# 0, 100,0)+2*x;
fy=@if(y #gt# 0,60,0)+3*y;
x+y>=30;
end
自己去看@if函数的解释 不要滥用
@if(logical_condition,true_result,false_result)
@if 函数将评价一个逻辑表达式logical_condition,如果为真,返回true_ result,
否则返回false_result.
model:
min=fx+fy;
fx=@if(x #gt# 0, 100,0)+2*x;
fy=@if(y #gt# 0,60,0)+3*y;
x+y>=30;
end