在 GAMS 中检查所有索引
Check For all index , in GAMS
让 'I' 从 1 到 100 是一个集合,w(I), u(I) 是一个参数,如何在 GAMS 中编写这个语句:
如果对于所有 I,我们有 w(I)<0 且 w(I)*u(I) =0,则显示“收敛”。
Display$(smax(I,w(I))<0 and smax(I,w(I)*u(I))=0 and smin(I,w(I)*u(I))=0) 'Converged';
让 'I' 从 1 到 100 是一个集合,w(I), u(I) 是一个参数,如何在 GAMS 中编写这个语句:
如果对于所有 I,我们有 w(I)<0 且 w(I)*u(I) =0,则显示“收敛”。
Display$(smax(I,w(I))<0 and smax(I,w(I)*u(I))=0 and smin(I,w(I)*u(I))=0) 'Converged';