Decision Optimization

Decision Optimization

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


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

how to declare a variable between 0 and 1

  • 1.  how to declare a variable between 0 and 1

    Posted 08/08/18 10:46 PM

    Originally posted by: A6UM_Can_Nguyen


    Hi Alex,

    Please ask how to declare a variable 0 <= x[i] <= 1?. For example, X[i]= 0.5, 0.6; 0.7, 1,...

    Thank you,

    Nguyen

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: how to declare a variable between 0 and 1

    Posted 08/09/18 10:41 AM

    Hi

    dvar float x[1..10] in 0..1;

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: how to declare a variable between 0 and 1

    Posted 08/09/18 11:17 PM

    Originally posted by: A6UM_Can_Nguyen


    Hi Alex,

    Yes, thank you for helping.

    The model has the Xi variable that is binary (0 or 1), because the data has 100,000 of Xi variables (i from 1 to 100,000), so the model needs to decide which some X = 1 or 0. Therefore, this is the reason that the model is working with Very long run time (over 3 days) but I don't get results.

    To solve this long run time, I think that I should use Xi variable that is dvar float x[i] in 0..1 instead of binary. However, the results changed (not as expected), do you have any way to solve this problem?

     

    Thank you,

    Nguyen

     

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer