Hi Glen,
There are several ways to tackle your modeling question.
I will discuss three:
1) Use a binary parameter: isActiveCrop(i), which you initialize to 1 and set to 0 for crops no longer active.
In your model you then use:
sum( i | isActiveCrop(i), ...
or
sum( j | isActiveCrop(j),
or
sum( (i,j) | isActiveCrop(i) and isActiveCrop(j), ....
2) Slightly more elegant but essentially the same is to use a set activeCrops, subset of Crops:
In your model you can then use:
sum( i | i in activeCrops, ...
or
sum( j | j in activeCrops,
or
sum( (i,j) | (i in activeCrops) and (j in activeCrops), ....
3) The way I like to do it is again using a set of activeCrops, but also declaring indices in that set, say ai and aj.
In your model you can then use:
sum( ai, ...
or
sum( aj, ....
or
sum( (ai,aj), ....
Hope this helps,
Chris Kuip
AIMMS Client Support.
Op woensdag 16 juli 2014 18:13:40 UTC+2 schreef Glen: