Hi,

I am trying to model a jobshop scheduling probleman indexed equation which runs over set i /1*4/. there are three kinds of jobs, named A, B and C, and four machines, called m1,m2, m3, m4, m5; the processing recipe for A is: m1-->m2--->m3-->m4, the processing recipe for B is: m1-->m2--->m4, the processing recipe for A is: m1-->m3-->m4, there are KA jobs of type A, KB jobs of type B, and KC jobs of type C. Then, the end time of each job on each machine is equal to the end time of the job on the previous machine plus its the processing time, that is

E(i, m)=E(i,m-1)+P(i,m) // E(i,m) is the end time of job i on machine m, and m-1               
                        //represent the machine on which job i is processed just before 
                        //machine m, P(i,m) is the processing time of job i on machine m

How can I formulate this equation in GAMS? Do i have to define a set and an equation for each job like the following example ?

for example, if i have five jobs,

Sets    
     jobs  /job1*job5/ //job1 and job2 are of type A, job3 is of type B, 
                       //job4 and job5 are of type C 
Sets   
     machines /m1*m4/   /* all available machines */
Sets
     recipejob1 /Set.machines/
     recipejob2 /Set.machines/
     recipejob3 /m1, m2, m4/ 
     recipejob4 /m1, m3, m4/
     recipejob5 /m1, m3, m4/;

Parameters  
      p(jobs, machines) "the processing time of each job on each machine";

Variables  
      E(jobs, machines)  "the end time of each job on each machine";

equations  tempt("job1", recipejob1);

temp("job1", recipejob1)..
      E("job1", recipejob1+1) =E= E("job1", recipejob1) + P("job1", recipejob1);  
temp("job2", recipejob2)..
      E("job2", recipejob2+1) =E= E("job2", recipejob2) + P("job2", recipejob2); 
 ... ....
 ... ....//define a equation for each job

I think there maybe more concise and effective method, Do you have any idea about this problem?

Thank you in advance

asked 19 May '14, 07:37

johnvon's gravatar image

johnvon
11
accept rate: 0%

edited 19 May '14, 07:42

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×51
×4
×3

Asked: 19 May '14, 07:37

Seen: 535 times

Last updated: 19 May '14, 07:42

OR-Exchange! Your site for questions, answers, and announcements about operations research.