Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

How to map vector of bool components to small vector of integer components

  • 1.  How to map vector of bool components to small vector of integer components

    Posted Sat March 07, 2020 03:56 AM

    Originally posted by: Marco81


    Hi everyone. I have the following question. How to map the decision vector x of bool values to the small decision vector y of the integer values. For example, I have the following code: 

    int n=10;

    dvar boolean x[1..n];

    dvar int y[1..3];

     

    and for instance the decision vector x has these components: x=[0 0 1 0 0 1 0 0 1 0]. How to set the decision vector y on the  following components y=[3 6 9] inside the subject to block?

     

    Thanks a lot.  


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: How to map vector of bool components to small vector of integer components

    Posted Sat March 07, 2020 04:13 PM

    Hi

    in

    https://www.linkedin.com/pulse/how-opl-alex-fleischer/

    How to use a decision variable as an index with CPLEX ?

    could help

    regards


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: How to map vector of bool components to small vector of integer components

    Posted Mon March 09, 2020 03:35 AM

    Originally posted by: Marco81


    Dear Alex, thanks a lot.

     

    Best wishes,

    Marco


    #CPLEXOptimizers
    #DecisionOptimization