Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

how to express this condition constraint with decision variable

  • 1.  how to express this condition constraint with decision variable

    Posted Wed May 07, 2014 01:21 AM

    Originally posted by: Amay_mei


    hi all,

    i have a condition constraints like this:

    xij, yij are decision variables, and   xij, yij>=0;

    they met the following relationship:

    yij=12/xij  if xij>0;

    yij=0         if xij=0;

     

    how to express them in cplex?i have written them like this:

    forall(<s,t> in Links)
      (trans[<s,t>]>0) => (transit[<s,t>]*trans[<s,t>]-12==0);
    forall(<s,t> in Links)
      (trans[<s,t>]==0)=>(transit[<s,t>]==0);

     

    But this express doesn't work. The error remarked by cplex is "function operation >(dvar,int ,int) not available in context CPLEX ".

    I really don't know how to fix it, can you help me?

    I would appreciate it if you can help with me the problem.
    

    thanks!

    Amay_mei

     

     

     

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: how to express this condition constraint with decision variable

    Posted Wed May 07, 2014 02:51 AM

    The exact same question was asked and answered here.


    #CPLEXOptimizers
    #DecisionOptimization