Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only

“next” inside “forall”

  • 1.  “next” inside “forall”

    Posted 08/11/08 11:15 PM

    Originally posted by: SystemAdmin


    [agus said:]

    Hi,
    I am trying to put the “next” function in the forall statement but I got an error message after I tried to run it.
    Here is my code:

    forall (i in Flights, u,v in i.nodes: u != last(i.nodes) && v == next(i.nodes,u))
    t[i][v] - t[i][u]== 0;

    I know I can put the “last” function in the forall statement, but I don’t understand why it won’t work with the “next” function.
    Could someone help me?
    Thanks
    agus

    #DecisionOptimization
    #OPLusingCPLEXOptimizer