Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  what's the possible error in my program

    Posted 04/13/10 02:19 AM

    Originally posted by: huguowei


    I am using C++ and CPLEX 12.1, under MS VS2008.
    Runtime error.Concert exception caught:IloAlgorithm 00D09EA0 cannot change extractables.
    what's the possible error in my program
    many thanks!
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: what's the possible error in my program

    Posted 04/14/10 01:24 AM

    Originally posted by: SystemAdmin


    Can you please provide more details? What is the code you are running? At which point does the exception occur (what is the function that throws the exception)?
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: what's the possible error in my program

    Posted 04/14/10 11:12 AM

    Originally posted by: huguowei


    IloExprArray T(env);
    {for(int i=0;i<100;i++)}
    {model.add(IloRange(env,0,T[i],10);}
    in fact,I build up an expression array,and every expression consists of some variable.
    I want to add these expressions to constrains in my model in a loop.
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: what's the possible error in my program

    Posted 04/16/10 12:29 AM

    Originally posted by: SystemAdmin


    Hm, this code works correctly for me:
    // Create an array of expressions and a variable.
    IloExprArray T(env);
    IloNumVar x(env);
     
    // Add 100 elements to the array.
    for (int i = 0; i < 100; ++i)
       T.add(x);
     
    // Create constraints.
    for(int i=0;i<100;i++)
       model.add(IloRange(env,0,T[i],10);
    

    How do you populate the array T? Maybe something is wrong with the way you to that?
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: what's the possible error in my program

    Posted 04/16/10 11:26 AM

    Originally posted by: huguowei


    in the expression array T,some expression is like T[i]=IloPower(2.7,H),H is also a expression.H consisit of some variables,like H=x[0]+x[1];
    Frankly,I don't know well about the use of cplex function, especially,when the input of the function is variable or expression.I thy some cplex functions.IloAbs(x), x can be a variable or expression.but IloPower() seem be not.
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: what's the possible error in my program

    Posted 04/16/10 04:55 PM

    Originally posted by: SystemAdmin


    I guess your problem is IloPower. From the documentation of IloPower:

    An instance of IloCplex can extract only quadratic terms that are positive semi-definite when they appear in an objective function or in constraints of a model.

    So you cannot use IloPower in the way you do with CPLEX.
    #CPLEXOptimizers
    #DecisionOptimization