special sets and parameters

Problems with modeling
Post Reply
abb.omidi
User
User
Posts: 22
Joined: 2 years ago

special sets and parameters

Post by abb.omidi » 1 year ago

hello
i have a flexible job shop model with below form:
i index of machines /1*2/
j index of jobs /1*3/
k index of operations /1*5/
p index of positions /1*7/
l(j,k) /1.(1*5), 2.(1*3)/ * that is, operation k for job j
f(i,p) /1.(1*5), 2.(1*3)/ * that is, position p in machine i

model have 3 dimensional parameters that is:
t(j,l,i) * that is, time of operation l in machine i
1 2
1.1 5 0
1.2 0 3
.
.
.
2.3 5 0

and ...

when run model, i have an error as below:
l in t(j,l,i) is an one dimensional set

pls. let me know, how can i define this sets & related parameters?

best regards

User avatar
Renger
Posts: 397
Joined: 3 years ago

Re: special sets and parameters

Post by Renger » 1 year ago

Hi

You could just define your parameter t over j,k,i.

Code: Select all

sets
i index of machines /1*2/
j index of jobs /1*3/
k index of operations /1*5/
p index of positions /1*7/
l(j,k) /1.(1*5), 2.(1*3)/ 
f(i,p) /1.(1*5), 2.(1*3)/ 
;

parameter t(j,k,i);

t(l,i) = uniform(0,1);

display t;

If you have an equation which is defined over l and i, you could do the following

Code: Select all

equation
    myequation(j,k,i);


myequation(l,i)..
    t(l,i) =G= 0;

equations
    myequation(j,k,i);

Hope this helps

Renger
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist

Post Reply