Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Convert int to string

    Posted 07/27/08 01:13 AM

    Originally posted by: SystemAdmin


    [UDOPS said:]

    Using OPL 6.0, I am not experiencing the "automatic conversion of number to string" claimed in the documentation. I have tried many things. How would I complete the conversion to string below?


    int SelectProb = 1407;

    string SelectProbstr =
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Convert int to string

    Posted 07/28/08 09:07 PM

    Originally posted by: SystemAdmin


    [afleischer said:]

    Hello

    Could you do

    int SelectProb = 1407;

    string SelectProbstr;

    execute
    {
    SelectProbstr=SelectProb;
    }

    ?
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: Convert int to string

    Posted 07/29/08 03:13 AM

    Originally posted by: SystemAdmin


    [UDOPS said:]

    Yes, that worked, more specific to my objective:

    int SelectProb = 1407;

    string SelectProbstr;

    string Greeting = "The selected record is ";

    execute
    {
    SelectProbstr=SelectProb;
    writeln(Greeting+SelectProbstr)
    }

    I note a lot of syntax is context specific to whether it is submitted inside or outside of an execute statement.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer