Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  variable range in SheetWrite

    Posted 12/28/12 08:28 AM

    Originally posted by: SystemAdmin


    Hi all,

    I have a problem where solution array (2D) has variable width. I'm using sheetwrite to work with the solution, but i've found that apparently it doesn't support using a string variable to specify the array lenght. Here is an example of what i want to do:

    Result = {"anything"};

    SheetConnection sheet2("Solution.xlsx");
    Qproduct to SheetWrite(sheet2,Result);

    Is there anyway that Aheetwrite accepts array dimensio parameter (in this case Result) as a string variable instead of a fixed array or named excel array?

    Many thanks for your help!
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: variable range in SheetWrite

    Posted 12/28/12 03:52 PM

    Originally posted by: SystemAdmin


    In your sample, Result is not a string but a set of string elements.
    Did you try with
    Result = "anything";
    
    ?

    If you're working with sets, then you need to refer to a specific element of the set, for example
    first(Result)
    


    Hope this helps
    #DecisionOptimization
    #OPLusingCPLEXOptimizer