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: $$\begin{equation}A:\Delta\rightarrow\Xi,\tag{4}\end{equation}$$ where $\Delta\subseteq S_1\times S_2\times\dots\times S_n$ is a subset of the Cartesian product of indexing sets, $\Xi$ is a set of the array members. In MathProg the set $\Delta$ is called subscript domain. Its members are $n$-tuples $(i_1,i_2,\dots,i_n)$, where $i_1\in S_1, i_2\in S_2$, $\dots, i_n\in S_n$.

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 objectArray member
SetElemental plain set
ParameterNumber or symbol
VariableElemental variable
ConstraintElemental constraint
ObjectiveElemental 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\times J$, a reference to its particular member can be written as a[ij], where $i\in I$ and $j\in J$. It is understood that scalar objects being 0-dimensional need no subscripts.