Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  length of a sequence

    Posted 07/14/18 05:05 AM

    Originally posted by: Janisch


    Hello,

    is there a way to limit the length of a sequence? In the attached picture I tried to graph my problem. Each of these sequences should be less than or equal to N * 120.

    This is my attempt. But it doesn´t work:

    forall(s in 1..S){
    min(i in 1..N) startOf(station[i][s][1])-max(i in 1..N) endOf(station[i][s][1])<=c*N; //my attempt to integrate this constraint into the model
    min(i in 1..N) startOf(station[i][s][2])-max(i in 1..N) endOf(station[i][s][2])<=c*N;
    }

    I also attached my model and an example dat file.

    regards


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 2.  Re: length of a sequence

    Posted 07/15/18 05:33 AM

    Hi,

    instead of

    min(i in 1..N) startOf(station[i][s][1])-max(i in 1..N) endOf(station[i][s][1])<=c*N;

    have you tried

    max(i in 1..N) endOf(station[i][s][1])-min(i in 1..N) startOf(station[i][s][1])<=c*N;

    ?

    regards


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 3.  Re: length of a sequence

    Posted 07/15/18 05:57 AM

    Originally posted by: Janisch


    Than you Alex! I completely overlooked...


    #DecisionOptimization
    #OPLusingCPOptimizer