Decision Optimization

Decision Optimization

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

 View Only
  • 1.  Minimization MODEL

    Posted Wed September 06, 2017 08:11 AM

    Originally posted by: TRAN Van Ut


    Dear my friend, 

    I jobs 1, 2,… with processing time p and due (please see the file .dat and in file Z_H.ZIP)Z_H.zipView Details

    Such that all jobs respect of (i.e Cj-dj] <=0 for all j from 1 to n). My code is below:

    =

    Process = 1.;

    p     [Process] = ...

    d     [Process] = ...

    float+ CProcess];

    boolean zProcess[Process];

    int+ h;

    h;

    to

    {

          in Processj in Processk in Process)

                [k]<=z[j+zj[k];    

          in 1.nbJobs-1j in i+1. . )

                C[j]>= C[i]+ p[i]-1000*(1-z[i][j]);

          in 1.nbJobs-1j in i+1. . )

                C[i]>= C[j]+ p[j]-1000*z[i][j];               

          j in Process)

                Cj-dj] <=0;                          

          == sum in 1.nbJobs-1, j in i+1.) z[j];

    }

    In fact, the right result the position of is:  10  9  1  8  7  2  6  5  3  4 and Minh=12

    With this model, I got only   10  9  1  8  7  2  6  5  4  3 and Minh=11. But when I checked by hand that  C3-d3=1, it cannot satisfy this constraint: Cj-dj] <=0;

    Please help me what was wrong in my code

    Thanks in advance for your help

    Best regards,


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Minimization MODEL

    Posted Wed September 06, 2017 12:11 PM

    Hi,

    I do not have access to your .dat but I wonder whether you had a look at CPO

    See example at CPLEX_Studio1271\opl\examples\opl\sched_jobshop

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: Minimization MODEL

    Posted Wed September 06, 2017 02:49 PM

    Originally posted by: TRAN Van Ut


    Thank you for your answer.

    This is the content of .dat file. 

     

    = 10;
    = [1, 1, 1, 44, 57, 26, 94, 52, 35, 65];
    = [125, 250, 375, 376, 376, 376, 376, 376, 376, 376];

     

    Please help me to check my code!

    Thank you for your help!

    Regards,


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: Minimization MODEL

    Posted Wed September 06, 2017 03:07 PM

    forall(j in Process)

                C[j]-d[j] <=-1;   

    instead of

    forall(j in Process)

                C[j]-d[j] <=-0;

    will give 12 for objective

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: Minimization MODEL

    Posted Fri September 08, 2017 04:46 AM

    Originally posted by: TRAN Van Ut


    Thank you very much, AlexFleischer!

    Have a good day!

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer