Summing over SUBSETS - illogical results...

I have to explain my model a bit - before asking my question on using
a GAMS
command that SUMS OVER A SUBSET. If you have time, please read through
it and
let me know where the model goes wrong. Any help would be appreciated.

Thank you for your attention.
Subbu Kumarappan

In the following, STEP 1 defines a simpler problem which gives me
correct/expected results
after optimization. I use the SAME logic/set up in STEP 2 – I use a
command SUM
over SUBSETS which is the reason for wrong results.

In particular, a number 127012.3237 is calculated repeatedly and
inserted as Supply of
biomass feedstock – even though there is no use for that feedstock
(no ethanol production during those times - please see below to read
more of my problem. It is a big lengthy - but explains the logic/model
set up).

STEP 1:

My COST MINIMIZATION model is as follows:

TIME FRAME: 10 years (40 quarters)

DECISION/CHOICE VARIABLES:

  1. Corn acreage harvested for stover annually (10 years or 40
    quarters) and
  2. Switchgrass planted as a perennial crop (acreage chosen once - and
    it stands up to
    10 years in the field).

OUTPUT - Cellulosic ethanol - production starts in 8th quarter - 13.25
million gallons
per quarter capacity

Other Constraints: Some constraints for inventory requirement, etc
were added.

RESULT: When I modeled the above problem, I got a proper answer (there
is no
demand for stover or grasses in quarters 1 through 7) since ethanol
production started only 8th quarter.

STEP 2:

TIME FRAME: I increased the time frame from 10 years to 20 years (80
quarters)

DECISION VARIABLES: I allowed subsequent planting of switchgrass in
years 2, 3, 4,
5…, 18, 19 and 20.

If the grass is planted in year 1, its productive life ranges from
year 1 to 10,
Switchgrass Planted in year 2 - productive life from 2 to 11

Planted in year 10 - productive life from 10 to 19
Planted in year 11 - productive life from 11 to 20
Planted in year 12 - productive life from 12 to 20

Planted in year 20 - productive life from 20 to 20

OTHERS:
All others (corn stover acreage, constraints, ethanol output) remain
the same as
above.

PROBLEM WITH MY CODE:

In year 5, there can possibly be 5 different switchgrass plots - one
that was planted in
year 1, then the others planted in year 2, 3, 4 and 5 - so, the
acreage planted in year 1
is not available for year 3 or 4 planting – Note that it is also not
available for corn stover
harvesting.

To model the above mentioned charactersitic, I used a GAMS commands as
following:

SETS
q /q1q80/ “Quarters”
t1 /q1
q40/ “Subset of quarters to compute acreage allotted to
switchgrass
planted in year 1”
t2 /q5q44/ “Subset of quarters to compute acreage allotted to
switchgrass
planted in year 2”

t20 /q77
q80/ “Switchgras planted in year 20”

POSITIVE VARIABLES
vGrassAcresYr1(t1)
vGrassAcresYr2(t2)

vGrassAcresYr20(t20)

vStoverAcres(q)


EQUATIONS (only one is given):

eqnAvailableArea(q)…

Sum[t1, vGrassAcresYr1(t1)]

  • Sum[t2, vGrassAcresYr2(t2)]

  • Sum[t20, vGrassAcresYr20(t20)]

  • vStoverAcres(q) =l= AvailableArea(q)

Is the summing over subsets correct? While STEP 1 gave me correct
results (no biomass
demand when ethanol production is ZERO), STEP 2 gives me a number
(127012.3237) repeated wherever it has to be ZERO.

The fundamental difference in model is SUMMING OVER SUBSETS. Please
let me know if you know where the mistake could be…




–~–~---------~–~----~------------~-------~–~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~–~—

\

Hi,

Since no one has reply yet, I guess this is a little too much to ask
from this group. I can offer to look at the issue but only if you send
a complete GAMS program, so things can be reproduced. Please also
indicate clearly where things go wrong in the source code. You might
even want to add an abort statement that kicks in if the results are
nonsensical.

