Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

Can we use a boolean constraint in another constraint

  • 1.  Can we use a boolean constraint in another constraint

    Posted Wed November 06, 2013 02:41 AM

    Originally posted by: SatishKumarA


    Hi,

    It is mentioned that forbiddenAssignments is a boolean type OPL function.

    Say, if i have a tuple with two components and I would like to forbid some combinations like (1,2) etc.

    What it mean when the function value is one (is it that combination (1,2) is already forbidden?). and zero?

    I would like to use this in another constraint say,

    forbiddenAssignments(tuple,1,2) ==1 => z==1

     

    This is giving an unknown error. Please help me out.

    Thanks,

    Satish


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 2.  Re: Can we use a boolean constraint in another constraint

    Posted Wed November 06, 2013 05:47 AM

    Hi,

     

    metaconstraints on global constraints are forbidden in the subject to block.

    You may use them in asserts however.

     

    Regards


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 3.  Re: Can we use a boolean constraint in another constraint

    Posted Wed November 06, 2013 07:03 AM

    Originally posted by: SatishKumarA


    Hi Alex,

    Thanks for your reply.

    Is there any way to relax this (forbiddenAssignments) constraint.?

    Suppose say, I want to apply some penalty when the above constraint is true. How can I do this in OPL?

     

    Thanks,

    Satish


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 4.  Re: Can we use a boolean constraint in another constraint

    Posted Wed November 06, 2013 09:46 AM

    Hi,

    I would go back to arithmetic constraints for that.

    Regards


    #DecisionOptimization
    #OPLusingCPOptimizer