Topic
2 replies Latest Post - ‏2014-03-26T16:43:11Z by GGR
qtbgo
qtbgo
116 Posts
ACCEPTED ANSWER

Pinned topic can we group same type of tasks in a sequence variable?

‏2014-03-22T06:46:01Z |

Hi, I defined a sequence variable over a serial of tasks(interval variable). Each task has a type associated with it.

Now, I know

1 tasks with the same type should be grouped together in the sequence.

2 tasks with smaller type value should be ordered before tasks with bigger type value.

Can we make use of this information to accelerate ordering of the sequence variable?

  • GGR
    GGR
    65 Posts
    ACCEPTED ANSWER

    Re: can we group same type of tasks in a sequence variable?

    ‏2014-03-26T16:39:54Z  in response to qtbgo

    Hi qtbgo

     

    You should have a look on the documentation of the typeOfNext And typeOfPrevious in the documentation.

    I suppose by <<I know>> you mean I want to state in the model

    Be s the sequence, a the array of an intervals variable in s of index by 1..n range of type  t[], the constraints to declare could be:

    forall (i in 1..n) typeOfNext(s, a[i], t[i], t[i]) <= t[i]

    Hope that helps

  • GGR
    GGR
    65 Posts
    ACCEPTED ANSWER

    Re: can we group same type of tasks in a sequence variable?

    ‏2014-03-26T16:43:11Z  in response to qtbgo

    Hi qtbgo

     

    You should have a look on the documentation of the typeOfNext And typeOfPrevious expressions.

    I suppose by <<I know>> you mean I want to state in the model

    Be s the sequence, a the array of an intervals variable in s of index by 1..n range of type  t[], the constraints to declare could be:

    forall (i in 1..n) typeOfNext(s, a[i], t[i], t[i]) <= t[i]

    Hope that helps