Regards,
Michael Bussieck - GAMSWorld Coordinator

On Jun 12, 2:39 pm, kmsubbu wrote:

I have to explain my model a bit - before asking my question on using
a GAMS
command that SUMS OVER A SUBSET. If you have time, please read through
it and
let me know where the model goes wrong. Any help would be appreciated.

Thank you for your attention.
Subbu Kumarappan

In the following, STEP 1 defines a simpler problem which gives me
correct/expected results
after optimization. I use the SAME logic/set up in STEP 2 – I use a
command SUM
over SUBSETS which is the reason for wrong results.

In particular, a number 127012.3237 is calculated repeatedly and
inserted as Supply of
biomass feedstock – even though there is no use for that feedstock
(no ethanol production during those times - please see below to read
more of my problem. It is a big lengthy - but explains the logic/model
set up).

STEP 1:

My COST MINIMIZATION model is as follows:

TIME FRAME: 10 years (40 quarters)

DECISION/CHOICE VARIABLES:

  1. Corn acreage harvested for stover annually (10 years or 40
    quarters) and
  2. Switchgrass planted as a perennial crop (acreage chosen once - and
    it stands up to
    10 years in the field).

OUTPUT - Cellulosic ethanol - production starts in 8th quarter - 13.25
million gallons
per quarter capacity

Other Constraints: Some constraints for inventory requirement, etc
were added.

RESULT: When I modeled the above problem, I got a proper answer (there
is no
demand for stover or grasses in quarters 1 through 7) since ethanol
production started only 8th quarter.

STEP 2:

TIME FRAME: I increased the time frame from 10 years to 20 years (80
quarters)

DECISION VARIABLES: I allowed subsequent planting of switchgrass in
years 2, 3, 4,
5…, 18, 19 and 20.

If the grass is planted in year 1, its productive life ranges from
year 1 to 10,
Switchgrass Planted in year 2 - productive life from 2 to 11

Planted in year 10 - productive life from 10 to 19
Planted in year 11 - productive life from 11 to 20
Planted in year 12 - productive life from 12 to 20

Planted in year 20 - productive life from 20 to 20

OTHERS:
All others (corn stover acreage, constraints, ethanol output) remain
the same as
above.

PROBLEM WITH MY CODE:

In year 5, there can possibly be 5 different switchgrass plots - one
that was planted in
year 1, then the others planted in year 2, 3, 4 and 5 - so, the
acreage planted in year 1
is not available for year 3 or 4 planting – Note that it is also not
available for corn stover
harvesting.

To model the above mentioned charactersitic, I used a GAMS commands as
following:

SETS
q /q1q80/ “Quarters”
t1 /q1
q40/ “Subset of quarters to compute acreage allotted to
switchgrass
planted in year 1”
t2 /q5q44/ “Subset of quarters to compute acreage allotted to
switchgrass
planted in year 2”

t20 /q77
q80/ “Switchgras planted in year 20”

POSITIVE VARIABLES
vGrassAcresYr1(t1)
vGrassAcresYr2(t2)

vGrassAcresYr20(t20)

vStoverAcres(q)

EQUATIONS (only one is given):

eqnAvailableArea(q)…

Sum[t1, vGrassAcresYr1(t1)]
+ Sum[t2, vGrassAcresYr2(t2)]

+ Sum[t20, vGrassAcresYr20(t20)]

                   + vStoverAcres(q)                        =l=        AvailableArea(q)

Is the summing over subsets correct? While STEP 1 gave me correct
results (no biomass
demand when ethanol production is ZERO), STEP 2 gives me a number
(127012.3237) repeated wherever it has to be ZERO.

The fundamental difference in model is SUMMING OVER SUBSETS. Please
let me know if you know where the mistake could be…
–~–~---------~–~----~------------~-------~–~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~–~—

\