Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Generate variables with different sequence

    Posted 03/17/19 10:00 PM

    Originally posted by: David0424


    Hi, I used CPLEX .net API to generate a model, and I met a strange behavior of CPLEX.

    For example, the model had variable X and Y, the number of variables X is much larger than variable Y.

    I generated X first, then I generated Y, it took five minutes to crate all variables in the model.

    I changed the sequecne of generate variables, I generated Y first then X, it took only thirty seconds!

    I checked two model had same number of variables, I just siwtched the code sequence to generated the variables.

    My qeusetion is why this behavior show up in CPLEX API?

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Generate variables with different sequence

    Posted 03/18/19 01:55 AM

    What version of CPLEX do you use? Can you please show the code that creates the variables or at least provide an outline of it? To tell what is going wrong we need to know how exactly you create the variables.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Generate variables with different sequence

    Posted 03/19/19 09:21 PM

    Originally posted by: David0424


    Hi, Daniel

    I using 12.8.0 version of cplex for .net api, and I use cplex.NumVar(cplex.Column(ILPMatrix), 0, int.MaxValue, variableName) to crate variables.

    Still, the number of variables X is much larger than variable Y.

    My question is that I just switch sequence of addvariable, but get different time to create variables.

    Thanks for the help!


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Generate variables with different sequence

    Posted 03/22/19 03:18 AM

    I cannot reproduce this here. Could you provide a minimal code sample that reproduces the issue?


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Generate variables with different sequence

    Posted 03/22/19 03:39 AM

    Originally posted by: David0424


    Hi, Daniel

    Since there are some confidential issue, could you provid me your personal email, I will sent it to you.

    Thanks for your help!


    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: Generate variables with different sequence

    Posted 03/22/19 04:02 AM

    Sure. Please send email to daniel(dot)junglas(at)de(dot)ibm(dot)com.


    #CPLEXOptimizers
    #DecisionOptimization