Decision Optimization

Decision Optimization

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

 View Only
  • 1.  Integer linear programming to OPL

    Posted 04/01/17 06:38 PM

    Originally posted by: TRAN Van Ut


    Hello, 
    I have the MILP, file mod, file dat in file ZIP. I try to code by many cases but I only obtain 50347.  
    
    I can not have the really optimal value 50346. Please show me what is the error in my code.
    

    Thanks in advance for your help!CPLEX.zipView Details

    
    int nbJobs = ...;
    range Process = 1..nbJobs;
    int p     [Process] = ...;
    int d     [Process] = ...;
    int w     [Process] = ...;
    dvar boolean x[Process][Process];
    dvar int+ h;
    minimize h;
    subject to
    {        
        forall(k in Process)
          sum(j in Process)x[j][k] == 1;                           
        forall(j in Process)
          sum(k in Process)x[j][k] == 1;                          
        forall (k in Process)
          sum(l in 1..k)sum(j in Process) (p[j]*x[j][l])- sum(j in Process)(d[j]*x[j][k])<= 0;
         sum(j in Process)(w[j]*(sum(k in Process)k*x[j][k]))== h;
    }
    

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Integer linear programming to OPL

    Posted 04/03/17 02:51 AM

    Hi,

    can you change your epgap ?

    I would try

    execute

    {

    cplex.epgap=1e-6;

    }

    regards

     

    relative MIP gap tolerance

    Sets a relative tolerance on the gap between the best integer objective and the objective of the best node remaining.

     

     

     

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: Integer linear programming to OPL

    Posted 04/14/17 07:46 AM

    Originally posted by: TRAN Van Ut


    Thank you very much,

    With the time limited and the old model, all are very good.

    However, with below model, I don't understand why the solving start at a very big value (For example, with n = 20, all the case start at Best Integer  36100; or with n = 100,  start at Best Integer  2.13266e+007 ). In fact the acceptable objective value can not be bigger than n(n-1)/2.(n is  "nbJobs" in the code).

    But with n=60, it starts with Best Integer 1157

    So, in 600s, most of results with n>60 have the unacceptable values (i.e they are bigger too much then n(n-1)/2)   

     

    range Process = 1..nbJobs;

    int p     [Process] = ...;
    int d     [Process] = ...;
    dvar int+ nn[Process][Process];
    dvar boolean x[Process][Process];
    dvar int+ h;
    minimize h;
    subject to
    {
        forall(k in Process)
          sum(j in Process) x[j][k] == 1;
        forall(j in Process)
          sum(k in Process) x[j][k] == 1;
        forall(j in 1..(nbJobs-1),k in 1..(nbJobs-1))
            nn[j][k] >= sum(jp in (j + 1)..nbJobs,kp in (k + 1)..nbJobs)x[jp][kp] - nbJobs* (1 - x[j][k]);
        h == sum(j in Process, k in Process) nn[j][k];
        forall (k in Process)
            sum(j in Process,l in 1..k ) p[j]*x[j][l]- sum(j in Process)d[j]*x[j][k] <= 0;
    }

     

    Thanks in advance,

    Best regards,


    #DecisionOptimization
    #OPLusingCPLEXOptimizer