The easiest might be to consider making the set T a subset of integers.
You can then combine the r_j, d_j and value of t using a parameter indicating which t’s are relevant for each j and sum over those t’s using a so-called domain condition in AIMMS (using the | or such-that operator)
@diederik , building on @gdiepen ‘s response, your constraint could look something like
constraint_1,
index domain: j
Definition: sumot | t>= r(j) and t <= d(j), x(j, t) = 1]
Ultimately, it depends on how you declared the set T (is it a calendar of dates or weeks, or just a plain set of time periods {1, 2, … 5} ) and how the data for r(j) and d(j) is available - is it in same format of Set T or different ?
For example, if r(j) and d(j) are in dates but Set T is a calendar of weeks, then you will need helper functions as below. I suggest you also create a calendar of dates with the same format as r(j) and s(j), and declare these two as element parameters in this calendar.
sum>t | t >= Timeslotcharacteristic(r(j), ‘week’) and t <= Timeslotcharacteristic(d(j), ‘week’)), x(j, t) = 1]
TimeSlotCharacteristic — AIMMS Function Reference
Thank you for your answer @gdiepen. I am bit new to AIMMS and have made the set T a subset of integers, but cant figure out how the parameter should look like.
@mohansx actually provided you with pretty much all of the required details ;)
You should have two parameters r and d that are indexed over the jobs j also.
Then in summations, you can use the | or such-that operator (look up domain conditions in the aimms manuals for more information) to sum over all times t such that a particular condition holds (e.g., in your case the t is between release and due date)