ken kavaza
ken kavaza

Reputation: 3

Check For all index , in GAMS

Let 'I' from 1 till 100 , be a set , and w(I), u(I) be a parameters , how can code this statement in GAMS :

if for all I we have w(I)<0 and w(I)*u(I) =0 then display ' converged'.

Upvotes: 0

Views: 82

Answers (1)

Lutz
Lutz

Reputation: 2292

Display$(smax(I,w(I))<0 and smax(I,w(I)*u(I))=0 and smin(I,w(I)*u(I))=0) 'Converged';

Upvotes: 1

Related Questions