Dear all,
As a student on dissertation stage, I am working on a model for cost minimization in train shunting.
As a brief clarification of model; there are arriving train units, departing train units and shunting lines on which are used for coupling and decoupling of train units. Mathematical model was first described by Schrijver.
Could you please help me to figure out this error? Thanks in advance.
Error 171: Domain violation for set
Error 171: Domain violation for set
 Attachments

 MinShuntingCost_MathematicalModel.pdf
 (218.62 KiB) Downloaded 7 times

 MinShuntingCost.gms
 (2.17 KiB) Downloaded 5 times
Re: Error 171: Domain violation for set
If you want to use GAMS at a dissertation level, you need to invest more in learning the tool. Your errors are of very fundamental nature:
1. You need to make some sets subsets of i adn j:
2. The construct ord(j)'1' makes no sense in GAMS. But you pdf does not help much either. The J_i and the I_j seem critical in your description. It's a nice set notation. In GAMS you often do this as maps Ji(j,i). Perhaps this is what you tried with the itoj and jtoi.
If you give a proper reference to Lex paper or provide the pdf of the relevant part of the paper there is a chance that someone here can help. I only found https://homepages.cwi.nl/~lex/files/Pla ... Tracks.pdf but can find little overlap with your pdf.
Michael
1. You need to make some sets subsets of i adn j:
Code: Select all
itoj(i) 'arriving train units to be assigned to departing train units'/i7,i17,i27/
jtoi(j) 'departing train units to be matched with arriving train units'/j2,j12,j22/
If you give a proper reference to Lex paper or provide the pdf of the relevant part of the paper there is a chance that someone here can help. I only found https://homepages.cwi.nl/~lex/files/Pla ... Tracks.pdf but can find little overlap with your pdf.
Michael
Re: Error 171: Domain violation for set
Dear Micheal,
Thanks for your prompt response.
As you mentioned, I have a lot to learn in GAMS. I am quite beginner.
For your first comment, it worked properly, thanks for your help.
And for second one, your understanding about subsets is correct. With ord(j)'1' expression, I am trying to check the previous train unit in subsets in order to avoid any crossing. I provide a little bit clarification about crossing in train shunting as in attached file.
BRs
Gulsum
Thanks for your prompt response.
As you mentioned, I have a lot to learn in GAMS. I am quite beginner.
For your first comment, it worked properly, thanks for your help.
And for second one, your understanding about subsets is correct. With ord(j)'1' expression, I am trying to check the previous train unit in subsets in order to avoid any crossing. I provide a little bit clarification about crossing in train shunting as in attached file.
BRs
Gulsum
 Attachments

 Clarification About Crossing in Train Shunting.pdf
 (249.93 KiB) Downloaded 5 times
Re: Error 171: Domain violation for set
There are big differences in the algebra in your writeup and the GAMS model, e.g. equation 6. I think I understand what the math does, but your equation does not implement the math and you try to make some arguments why the GAMS algebra also prevents crossing (true or not) but it does not implement the math! Your writeup is also missing the definition of some symbols (e.g. \tau_i, I guess this is the time the trains leaves or arrives) and is sloppy with symbol names (e.g. WL as train length in the text, but the algebra has l_i). I suggest that you do a proper mathematical writeup of the problem have a tables with the data in word and then try to implement exactly this math in GAMS. If you run into trouble with that I am sure you will find some help here.
Michael
Michael
Re: Error 171: Domain violation for set
Dear Micheal,
Thanks for your help, I will recheck the mathematical model then focus on GAMS model.
BRs
Gulsum
Thanks for your help, I will recheck the mathematical model then focus on GAMS model.
BRs
Gulsum