Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Parallel Machine Scheduling from Job Shop Problem

    Posted 09/14/20 06:38 PM

    Good morning, I have a Job Shop Problem but I want to add to the first machine (which makes the 1st operation) another machine in parallel. So if one job arrives to the machine one and it is full, the job can enter in the second machine one to perform the first operation.

    Well I have the following code in cp programming for a normal job shop problem, and I want to know what I have to add in order to get that second machine nº1 in parallel

    /********************************************* * OPL 12.6.0.0 Model * Author: santi * Creation Date: 01/09/2020 at 09:50:54 *********************************************/ using CP; //Number jobs (n) int n=...; //Número operations max (op_max) int op_max=...; //Number of machines int m=...; //Jobs range J=1..n; //Max operations range OP=1..op_max; //Machines range M=1..m; tuple operac_id { int maq; int durac; } //Operation matrix for jobs operac_id O[J][OP]=...; //Number of operations in each job int limite[J]=...; //VARIABLES DE DECISIÓN //Operations intervals matrix dvar interval interv[j in J][op in OP] size O[j][op].durac; dvar sequence maq_secuenc[m in M] in all(j in J, op in OP : O[j,op].maq==m) interv[j][op]; //Expresiones dexpr int makespan_tot=max(j in J) endOf(interv[j][limite[j]]); //FUNCIÓN OBJETIVO minimize makespan_tot; //RESTRICCIONES subject to{ //Restriction 1: forall (j in J) forall (op in OP : op<limite[j]) endBeforeStart(interv[j][op], interv[j][op+1]); //Restriction 2: One operation in each machine forall (m in M) noOverlap(maq_secuenc[m]); }

    ********************************************* * OPL 12.6.0.0 Data * Author: santi * Creation Date: 01/09/2020 at 09:50:54 *********************************************/ //Número de trabajos/productos (n) n=6; //Número de operaciones máx de los trabajos (op_max) op_max=6; //Número de máquinas (m) m=6; //Operation matrix O = [ [<1,1>,<2,1>,<3,1>], [<1,1>,,], [<2,2>,<3,1>,], ]; limite=[3,1,2];




    #DecisionOptimization
    #Support
    #SupportMigration


  • 2.  RE: Parallel Machine Scheduling from Job Shop Problem

    Posted 09/16/20 04:16 PM

    Dear santi,

    When I use your model with opl 12.9.0 I get some errors:

    *** ERROR[GENERATE_102]: Index out of bound for array "interv(4)": 0.

    *** ERROR[GENERATE_103] at 44:36-63 model.mod: OPL cannot extract expression: endOf(interv[j][limite[j]]).

    *** ERROR[GENERATE_103]: OPL cannot extract expression: max(j in 1..6) endOf(interv[j][limite[j]]).

    *** ERROR[GENERATE_103]: CP cannot extract expression: max(j in 1..6) endOf(interv[j][limite[j]]).

    *** ERROR[GENERATE_103]: CP cannot extract expression: makespan_tot.

    *** ERROR[GENERATE_103]: CP cannot extract expression: makespan_tot.

    *** ERROR[GENERATE_103] at 47:1-22 model.mod: CP cannot extract expression: minimize makespan_tot.

    *** ERROR[GENERATE_103]: CP cannot extract expression: model model {

    minimize makespan_tot;

    forall(j in 1..6) (forall(op in 1..6: op < limite[j]) endBeforeStart(interv[j][op], interv[j][op+1], 0)

    );

    forall(m in 1..6) nooverlap(maq_secuenc[m]);

    }

    which is I think a consequence of the incompletely specified matrix O. 'interv' construction will hit unspecified array elements as it scans all matrix the indices. It seems that the latest version of opl detects this kind of problem and you would benefit by switching to it (12.6.0 is pretty old now).

    Also, instead of adding a machine, it is better to use a cumul expression constrained to a capacity (>1) (cf. the sched_rcpsp example of the distribution).

    I hope this helps.

    Renaud






    #DecisionOptimization
    #Support
    #SupportMigration