Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  decision variables

    Posted 10/05/17 07:34 AM

    Originally posted by: user1234567


    Hello, i have a problem with the decision variables c and s. It only displays the first 4 values of the operations. The other values are 0 !!!

    Please help me.

    I want to use these decision variables later in the constraints. So, i should get correct values of these decision variables. Thank you.


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: decision variables

    Posted 10/05/17 08:22 AM

    Hi,

    in order to debug you could label your constraint:

    forall (i in Jobs, j in Oper, o in Ops,md in Modes: o.id == md.opId && md.opId ==j && md.jobId==i)

    ctc:c[i][j] == endOf (ops[o]);

    and then within the IDE if you click on ctc you will see

     

    regards


    #DecisionOptimization


  • 3.  Re: decision variables

    Posted 10/05/17 12:08 PM

    Originally posted by: user1234567


    yes thank you. But why Cplex does not display the other values of c and s. where is the problem exactly ? And how can i correct it ?

    In the "Journal de script", I get the expected and correct results of start and completion times. So i added c and s as decision variables; and i want them to contain these correct values. 


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: decision variables

    Posted 10/05/17 01:00 PM

    I see

     

     

    Well you get  those values because they are possible.

    If you change

    minimize max(j in Jobs, o in Ops: o.pos==jlast[j]) endOf(ops[o]);

     

    into


    minimize staticLex(max(j in Jobs, o in Ops: o.pos==jlast[j]) endOf(ops[o]),-sum(i in Jobs,j in Oper) s[i][j]);

    and

    dvar int c[i in Jobs][j in Oper] in 0..1000;
    dvar int s[i in Jobs][j in Oper] in 0..1000;

    then you will get for s

    s = [[7 9 11 14]
                 [0 1000 0 1000]
                 [1000 1000 1000 381]];

    regards


    #DecisionOptimization


  • 5.  Re: decision variables

    Posted 10/05/17 01:25 PM

    Originally posted by: user1234567


    Sorry! The problem is not resolved even when i change the code.

    In "Journal de Script", i get this result:

    // solution with objective 15; -247
    Operation 1of job1 on machine 3 starting at 7and ends at9
    Operation 2of job1 on machine 1 starting at 9and ends at11
    Operation 3of job1 on machine 2 starting at 11and ends at14
    Operation 4of job1 on machine 1 starting at 14and ends at15
    Operation 5of job2 on machine 3 starting at 1and ends at3
    Operation 6of job2 on machine 2 starting at 3and ends at5
    Operation 7of job2 on machine 1 starting at 5and ends at6
    Operation 8of job2 on machine 1 starting at 6and ends at9
    Operation 9of job3 on machine 1 starting at 0and ends at5
    Operation 10of job3 on machine 2 starting at 5and ends at10
    Operation 11of job3 on machine 2 starting at 10and ends at11
    Operation 12of job3 on machine 3 starting at 11and ends at13

     

    In the left part of "Navigateur de problèmes", i get this solution of s and c: 

    s = [[7 9 11 14]
                 [0 206 0 0]
                 [0 0 0 0]];

    c = [[9 11 14 15]
                 [0 0 0 0]
                 [0 0 0 0]];

    Where i should get exactly these results (as displayed in journal de script exactly):

    s = [[7 9 11 14]
                 [1 3 5 6]
                 [0 5 10 11]];

    c = [[9 11 14 15]
                 [3 5 6 9]
                 [5 10 11 13]];

    This is what i meant exactly. I don't know how to correct this ! Please help me.

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: decision variables

    Posted 10/05/17 01:30 PM

    Ok you see

     

    but if you click on c you will get

     

    regards

     

     


    #DecisionOptimization