Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Out Of

    Posted 09/21/12 08:37 AM

    Originally posted by: SergeyPolyakovskiy


    Dear Colleagues,

    I wonder about memory or numeric limitations on the number of variables of the objective function. I am using CPLEX 12.4. Academic Version, Visual C++ with access through the Concert Technology. The objective function is generated dynamically term by term using the command like obj = obj + koef[j]*X[j][i], where coefficients are of the double-type. Finally, I obtain error of “Out of memory” once I reach approx. 400000 terms.
    I wonder if such kind of generation is too recourse consuming and there are better ways to generate large objective functions?

    Thanks in advance.
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Out Of

    Posted 09/24/12 11:41 AM

    Originally posted by: SystemAdmin


    Yes, there are better ways to do that. First of all, instead of doing
    obj = obj + koef[j]*X[j][i]
    

    use
    obj += koef[j]*X[j][i]
    

    If that does not help try to first collect all coefficients in a double and an IloNumVar array and the use IloScalProd.
    #CPLEXOptimizers
    #DecisionOptimization