Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

string concatenate

  • 1.  string concatenate

    Posted 10/25/15 03:29 AM

    Originally posted by: SylvainB


    Hi,

    Base on help CPLEX to concatenate string you need to use + , I write  (to get ed1) - should be simple!

    string tool_id = "ed"+"1";

    I get the error "Operator not available for string + string." - It should be simple!

    I got an answer that it is the scripting blocks (thanks for the answer) . But I need it for parameter on SQL query in the modeling part?

    Thanks for the answer! 


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: string concatenate

    Posted 10/25/15 04:11 PM

    Hi,

    string tool_id = "ed";
     
     execute concatene
     {
     tool_id+="1";
     writeln(tool_id);
     }

    will give

    ed1

     

    ps:

    at https://www.ibm.com/developerworks/community/forums/html/topic?id=e3987f3a-9c07-4a0a-b281-720cbec45080&ps=25

      @IrvL 5bd8ef1b-c948-4f22-9f32-d2f57b187827​  gave an example about how to update a string for reading a spreadsheet. The same can be used for a database

     

     

     

     

     

    regards

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer