Decision Optimization

Expand all | Collapse all

Decision variable float+ not supported

  • 1.  Decision variable float+ not supported

    Posted 10 days ago
     

    Hello I have a simple problem as follows:

    using CP;
    
    dvar float+ t;
    
    dexpr float cost = (2*t^2 + 16/t)*1000;
    
    
    minimize cost;
    
    subject to {
      1<=t<=5;
    };
    

    CPLEX provides an error: 'Decision variables of type dvar float+ not supported by this algorithm. I need t to be a float. What can I do?



    ------------------------------
    Hana Begic
    ------------------------------


  • 2.  RE: Decision variable float+ not supported

    Posted 10 days ago
    Hi

    same question at https://stackoverflow.com/questions/67381410/decision-variable-float-not-supported/67381783#67381783

    using CP;
    
    int scale=10000;
    
    dvar int+ scalet;
    dexpr  float t=scalet / scale;
    dexpr float cost = (2*t^2 + 16/t)*1000;
    minimize cost;
    subject to {
        1<=t<=5;
    };​


    works fine



    ------------------------------
    [Alex] [Fleischer]
    [EMEA CPLEX Optimization Technical Sales]
    [IBM]
    ------------------------------