[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |

## 1.2 Model objects

In MathProg the model is described in terms of sets, parameters,
variables, constraints, and objectives, which are called *model
objects*.

The user introduces particular model objects using the language statements. Each model object is provided with a symbolic name that uniquely identifies the object and is intended for referencing purposes.

Model objects, including sets, can be multidimensional arrays built
over indexing sets. Formally, *n*-dimensional array *A* is the
mapping:

A: D -> X,

where D within
*S*1 x *S*2 x … x *Sn* is a
subset of the Cartesian product of indexing sets, X is a set of the
array members. In MathProg the set D is called *subscript domain*.
Its members are *n*-tuples
(*i*1, *i*2, …, *in*), where
*i*1 in *S*1, *i*2 in *S*2, …,
*in* in *Sn*.

If *n* = 0, the Cartesian product above has exactly one element
(namely, 0-tuple), so it is convenient to think scalar objects as
0-dimensional arrays which have one member.

The type of array members is determined by the type of corresponding model object as follows:

Model object

Array memberSet

Elemental plain set

Parameter

Number or symbol

Variable

Elemental variable

Constraint

Elemental constraint

Objective

Elemental objective

In order to refer to a particular object member the object should be
provided with subscripts. For example, if *a* is 2-dimensional
parameter built over
*I* x *J*,
a reference to its particular
member can be written as *a*[*i*, *j*], where
*i* in *I* and *j* in *J*.
It is understood that scalar objects being 0-dimensional need no
subscripts.