Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Holding a matrix in a tuple

    Posted 03/12/12 11:45 AM

    Originally posted by: Bogdan_Tanasa


    Hi guys,

    Is there any way to hold a matrix in a tuple? I tried to write something like this:

    int nrOfMessages = ...;
    int nrOfCycles = ...;
    int msgUa = nrOfMessages;

    range rangeOfMessages = 1 .. nrOfMessages;
    range rangeOfCycles = 1 .. nrOfCycles;

    tuple config_type {
    key int id;
    int cfgrangeOfMessagesrangeOfCycles;
    }
    {config_type} oldConfigs = ...;

    but I get an error saying that Expecting tuple component foud cfg ...

    Thanks,
    Bogdan.
    #DecisionOptimization
    #MathematicalProgramming-General


  • 2.  Re: Holding a matrix in a tuple

    Posted 03/12/12 11:58 AM
    Hi,

    documentation

    IDE and OPL > Optimization Programming Language (OPL) > Language Reference Manual > OPL, the modeling language > Data types > Data structures
    says

    Multidimensional arrays are not supported in tuples.

    Regards

    Alex
    #DecisionOptimization
    #MathematicalProgramming-General


  • 3.  Re: Holding a matrix in a tuple

    Posted 03/12/12 12:04 PM

    Originally posted by: Bogdan_Tanasa


    Thanks, i will read more carefully from now ... :P
    #DecisionOptimization
    #MathematicalProgramming-General


  • 4.  Re: Holding a matrix in a tuple

    Posted 03/13/12 05:43 AM

    Originally posted by: Bogdan_Tanasa


    In order not to create a new thread.

    I have a project where I use CPLEX and in the main script I instantiate the model and the rest. If I use the main script then the variables will not be shown at the end of optimization in the Problem browser window. If I dont use main that they are shown there. Is there any function which I should call in main such that I get the output printed also in the problem browser window?

    Thanks.
    #DecisionOptimization
    #MathematicalProgramming-General