Topic
  • 2 replies
  • Latest Post - ‏2012-09-02T02:54:04Z by SystemAdmin
SystemAdmin
SystemAdmin
378 Posts

Pinned topic Shortest Processing Time Heuristic - PLEASE HELP!

‏2009-11-13T08:51:20Z |

[patjanssen said:]

Hi,

I am using OPL 3.7 to try to solve a job shop scheduling problem. There are 8 tasks per job. The number of jobs and resources used are given by an input file in excel. I have been able to code the problem using Constraint programming and minimizing the makespan. But I also have to be able to solve it using the shortest processing time heuristic. Would I be able to use the same code but have the shortest processing time heuristic implemented using a search and rank function? I have attached the code for the constraint program. Please help!

SheetConnection sheetData("C:\Documents and Settings\admin\Desktop\Template.xls");

{string} Jobs from SheetRead(sheetData,"Shoes");
{int} Machines from SheetRead(sheetData, "Machines");
int nbActivities = ...;
range Activities 1..nbActivities;

int+ resource[Jobs,Activities] from SheetRead(sheetData, "Assignment");
float+ duration[Jobs,Activities] from SheetRead(sheetData, "Duration");
int totalDuration = sum(j in Jobs, a in Activities) duration[j,a];

scheduleHorizon = totalDuration;
Activity activity[j in Jobs, t in Activities](duration[j,t]);
Activity makespan(0);

UnaryResource tool[Machines];

minimize
  makespan.end
subject to {
  forall(j in Jobs)
      activity[j,nbActivities] precedes makespan;

  forall(j in Jobs)
      forall(t in 1..nbActivities-1)
        activity[j,t] precedes activity[j,t+1];

  forall(j in Jobs)
      forall(t in Activities)
          activity[j,t] requires tool[resource[j,t]];
};
Updated on 2012-09-02T02:54:04Z at 2012-09-02T02:54:04Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    378 Posts

    Re: Shortest Processing Time Heuristic - PLEASE HELP!

    ‏2009-11-14T01:59:05Z  

    [jfk said:]

    hello,
    my wild guess is that you can do it 3.7 since it had some custom search facility like "search" and searchstrategy" - if you look for these keywords you should find them in the doc.
    btw 3.7 is 1000years old, why don't you use 6.3 has constraint programming and has the latest constraint programming enigne (CPO)?

    cheers
  • SystemAdmin
    SystemAdmin
    378 Posts

    Re: Shortest Processing Time Heuristic - PLEASE HELP!

    ‏2012-09-02T02:54:04Z  
    Please, send me the excel file "Template".
    Have you resolved the problems?
    Thank you

    Gio