Error:Endogenous relational operations require model type "dnlp"

Problems with modeling
Post Reply
SabriBaran
User
User
Posts: 2
Joined: 3 years ago

Error:Endogenous relational operations require model type "dnlp"

Post by SabriBaran »

Parameter st(t) starting time of curfew on airport t
/11 540
22 540
33 540
44 540
55 540/;

Table arr(i,t) arrival
11 22 33 44 55
101 0 1 0 0 0
102 0 0 1 0 0
103 1 0 0 0 0
104 0 0 0 1 0
105 1 0 0 0 0
106 0 0 0 0 1
107 1 0 0 0 0;

Table dep(i,t) departure
11 22 33 44 55
101 1 0 0 0 0
102 0 1 0 0 0
103 0 0 1 0 0
104 1 0 0 0 0
105 0 0 0 1 0
106 1 0 0 0 0
107 0 0 0 0 1;

Variables
db(i) new estimated time of departure of flight i
r(i) new estimated time of arrival of flight ??
v(i) equal to 1 if flight i violates the curfew requirement
z total cost;

Binary Variables v(i);
Positive Variables db(i),r(i);
Equations
costt objective
c1(i) constraint
c2(i) constraint
c3(i,k) constraint
c4(i,i2,k) constaint
c5(i,t,tt) constraint
c6(i,t,tt) constraint
c7(i) constraint;

c5(i,t,tt)$((dep(i,t)=1 and arr(i,tt)=1))..v(i) =g= ifthen((db(i)>=(st(t)) or (r(i))>=(st(tt))),1,1-M);
c6(i,t,tt)$((dep(i,t)=1 and arr(i,tt)=1))..v(i) =l= ifthen((db(i)<(st(t)) or (r(i))<(st(tt))),1,1-M);


==== I don't understand why I got this error. But I know that these constraints are the cause of the error. I can not think of any other way of expressing this constraint in GAMS. Can you help me?

15. Constraint in the photo;
[img][https://imgur.com/DSrPxPE]
Post Reply