Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  CPLEX Performance using Semi-Continuous variables versus binary variables

    Posted 07/24/12 06:59 AM

    Originally posted by: SystemAdmin


    Hi,
    My LP problem uses semi continuous variables. I am rather worried about performance so I tried
    executing (CPLEX ver. 12.4 with .net API) the same problem in two different ways:
    1. Explicitly define the variables as semi-continuous.
    2. Implicitly enforce semi-continuity through binary helper variables.

    Naturally the output is exactly the same as these are equivalent problems.
    The curious thing though is that I see a very significant performance improvement through method #2 (please see attached text files with CPLEX output).

    Is that consistent with what I should expect from CPLEX? Is there an explanation to this? perhaps with method #1 presolve spends a lot of overhead time in translating the Semi-Continuous directive into constraints with binary helper variables in order to get exactly method #2?

    Thanks,
    Ariel
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: CPLEX Performance using Semi-Continuous variables versus binary variables

    Posted 07/24/12 09:08 AM

    Originally posted by: SystemAdmin


    Do I understand correctly that the solution time with semi-continuous variables is 00:00:00.2430000 and with binary variables it is 00:00:00.0330000? I don't think that you should draw any conclusions from time values as small as those. Both values are significantly smaller than a second and any kind of inaccuracy in the clock or latency in the OS scheduler will heavily influence these timing values.
    In both cases your output tells that the problem after presolve has
    Reduced MIP has 42 rows, 42 columns, and 175 nonzeros.
    Reduced MIP has 14 binaries, 0 generals, 0 SOSs, and 0 indicators.
    

    and all other output is basically the same as well. So it is very likely that you are solving the exact same problem here (which is kind of expected). The time difference of 0.2 seconds may come from anywhere.
    BTW: Did you include the model building time into this time measurement?
    If not your results are of course biased: If you use semi-continuous variables then CPLEX has to transform them internally in presolve. If you use binary variables then you do the transformation in your modeling part. Modeling becomes more complicated (and more error prone) and you should account for that more complicated modeling.

    As I said, the timing differences are just too small to draw any conclusions here.
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: CPLEX Performance using Semi-Continuous variables versus binary variables

    Posted 07/26/12 08:21 AM

    Originally posted by: SystemAdmin


    Thank you Daniel,

    Yes the times are significantly smaller than 1 second.
    They do not include building the model as the test read the model from a LP file.
    So according to your experience I shouldn't inherently suffer significant performance loss if using binary helper variables instead of the explicit semi-continuous variables?

    Thanks!
    Ariel
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: CPLEX Performance using Semi-Continuous variables versus binary variables

    Posted 07/31/12 04:42 AM

    Originally posted by: SystemAdmin


    I don't have extensive computational experience to prove or disprove your claim. Here are some more comments:
    • semi-continuous variables are a special modeling device. General MIP theory does not explicitly support them. So CPLEX transforms those variables into something it can handle before it actually starts to solve a model that contains semi-continuous variables. The main advantage of using semi-continuous variables is that it frees you of the burden to do that transformation yourself.
    • if you already have an equivalent model that does not use semi-continuous variables then I would use that model. This way you skip the transformation step that CPLEX has to do and may even save some memory (that CPLEX needs to allocate for the transformation).
    • in general I don't expect big differences in time between the two approaches -- provided you include the model building time into the timing analysis (and this must be done to get a fair comparison).

    #CPLEXOptimizers
    #DecisionOptimization