Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  IloCos of a variable

    Posted 12/10/12 05:29 AM

    Originally posted by: mrmag


    Hello.

    I just wonder if it is possible to use IloCos of a variable like in the following example:

    IloModel model(env);

    IloIntVar a(env,0,360);

    model.add(IloMaximize(env,IloCos(a * IloPi / 180.0)));

    cout << model << endl;
    IloCP cp(model);

    if (cp.solve()) {
    cout << "cp.getObjValue(): " << cp.getObjValue() << endl;
    cout << cp.getValue(a) << endl;
    }
    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: IloCos of a variable

    Posted 12/10/12 05:37 AM

    Originally posted by: mrmag


    Results of the run are the following:

    IloModel model0 = {
    obj4 = (cos(0.0174533 * IloIntVar(1)http://0..360 ), IloObjective, Maximize);

    }

    Concert exception caught: IloAlgorithm cannot extract extractables 3, 5, 4 and 0

    So, there is an exception.
    #CPOptimizer
    #DecisionOptimization


  • 3.  Re: IloCos of a variable

    Posted 12/10/12 07:00 AM

    Originally posted by: mrmag


    Is it possible to have cos and sin expressions in the model?
    #CPOptimizer
    #DecisionOptimization


  • 4.  Re: IloCos of a variable

    Posted 12/10/12 11:14 AM

    Originally posted by: rdumeur


    Dear mrmag,

    No, it is not possible to use IloCos in your model. For working around this situation, you will find useful information in this thread:

    http://www.ibm.com/developerworks/forums/thread.jspa?threadID=463202&tstart=0

    Cheers,
    ____________________________________
    Unsubscribe via the "binocular" icon on the web

    Sauf indication contraire ci-dessus:/ Unless stated otherwise above:
    Compagnie IBM France
    Siège Social : 17 avenue de l'Europe, 92275 Bois-Colombes Cedex
    RCS Nanterre 552 118 465
    Forme Sociale : S.A.S.
    Capital Social : 653.242.306,20 €
    SIREN/SIRET : 552 118 465 03644 - Code NAF 6202A
    #CPOptimizer
    #DecisionOptimization


  • 5.  Re: IloCos of a variable

    Posted 12/12/12 04:01 AM

    Originally posted by: mrmag


    Hello rdumeur. The table of values helped. Thank you.
    #CPOptimizer
    #DecisionOptimization