Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Naming Subconstraints

    Posted 09/15/16 04:51 PM

    Originally posted by: mathygirl


    Is there a way to name subconstraints in OPL?

    By subconstraint, I mean a "forall" iteration nested inside an outer "forall".

    In particular, the code below throws an error, though it demonstrates what I'm trying to do with "namedConstraint":

    tuple Tsets {

        {string} members;
    }

    {Tsets} mySet = {<{"s1", "s2"}>, <{"s3", "s4", "s5", "s6"}>, <{"s7", "s8", "s9"}>};

    minimize myObjective;

    subject to {
        forall(s in mySet) {
            forall(m in s.members) namedConstraint[m] {
                doSomething;
            }
        }
    }


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Naming Subconstraints