Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  printing out NodeId

    Posted 06/17/14 01:12 PM

    Originally posted by: skkim


    how can we print out nodeid?

    I tried 

     

    cout<< getNodeId() << endl;

    or

    getenv().out()<< getNodeId() << endl;

    Neither of them is working. 


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: printing out NodeId

    Posted 06/18/14 12:40 AM

    You can either use the _id field of class IloCplex::MIPCallbackI::NodeId directly

    std::cout << getNodeId()._id;
    

    or define this operator (a more elegant but also more intrusive solution)

    inline std::ostream &
    operator<<(std::ostream &s, IloCplex::MIPCallbackI::NodeId const &id) {
       return s << id._id;
    }
    

    With this operator you can then just do

    std::cout << getNodeId();
    

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: printing out NodeId

    Posted 06/18/14 10:08 PM

    Originally posted by: skkim


    Thank you. It works...


    #CPLEXOptimizers
    #DecisionOptimization