Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Can I set the array value from the database?

    Posted 08/07/09 09:07 PM

    Originally posted by: SystemAdmin


    [zhig_wan said:]

    hello
    can I set the value as below?

    In model file:
    int ARRAY[1..2][1..3] = ...;

    In data file:
    ARRAY from DBRead(db,"SELECT * FROM table");


    Thank you

    Zhig_wan
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Can I set the array value from the database?

    Posted 08/19/09 08:06 PM

    Originally posted by: SystemAdmin


    [zhig_wan said:]

    as I tested it is not ok?
    anybody knows how to solve this problem?
    because the structure of the table is not definite, so I think the example of oil doesn't work for this situation.

    thank you
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: Can I set the array value from the database?

    Posted 08/24/09 11:39 PM

    Originally posted by: SystemAdmin


    [zhig_wan said:]

    .mod
    int E[0..2][0..8] = ...;

    .data
    E from DBRead(db,"SELECT * FROM elig");

    data in table elig
    colum1 colum2 colum3
    1          1          0
    0          0          1
    0          1          0
    1          1          1
    1          0          0
    1          0          0
    0          0          1
    1          0          1
    0          1          1

    E should be: [[1,0,0,1,1,1,0,1,0],[1,0,1,1,0,0,0,0,1],[0,1,0,1,0,0,1,1,1]]

    but after reading it is:[[1,1,0,0,0,0,0,0,0],[1,1,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]]

    Can anybody tell me how to solve this problem?

    Thank you

    zhig_wan



    #DecisionOptimization
    #OPLusingCPLEXOptimizer