next up previous
Next: 3.1.2 Fortran Names Up: 3.1 Introduction to the Previous: 3.1 Introduction to the

3.1.1 Names

One of the positive features of the MPS standard is the ability to give meaningful names to problem constraints and variables. As our proposal is intended to be MPS compatible, we too have this option. However, one of the less convenient features of the MPS standard is the cumbersome way that repetitious structure is handled. In particular, the name of each variable and constraint must be defined on a separate line, and structure within constraints is effectively ignored when setting up the constraint matrix. We consider it important to overcome this deficiency of the MPS standard when formulating large-scale examples. One way is to allow variable, group and nonlinear element names to have indices and to have syntactic devices which enable the user to define many items at once.

Unless otherwise indicated, we allow any name which uses up to ten valid characters. A valid character is any ASCII character whose decimal code lies in the range 32 to 126 (binary 0100000 to 11111110, hex 20 to 7E) (see, for instance [17]). This includes lower and upper case roman alphabetic characters, the digits 0 to 9, the blank character and other mathematical and grammatical symbols. A name can be one of the following:

  1. a scalar name of the form ££££££££££ where each £ is a valid character type excepting that the first £ cannot be a $. A completely blank string is also not allowed. Futhermore, the strings 'SCALE', 'MARKER', 'DEFAULT', 'INTEGER' and 'ZERO-ONE' are reserved for special operations.
  2. an array name of the form name(index), where index is a list of integer index names, name is a list of valid characters (the first character may not be a $) and the maximum possible size of the expanded name does not exceed ten characters. The list of index names must be of the form list1, list2, list3, where list1, list2 and list3 are predefined index (parameter) names (see Section 3.2.3, below) and all three indices are optional. The indices are only allowed to take on integer values. Commas are only required as separators; the presence of an open bracket ``('' announces a list of indices and a close bracket ``)'' terminates the list. An array name is expanded as namenumber1, number2, number3, where numberi, i = 1, 2, 3 is the integer value allocated to the index listi at the time of use.

As an example, the expanded form of the array name X(I,J,K) when I, J and K have the values 3, 4 and 6 respectively would be X3,4,6, while it would take the form X-6,0,3 if I, J and K have the values -6, 0 and 3 respectively. However, X(I,J,K) could not be expanded if I, J and K were each allowed to be as large as 100 as, for instance, X100,100,100 is over ten characters long and thus not a valid expanded name.

An array item may be referred to by either its array name (so long as the index lists have been specified) or by its expanded name. Thus, if I, J and K have been specified as 2, 7 and 9 respectively, X(I,J,K) and X2,7,9 are identical.

If two separators (opening or closing brackets and commas) are adjacent in an array name, the intervening index is deemed not to exist and is ignored when the name is expanded. Thus, the expanded name of Y() is just Y, while that of Z(I,,K) is Z3,4 if I is 3 and K is 4. Furthermore, any name which does not include the characters ``('', ``)'' or ``,'' may be used as an array name and is its own expanded name. Thus the name X may be a scalar or array name whereas W( and V, can only be scalar names.

We defer the definition of integer indices until Section 3.2.3.

Note that blanks are considered to be significant characters. Thus if $_{-}$ denotes a blank, the names $_{-}$x and x$_{-}$ are different. It is recommended that all names are left-shifted within their relevant data fields to avoid possible user-instigated name recognition errors.

next up previous
Next: 3.1.2 Fortran Names Up: 3.1 Introduction to the Previous: 3.1 Introduction to the