Decision Optimization

Decision Optimization

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

 View Only
  • 1.  Job Scheduling Question

    Posted Tue May 01, 2018 12:15 PM

    Originally posted by: archwizard


    Greetings, I am a new user to IBM's CPLEX and would like to ask for some help on several things.

    To give you an overview of what I am about to show you, I have this Job Scheduling paper I am trying to reproduce for practicing purposes. Shown below are the parameters, minimization function, and constraints.

     

    Shown below is my attempt (also is attached) at trying to model this into IBM CPLEX. 

    I know it might be wrong, but it is my novice experience attempt after all.

    I do not want direct answers nor do I want the easy way on modeling this, I would just like tips on what I can do to improve my programming on CPLEX and resources I may go through to improve myself.

    Thank you for your time and any feedback is appreciated 

     

    int J = ...; // the set of jobs
    int L = ...; // the set of links
    int W = ...; // the set of wavelengths
     
    range r = 1..J; // RST of Job j
    range d = 1..J; // Duration of Job j
    int h; // a large number
    dvar boolean a; // alternate links a and b for path p
    dvar boolean b;
     
    //obj function 
    minimize sum(j in J) (S[j] - r[j])/abs(J)
     
    // constraints
    subject to {
    forall(j in J) //Eq (2)
      eqation2:
      S[j] >= r[j];
      
    forall(j in J , k in J , j!=k , l in L , w in W) //Eq (3)
      eqation3:
      sum(p in Paths) ((d[j]*b[l][p]*X[j][p][w] + h*b[l][p]*X[k][p][w])
        +(S[j] - S[k] + h*Y[j][k])) <= 3*h;
        
    forall(j in J , k in J , j!=k) //eq (4)
      eqation4:
      Y[j][k] + Y[k][j] = 1;
      
    forall(j in J)
      eq5:
      sum(p in Paths , w in W) (X[j][p][w]*a[j][p] = 1);
        
    forall(j in J, p in Paths, w in W)
      eq6:
      X[j][p][w] is 1 or 0;
      
    forall(j in J, k in J, j!=k)
      eq7:
      Y[j][k] is 1 or 0;
      
    forall(j in J)
      eq8:
      r[j] >= 0;
      
    forall(j in J)
      eq9:
      S[j] >= 0;  
     }   

    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Job Scheduling Question

    Posted Wed May 02, 2018 04:32 AM

    The first thing that comes to my mind is that you would probably be much better off using CP Optimizer. It is a constraint programming engine that is specifically well suited to solving scheduling problems such as this one, that's included in CPLEX Optimization Studio. You can start reading about its API at https://www.ibm.com/support/knowledgecenter/SSSA5P_12.8.0/ilog.odms.cpo.help/CP_Optimizer/User_manual/topics/intro_sched.html.

    CP Optimizer has a dedicated forum at https://www.ibm.com/developerworks/community/forums/html/forum?id=11111111-0000-0000-0000-000000002067.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Job Scheduling Question

    Posted Wed May 02, 2018 08:56 AM

    Originally posted by: archwizard


    Thank you for your kind reply, Xavier. I will look into it. I was hoping to get information however on how to do this problem from scratch.


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Job Scheduling Question

    Posted Thu May 03, 2018 10:12 AM

    Originally posted by: archwizard


     


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Job Scheduling Question

    Posted Tue May 08, 2018 11:35 AM

    Originally posted by: archwizard


     


    #CPLEXOptimizers
    #DecisionOptimization