Opening facilities and transportation of commodities across links

Problems with modeling
Post Reply
hh-student
User
User
Posts: 3
Joined: 2 years ago

Opening facilities and transportation of commodities across links

Post by hh-student »

I am a Student and i have a problem with a model. Please help me.

The model is from this paper:https://link.springer.com/content/pdf/1 ... 0248-1.pdf
Pre-positioning planning for emergency response with service quality constraints
The model is an optimization model in which the objective is to minimize costs over all scenarios resulting from the selection of the pre-positioning locations and facility sizes, the commodity acquisition and the stocking decisions, the shipments of the supplies to the demand points, unmet demand penalties, and holding costs for unused material.

The problem at the moment is that the distance limits are not taken into account and the specified links (a(n,nn)) are not met.

The compiler is not telling any problem, but the solution is 0. Where is the problem in this code?
Sorry that the names in the code are in german. Thats because the lesson is in german.
Last edited by hh-student 2 years ago, edited 2 times in total.
User avatar
AndreSchnabel
User
User
Posts: 5
Joined: 3 years ago

Re: Opening facilities and transportation of commodities across links

Post by AndreSchnabel »

Hey hh-student,

your model does not contain any restriction preventing setting pretty much all variables to zero (e.g. all y 's are zero thus no place is actually setup) and hence obtaining zero costs as optimal objective value. Quickly skimming over the model I was curious if maybe your equation "E" (Anzahl Einrichtungen pro Knoten = 1) should be an equation of type equality (=e=) and not a less equal (=l=). Changing the equation type there increases the cost of the optimal solution to 176400. In any case you need to define some constraint that pushes the variables upwards in a matter that increases the costs of the optimal solution above 0 monetary units.

Kind regards,

André
hh-student
User
User
Posts: 3
Joined: 2 years ago

Re: Opening facilities and transportation of commodities across links

Post by hh-student »

Hello André,

thank's really a lot for your tips. The name of the equation "E" (Anzahl Einrichtungen pro Knoten = 1) was wrong. It should be (Anzahl Einrichtungen pro Knoten <= 1), so that there is either 1 or 0 facilities opened at that node. Sorry for the mistake.

Normally the model should be like that all the demand (v) in the chosen scenarios should be satisfied. So the solution 0 can not be right.

Now i just have simplified the model like in the paper. But the links a(i,j) between the nodes are still not taken into account, so that the programm takes links to anywhere.

Do you know how i can fix this problem, with limiting the x with a?
Maybe with $ condition, but where it must be added?

Kind regards,

hh-student
Last edited by hh-student 2 years ago, edited 1 time in total.
User avatar
AndreSchnabel
User
User
Posts: 5
Joined: 3 years ago

Re: Opening facilities and transportation of commodities across links

Post by AndreSchnabel »

Hey hh-student,

you could set the upper bound for the transported amount x from i to j to zero for all scenarios s and goods k, if and only if there is no link a(i,j) between those two locations. The GAMS code for this is as follows:

Code: Select all

x.up(s,i,j,k)$(not a(i,j)) = 0;
Kind regards,

André
hh-student
User
User
Posts: 3
Joined: 2 years ago

Re: Opening facilities and transportation of commodities across links

Post by hh-student »

Hello André,

thank you very much. The model is working fine now :D


Kind regards,
hh-student
Post Reply