
26 1 Introduction and Examples
nonanticipativity constraints are the only constraints linking the separate scenarios.
Without them, the problem would decompose into a separate problem for each s ,
maintaining the structure of that problem.
In modeling terms, this simple additional constraint makes it relatively easy to
move from a deterministic model to a stochastic model of the same problem. This
ease of conversion can be especially useful in modeling languages. For example,
Figure 4 gives a complete AMPL (Fourer, Gay, and Kernighan [1993]) model of
the problem in (2.2). In this language, set, param,andvar are keywords for sets,
parameters, and variables. The addition of the scenario indicators and nonanticipa-
tivity constraints (nonanticip) are the only additions to a deterministic model.
# This problem describes a simple financial planning problem
# for financing college education
set investments; # different investment options
param initwealth; # initial holdings
param H; # number of periods
param scenarios; # number of scenarios (total S)
# The following 0-1 array shows which scenarios are combined at period H
param scen
links { 1..scenarios,1..scenarios,1..H } ;
param target; # target value G at time H
param invest; # value of investing beyond target value
param penalty; # penalty for not meeting target
param return { investments,1..scenarios,1..H } ; # return on each inv
param prob { 1..scenarios } ; # probability of each scenario
# variables
var amtinvest { investments,1..scenarios,1..H } ¿= 0; #actual amounts inv’d
var above
target { 1..scenarios } ¿= 0; # amt above final target
var below
target { 1..scenarios } ¿= 0; # amt below final target
# objective
maximize exp
value : sum { i in 1..scenarios } prob[i]*(invest*above target[i]
- penalty*below
target[i]);
# constraints
subject to budget { i in 1..scenarios } :
sum { kininvestments} (amtinvest[k,i,1]) = initwealth;#invest initial wealth
subject to nonanticip { k in investments,j in 1..scenarios,t in 1..H } :
(sum { i in 1..scenarios } scen
links[j,i,t]*prob[i]*amtinvest[k,i,t]) -
(sum { i in 1..scenarios } scen
links[j,i,t]*prob[i])*
amtinvest[k,j,H] = 0; # makes all investments nonanticipative
subject to balance { j in 1..scenarios, t in 1..H-1 } :
(sum { k in investments } return[k,j,t]*amtinvest[k,j,t]) - sum { kin
investments } amtinvest[k,j,t+1] = 0; # reinvest each time period
subject to scenario
value { j in 1..scenarios } :(sum{ kin
investments } return[k,j,H]*amtinvest[k,j,H]) - above
target[j] +
below
target[j] = target; # amounts not meeting target
Fig. 4 AMPL format of financial planning model.
Given the ease of this modeling effort, standard optimization procedures can be
simply applied to this problem. However, as we noted earlier, the number of sce-
narios can become extremely large. Standard methods may not be able to solve the
problem in any reasonable amount of time, necessitating other techniques. The re-
maining chapters in this book focus on these other methods and on procedures for
creating models that are amenable to those specialized techniques.
In financial problems, it is particularly worthwhile to try to exploit the underly-
ing structure of the problem without the nonanticipativity constraints. This relaxed