Hallo everybody,

I’m a beginner in working with GAMS and after a weak trying out, i’ve

my first

problem which i can’t solve so far. I’m trying to restrict with a $

condition whether a term is included

in an equation. Doesn’t matter which solver i’m using, i’m allways

getting errors.

Maybe someone can help me… thanks for your advices

Sets

i Kosten / Installation, Leitung /

j Nutzer / Gewerbe, Privat / ;

Table d(i,j) distance in thousands of miles

Gewerbe Privat

Installation 1000 2000

Leitung 1000 0 ;

Parameters

Va /10/

Vb /30/

x /3/

y /4/;

Variables

JN

Pzu

Pa

Pb

z total transportation costs in 1000s of dollars

*Binary variable JaNein1, JaNein2;

Equations

cost define objective function

demand Demand;

cost… z =e= d(‘Installation’,‘Gewerbe’)*Pzu

+d(‘Leitung’,‘Gewerbe’)$(Pzu)

+d(‘Installation’,‘Privat’)*Pa*JaNein1+d(‘Installation’,‘Privat’)*Pb*JaNein1;

demand … Pzu+Pa+Pb =e= Va+Vb ;

Model transport /all/ ;

option dnlp=minos;

solve transport using dnlp minimizing z ;

display Pzu.l, Pa.l, Pb.l;

\