Deprecated Language Elements
The current implementation of AIMMS supports the following deprecated
features, but it may cease to do so in a future implementation. The
current implementation does so to support converted GAMS
and AIMMS 2
applications.
Deprecated Keywords
The keywords for which direct replacements are available are documented in Table 1.
Deprecated |
Modern equivalent |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The Deprecated Keyword abort
The keyword abort
is a GAMS keyword that can be followed by a
condition and a list of identifiers to be displayed. The execution run
is interrupted after executing this statement. Suggested rewrite: use a
display
statement followed by a halt
statement or a
raise error
statement. See also
display
(see The DISPLAY Statement of the Language Reference),halt
(see The HALT Statement of the Language Reference) andraise error
(see Raising Errors and Warnings of the Language Reference).
The Deprecated Keywords yes
and no
The keywords yes
and no
are GAMS keywords that can be used in
assignments to sets in order to add or remove elements. Suggested
rewrite: use the AIMMS set syntax. For instance, replace
s1(i) $ cond1(i) := yes ;
s2(i) $ cond2(i) := no ;
by the following code:
s1 += { i | cond1(i) } ;
s2 -= { i | cond2(i) } ;
The Deprecated Keyword system
The GAMS keyword system
is followed by a suffix. The AIMMS language
supports the following equivalent code for selected system
suffixes
as documented in Table Table 2.
Deprecated |
Modern equivalent |
---|---|
|
|
|
|
|
|
|
|
The system suffixes .ifile
, .ofile
, .rdate
, .rfile
,
.rtime
, .sfile
, and .title
are pointless within the AIMMS
environment.
Deprecated Intrinsic Procedures and Functions
The mapping of the matrix manipulation procedures to GMP procedures and functions is documented in Matrix Manipulation Procedures of the Language Reference. The following intrinsic functions are deprecated, but can be replaced by an equivalent call to an existing intrinsic procedure or function:
FindRString( SearchString, Key, CaseSensitive, WordOnly, IgnoreWhite)
can be replaced by a call toFindNthString( SearchString, Key, -1, CaseSensitive, WordOnly, IgnoreWhite)
where-1
indicates that searching should be done right to left, see alsoFindNthString
.One may replace
SQLDirect
withDirectSQL
One may replace
StringToLabel
withStringToElement
The deprecated iterative operators are documented in Table 3.
Deprecated |
Modern equivalent |
---|---|
|
|
|
|
|
|
Deprecated Suffixes
Deprecated |
Modern equivalent |
---|---|
Variables |
|
|
|
|
|
|
|
|
|
|
|
Files |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mathematical programs |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Most deprecated suffixes can be directly translated into their modern equivalents, as documented in Table 4. The following suffixes deserve some more consideration:
.ap
The append mode of a file, 0: replace contents when opening the file, 1: append to file. This functionality is now covered by themode
attribute of that file, see The File Declaration of the Language Reference..m
The marginal value of a variable or constraint. For a constraint the suffix.m
should be replaced by the suffix.ShadowPrice
. For a variable the suffix.m
should be replaced by the suffix.ReducedCost
..modelstat
This suffix of a mathematical program is numeric, it should be replaced by the element valued suffix.ProgramStatus
. Note thatElement( AllSolutionStates, mp.solvestat+1 ) = mp.ProgramStatus
. See also Mathematical program and solver status of the Language Reference andAllSolutionStates
..solvestat
or.solverstat
These suffixes of a mathematical program are numeric, they should be replaced by the element valued suffix.SolverStatus
. Note thatElement( AllSolutionStates, mp.solvestat+15 ) = mp.SolverStatus
. See also Mathematical program and solver status of the Language Reference andAllSolutionStates
..dim
This should be replaced by a call toIdentifierDimension
..txt
This should be replaced by a call toIdentifierText
..type
This should be replaced by a call toIdentifierType
.