Search found 5 matches

by cio86
2 years ago
Forum: Modeling
Topic: Difference Sign on the Model
Replies: 1
Views: 1126

Difference Sign on the Model

Hello everyone;
In the gams model, how can i write the difference on the set (l is element of C\{j}) as attached photo.
20220305_170430.jpg
Is the following code sufficent for that??

sum((i,j,l)$(ord(j) ne ord(l)),alfah*d(j,l)*g(i,j,l))
by cio86
6 years ago
Forum: Modeling
Topic: hub network modelling
Replies: 1
Views: 2728

hub network modelling

Hi I want to set a model for an incomplete hubcovering problem. However, this program give me a complete graph. How can i fix this problem. Model and gams codes attached. an mst algorithm is working in the model. But every time it connects all hub points together. options limrow=1000,limcol=1000,ite...
by cio86
6 years ago
Forum: Modeling
Topic: MIP and conditional constraints
Replies: 4
Views: 4649

Re: MIP and conditional constraints

I fixed error. But the result is infeasible due to the 5th constraint. options limrow=1000,limcol=1000,iterlim=100000000,reslim=36000,optcr=0 ; set i cities /1*25/; set ks1 subset of cities /2,3,17,18,20,25/; set ks2 subset of cities/4,5,6,9,21/; set ks3 subset of cities/12,14,22,23/; alias (i,k); a...
by cio86
6 years ago
Forum: Modeling
Topic: MIP and conditional constraints
Replies: 4
Views: 4649

Re: MIP and conditional constraints

First of all, thank you very much for your answer. However, when i try this method, i take domain violation for set error.
by cio86
6 years ago
Forum: Modeling
Topic: MIP and conditional constraints
Replies: 4
Views: 4649

MIP and conditional constraints

I want to add new contsraints to the following gams code , however i can not integrate these constraints, anyone can help me. I attached constraints. Especially when 𝑘∈{2,3,17,18,20,25}, how can i specify this? options limrow=1000,limcol=1000,iterlim=100000000,reslim=36000,optcr=0 ; set i cities /1*...