According to the chance constraint problem, you mean the om1, om2 and om3 are my random variables and I already defined with values.
Since my old equations, particularly for E4(l) do not have random variables
E1(l) … hold(‘t2’,‘stock_1’,l) =E= om1hold(‘t1’,‘stock_1’,l)+buy(‘t2’,‘stock_1’,l)-sell(‘t2’,‘stock_1’,l);
E2(l) … hold(‘t2’,‘stock_2’,l) =E= om2hold(‘t1’,‘stock_2’,l)+buy(‘t2’,‘stock_2’,l)-sell(‘t2’,‘stock_2’,l);
E3(l) … hold(‘t2’,‘stock_3’,l) =E= om3hold(‘t1’,‘stock_3’,l)+buy(‘t2’,‘stock_3’,l)-sell(‘t2’,‘stock_3’,l);
E4(l)… (hold(‘t2’,‘stock_1’,l)+ hold(‘t2’,‘stock_2’,l)+ hold(‘t2’,‘stock_3’,l))/CARD(l) =G= ALFR(lb/(1+rfr));
Therefore I need to replace above equation and reformulate the equation by adding the om1, om2 and om3, right? Just like:
E1(l), E2(l), E3(l) keep the same equation
E4(l)… (om1*hold(‘t1’,‘stock_1’,l)+buy(‘t2’,‘stock_1’,l)-sell(‘t2’,‘stock_1’,l)
- om2*hold(‘t1’,‘stock_2’,l)+buy(‘t2’,‘stock_2’,l)-sell(‘t2’,‘stock_2’,l)
- om3hold(‘t1’,‘stock_3’,l)+buy(‘t2’,‘stock_3’,l)-sell(‘t2’,‘stock_3’,l))/CARD(l)
=G= ALFR(lb/(1+rfr));
However, the model generated but comes with an error ‘’*** Non-chance constraint with a random variable: E1(UU)‘’, no idea
Regards
Paul
On Tuesday, August 20, 2013 12:56:19 PM UTC+1, Lutz Westermann wrote:
Paul,
It is true, that you have defined random variables already, but what the
error message means is that you need to have a random variable directly
in your chance constraint. But in E4 you only have “regular” variables
and parameters but no random variables. If you reformulate your problem
it should be possible to solve it using chance constraints.
To your question about your ct: I don’t really understand what it is
supposed to do, but all the equation ct(t) =L= 1; does, is limiting
every ct(t) by 1, so it is OK for this equation if every ct(t) is 1 at
the end. Did you rather want to split your capital using this variable?
Then you should use it like this: sum(t,ct(t)) =L= 1;. But as I said, I
don’t really know what the variable is supposed to do.
Best regards,
Lutz
On 8/20/2013 6:40 AM, msb...@mail.wbs.ac.uk wrote:
Dear Lutz
Thank you for your help, the corrections are quite helpful and I’m
currently studying the EMP.
According to the document “Stochastic Programming (SP) with EMP”
‘‘It propose to build a stochastic model based on a deterministic model
by deï¬ning model parameters to be uncertain. Then GAMS EMP replaces
these uncertain parameters by random variables. The distribution of the
random variables is controlled by the user. Note that these random
variables are not variables in the sense of mathematical optimization,
but they can be understood as random parameters.’’
I think my random variables haven already been defined in the model as:
randvar om1 discrete 0.25 1 0.25 2 0.25 3 0.25 4
randvar om2 discrete 0.25 1 0.25 2 0.25 3 0.25 4
randvar om3 discrete 0.25 1 0.25 2 0.25 3 0.25 4
Therefore I don’t know why the error still occur: ‘’*** Chance
constraint without a random variable: E4(UU) ‘’
Additionally, in case of the problem will not be solved finally, I have
to propose some predictions about the impact of incorporating chance
constraints on my maximum objective function: final wealth.
Do you think release the hard constraint and use chance cosntraint will
increase my final wealth or decrease?
Are there any different influences on the final wealth if using Joint
chance constraints or individual chance constraints?
I have one more question about my ct(t): contribution rate at time t
because it is set as percentage of w (wage), i.e. it should be 1>= ctt
=0 therefore I define the equation as: Contributionpercentage(t)…
ct(t) =L= 1;
Note sure whether the eqaution is correct, because according to the
model resutls, my ct value in different period are always keep the same
as 1. Not so sure what happens about this?
Best wish
Paul
On Tuesday, August 20, 2013 9:31:38 AM UTC+1, Lutz Westermann wrote:
Paul,
Running your model I could reproduce the error. In the lst file error
778 is explained further:
**** The following EMP errors were detected in model sc:
**** 778 Unknown symbol el_1 in dimension three in scenario dictionary
The symbols you use in the third dimension of your set dict need to be
defined before. However, you use el_1, e2_l and e3_l in the set dict
but
define the parameters e_1, e_2 and e_3 before. If you use the latter in
set dict as well, error 778 will be resolved, but error 790 will pop
up:
**** The following EMP errors were detected in model sc:
**** 790 Symbolx E1 dimension mismatch
This comes again from the definition of your set dict:
e1 .level .e_1
The symbol e_1 needs to have the same indices as e1 (which you defined
as e1(l)) plus the scenario index in the beginning. So e_1 needs to be
defined as e1_l(scen,l) (and e_2 and e_3 likewise). After fixing this
the model can be generated but the solver creates an error:
*** Chance constraint without a random variable: E4(UU)
The reason is, that chance constraints as used in GAMS need to have at
least one random variable (otherwise the constraint is either feasible
for all scenarios or for none of it).
Please, have a look at the document "Stochastic Programming (SP) with
EMP" to find more information about chance constraints and Stochastic
Programming in GAMS in general. You can find it in your GAMS system
folder in the subfolder docs/solvers/empsp.pdf or here:
http://www.gams.com/dd/docs/solvers/empsp.pdf
.
I hope that helps!
Best regards,
Lutz
ps: A modified version of your model with the changes described
above is
attached.
On 8/19/2013 7:32 PM, msb...@mail.wbs.ac.uk wrote:
> Hello Everyone
>
> I'm currently working on a multi-stage stochastic programming for
> Pension Funds and use GAMs to solve it as a LP (linear programming)
> problem. Here I attached my basic version model
> ''BasicThreeStageForPensinFund'', which has already been proved
to work
> properly and you can try it as well.
> However since I'm going to replace the hard constraint within the
basic
> model with soft constraint, i.e. incorporating a chance
constraint, the
> model does not work and report an error as ''Unknown symbol in
position
> three in scenario dictionary'',
> 249 solve sc max Z use emp scenario dict;
> **** $778,257
>
> I also attach this version in this email titled by 'Basic with
chance
> constraint.gms'
>
> Thank you very much for your help
>
> Regards
> Paul
>
> --
> You received this message because you are subscribed to the Google
> Groups "gamsworld" group.
> To unsubscribe from this group and stop receiving emails from it,
send
> an email to gamsworld+...@googlegroups.com .
> To post to this group, send email to gams...@googlegroups.com
.
> Visit this group at http://groups.google.com/group/gamsworld
.
> For more options, visit https://groups.google.com/groups/opt_out
.
--
Lutz Westermann LWest...@gams.com
GAMS Development Corporation GAMS Software GmbH
1217 Potomac St. NW, P.O. Box 40 59
Washington DC, 20007, USA 50216 Frechen, Germany
Fon/Fax: +1 202 342-0180/1 Fon/Fax: +49 221 949-9170/1
http://www.gams.com
–
You received this message because you are subscribed to the Google
Groups “gamsworld” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.
–
Lutz Westermann LWest...@gams.com
GAMS Development Corporation GAMS Software GmbH
1217 Potomac St. NW, P.O. Box 40 59
Washington DC, 20007, USA 50216 Frechen, Germany
Fon/Fax: +1 202 342-0180/1 Fon/Fax: +49 221 949-9170/1
http://www.gams.com
–
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.