Pure Matlab Version:
====================

The pure Matlab version of the decision problem solver is in the
directory 'mfiles'.  Each function is well documented, and there is a
small demo ('gemv_demo') showing how to read and solve decision
problems.  A few example problems can be found in the directory
'models'.

To run the demo, go to the 'mfiles' directory and start Matlab (N.B.
It is important that Matlab is started from the correct directory.
Otherwise the functions for solving decision problems might not be
reachable from the Matlab prompt).  At the Matlab prompt, type
'gemv_demo'.  When prompted for a filename, specify a name for a file
containing a decision problem (e.g. '../models/nic.vdp').  Then
specify the parameter C.  This parameter specifies the penalty for
relaxing constraints when solving the decision problem.  Setting C to
0 makes all constraints hard (i.e. they cannot be relaxed), making it
impossible to solve a decision problem with inconsistent constraints.
When C has been specified, the decision problem is solved and
information about the solution is shown.

The documentation for each of the supplied functions is readily
available at the Matlab prompt.  For example, to read the
documentation for the function 'solve_problem', type 'help
solve_problem'.


File Format for Decision Problems:
==================================

First the alternatives are listed.  Each alternative must start with a
line consisting of a single 'A'.  On the following lines, the
consequences for the alternative are specified.  A consequence consist
of two lines with the following syntax:

    <PMIN> <PMAX> <PDIST>
    <UMIN> <UMAX> <UDIST>

The distributions can be functions of the variable 'x' using Matlab
syntax, or a single value to be used as the centroid of the belied
distribution.

After the alternatives, linear constraints may be specified.  This
section must start with a line consisting of a single 'C'.  On the
following lines constraints are specified using the following syntax:

    <constraint> :== [<sign>] <term list> <relation> [<sign>] <term list>
    <term list> :== <term> [<sign> <term list>]
    <term> :== <REAL> | [<REAL>] <variable>
    <variable> :== ('p' | 'u') <index>
    <index> :== <DIGIT> <DIGIT> | <INTEGER> ',' <INTEGER>
    <sign> :== '+' | '-'
    <relation> :== '<=' | '=' | '>='

The probability of the first consequence of the first alternative is
referred to as 'p11', and other variables in the same way.  If there
are more than 9 alternatives, or an alternative with more than 9
consequences, use a comma to separate the alternative and consequence
indexes.
