a warning information in a stochastic programming problem

49 views
Skip to first unread message

Deng DING

unread,
Dec 5, 2011, 4:05:52 PM12/5/11
to ai...@googlegroups.com
Dear all,

I modified the codes of the stochastic programming example (the one with stock, production, and demand) to build a stochastic model based on a deterministic farm model.
It's a 3-stage problem. In the scenario tree, each node has 16 child branches. And so at Stage 3, there are 16*16 branches and 256 scenarios

The model was solved successfully by solving the deterministic equivalents but I got 20 pieces of similar warning messages about the generation of stochastic model. Each piece is like the one below with the only difference in the scenario index.

Warning: An inconsistency detected in the generation of a stochastic mathematical program concerning stage 1.  The coefficient in row Sale_C_definition.Stochastic([LYc-LYs-LPc-LPs,LYc-LYs-LPc-LPs],1,CLU1) and column Yield_C.Stochastic([LYc-LYs-LPc-LPs,LYc-LYs-LPc-LPs],1,CLU1) is -1.81.  The coefficient in row Sale_C_definition.Stochastic([LYc-LYs-LPc-HPs,LYc-LYs-LPc-LPs],1,CLU1) and column Yield_C.Stochastic([LYc-LYs-LPc-HPs,LYc-LYs-LPc-LPs],1,CLU1) is 0.  These two coefficients should have been the same.

I also tried to solve the model with the stochastic benders algorithm. But it couldn't be applied here because of the warning information above became an error to this algorithm.

Does anyone know what does the "inconsistency" mean in the warning message?

Thank you,

Deng

Ovidiu Listes

unread,
Dec 6, 2011, 4:22:33 AM12/6/11
to AIMMS - The Modeling System
Hi Deng

From your info I can only see that Sale_C is a variable with a
definition which uses the stochastic variable Yield_C.

In order to help, I need more info:

1. What is the complete definition of the variable Sales_C ? In
particular, does its definition also use other variables, besides
Yield_C ?

2. Is the variable Sales_C declared with the Stochastic property ? If
so, does it also have the Stage attribute filled ?

3. Are all variables in the definition of Sales_C declared with the
Stochastic property ? If so, do they also have the Stage attribute
filled ?

I am asking for info above, because it seems that you have something
like

S_C = def = p * Y_C + ... ?

The problem may be that S_C is missing the Stochastic property or
perhaps it has a too low stage (compared to the stage of Y_C or the
other vars in its def).

Regards,
Ovidiu Listes


Deng DING

unread,
Dec 8, 2011, 1:07:10 PM12/8/11
to ai...@googlegroups.com
Hi Ovidu,

Thanks for you reply.

Here's more information about the model:
1. No, the definition of the variable Sale_C doesn't use other variables besides Yield_C
Sale_C is defined as:
Yield_C(yr,cl)*Pcorn(yr)
where Pcorn(yr) is a stochastic parameter for corn price




--
You received this message because you are subscribed to the Google Groups "AIMMS - The Modeling System" group.
To post to this group, send email to ai...@googlegroups.com.
To unsubscribe from this group, send email to aimms+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/aimms?hl=en.


Deng DING

unread,
Dec 8, 2011, 1:14:08 PM12/8/11
to ai...@googlegroups.com
Sorry my last email was not complete. I clicked the "Send" by mistake. Here's a complete one:


1. No, the definition of the variable Sale_C doesn't use other variables besides Yield_C
Sale_C is defined as:
Yield_C(yr,cl)*Pcorn(yr)
where Pcorn(yr) is a stochastic parameter for corn price
           Yield_C(yr,cl) is a stochastic variable determined by decision variables of current year crop, last year crop, and Nitrogen application rate.

2. Yes, Sale_C is a stochastic variable with each of its stages corresponds to each year in planning horizon.

3. Yes, all variables in the definition of Sales_C are declared with the
Stochastic property. They are also specified with one year-to-one stage as in mentioned above.

Actually nearly all variables in my stochastic model were specified with the "stochastic" property and their stages were assigned using the same strategy.

Thank you,

Deng

Ovidiu Listes

unread,
Dec 12, 2011, 10:37:02 AM12/12/11
to AIMMS - The Modeling System

Hello Deng

So, your variable Sale_C(yr,cl) is defined as

Sale_C(yr,cl) = Yield_C(yr,cl)*Pcorn(yr)

where both Sale_C and Yield_C are declared with Stochastic property
and
their stage attribute is filled by the year-to-stage mapping (ie, yr=1
mapped to stage 1, yr=2 mapped to stage 2, etc...)

For yr = '1', both Sale_C.Stochastic(sc,'1',cl) and
Yield.Stochastic(sc,'1',cl) become stage 1 variables.
That means they are not allowed to vary across scenarios.
So, for any two scenario's, say sc1 and sc2, the following need to
hold (according to the nonanticipativity constraints):

Sale_C.Stochastic(sc1,'1',cl) = Sale_C.Stochastic(sc2,'1',cl) (1)
Yield.Stochastic(sc1,'1',cl) = Yield.Stochastic(sc2,'1',cl) (2)

At the same time, you say that Pcorn(yr) is a stochastic parameter.
Apparently, there are two scenarios sc1 and sc2 for which
Pcorn.Stochastic assumes different values:

Pcorn.Stochastic(sc1,'1') <> Pcorn.Stochastic(sc2,'1') (3)

The relations (1),(2), and (3) above lead to inconsistency in the
generated constraints

Sale_C.Stochastic(sc1,'1',cl) = Yield_C.Stochastic(sc1,'1',cl) *
Pcorn(sc1,'1')
Sale_C.Stochastic(sc2,'1',cl) = Yield_C.Stochastic(sc2,'1',cl) *
Pcorn(sc2,'1')

I think this is the cause of the warnings you mentioned initially in
this thread.

Regards,
Ovidiu Listes


Reply all
Reply to author
Forward
0 new messages