M o d e l e a s y +  
 

Performance For the Future

 
 

 

   

Modeleasy+ 5.2 Enhancements

This page will describe the enhancements that have been made to Modeleasy+ in Release 5.2. 

The 5.2 release of Modeleasy+ has two major enhancements that are described below in some detail along with examples of the use of these enhancements. The major enhancement to the environment is the addition of a long names facility which allows variables to have names of up to 200 characters. A new feature has been added to the simulation of models which allows the user to place bounds on variables during the solution process. These Release 5.2 enhancements are described in the sections below.

Long Names

A new facility, referred to as "long names", has been introduced in Modeleasy+ 5.2. This facility allows the user to define variables with names of up to 200 characters, thus removing the old limitation of 8 character variable names. In order to be compatible with previous releases, Modeleasy+ 5.2 is being distributed with the long name facility turned off. When operating in this mode, names are truncated to 8 characters no matter how many characters the user types. The example below shows the name ABC_LONGNAME being truncated to the 8 character name ABC_LONG.

:_abc_longname = 2
:_names
ABC_LONG

In order to define variable names longer than 8 characters, the user must first turn the long name facility on by using the LONGNAMES command. This may be automated by placing the LONGNAMES command into the START.USE file used when Modeleasy+ is started. When long names have been turned on, then variables may have a name up to 200 characters in length as shown below.

:_longnames on
:_abc_longname = 1.23
:_names
ABC_LONG, ABC_LONGNAME

A variable name is determined to be a long name if three tests are passed:

long names are turned on;
the variable name contains more than 8 characters;
the variable name contains the "trigger" character.

The trigger character is determined when long names are turned on with the default being the underscore character, "_". The user may set the trigger character to be any character by specifying the desired character in the LONGNAMES command. Care should be taken when choosing a trigger character, because some characters, such as the decimal point, ".", have special meanings which may be disabled. The example below shows this.

:_a = 2
:_b = 3
:_a.eq.b
A.EQ.B = 0
:_longnames "."
:_a.eq.b
A.EQ.B is not defined IN LINE "A.EQ.B"

When choosing the decimal point as the trigger character, operations such as .EQ. become part of the variable name and so A.EQ.B in the above example becomes the name of an undefined variable. In order to recover the .EQ. operation, it becomes necessary to put spaces around it when the trigger character is "." as shown below.

:_a .eq. b
A .EQ. B = 0

One other caveat about the use of long names is in order. If long names are defined during a session and then long names are turned off, then the long names will not be accessible even though they appear in the list of names.

:_longnames on
:_a_longname = 1
:_longnames off
:_names
A_LONGNAME
:_a_longname
A_LONGNA is not defined IN LINE "A_LONGNAME"

The name A_LONGNAME in the above example becomes inaccessible after long names are turned off because the name entered gets truncated to 8 characters.

The addition of the long names facility to the Modeleasy+ environment will greatly enhance the user's ability to name variables in a meaningful way.

Top

Bound on Variables

A new simulation capability has been introduced in Modeleasy+ 5.2. This capability allows the user to specify bounds on a variable and how the variable should be treated if a bound has been exceeded during the solution process. The BUILDMODEL command now has an option, BOUNDED, which allows the user to specify that one or more variables may be subject to bounds during the simulation of the model. The bounds on the variables may be specified using the SIMOPTION command with the BOUNDS keyword.

The example below shows the use of the BUILDMODEL command specifying that the variable W1 may be bounded during the simulation process.

:_buildmod klein1 : bounded w1

More than one variable may be specified by using either a list of names following the BOUNDED keyword or a namelist containing the list of names.

The actual simulation of the Klein1 model is shown below when no bounds have been specified. Most of the output from the SIMULATE command has been surpressed for the sake of clarity.

:_simulate klein1 : print
*Linkule SIMULATE. Version 12/29/2000*

WARNING: No BOUND set on endogenous variables.

The message appearing in the above example indicates that no bounds have been set for W1 during the simulation. The actual and simulated results for W1 (SW1) are shown in the table below.

:_tabit w1 sw1

+------+------+--------+
| YEAR | W1   | SW1    |
+------+------+--------+
| 1925 | 35.4 | 35.279 |
| 1926 | 37.4 | 33.3 |
| 1927 | 37.9 | 30.603 |
| 1928 | 39.2 | 32.343 |
| 1929 | 41.3 | 37.723 |
| 1930 | 37.9 | 40.184 |
| 1931 | 34.5 | 39.122 |
| 1932 | 29   | 35.192 |
| 1933 | 28.5 | 32.452 |
| 1934 | 30.6 | 33.093 |
| 1935 | 33.2 | 34.532 |
+------+------+--------+

The variable W1 may be bounded by using the SIMOPTION command as shown below where the simulated values of the variable W1 are required to lie between 20 and 35.

:_simoption bounds : w1 20 35

The model may be simulated again with the simulated value of W1 restricted to 35. This is shown below where warning messages are issued when the simulated value of W1 exceeds the bound. Most of the output of the simulation has been supressed for the sake of clarity.

:_simulate klein1 : print
*Linkule SIMULATE. Version 12/29/2000*
Bounds set for 1 endogenous variable(s).
*Subroutine T4SIMS. Version 12/29/2000*
"DYNAMIC" simulation
TSRANGE: 1925 1 TO 1935 1
Actual number of simulation periods = 11 on a maximum of 24
*** WARNING : In iteration 1 of time period 1,
the variable W1 exceeded the specified bounds.
Its value has been set to the maximum allowed.
        ...

The default action to be taken when one of the bounds is exceed is to replace the simulated value by the bound value. This can be seen in the table below where the actual value of W1 is tabulated with the simulated value, SW1.

:_tabit w1 sw1

+------+------+--------+
| YEAR | W1   | SW1    |
+------+------+--------+
| 1925 | 35.4 | 35     |
| 1926 | 37.4 | 33.384 |
| 1927 | 37.9 | 30.704 |
| 1928 | 39.2 | 32.361 |
| 1929 | 41.3 | 35     |
| 1930 | 37.9 | 35     |
| 1931 | 34.5 | 35     |
| 1932 | 29   | 35     |
| 1933 | 28.5 | 35     |
| 1934 | 30.6 | 33.17  |
| 1935 | 33.2 | 30.522 |
+------+------+--------+

As can be seen in the table above, when SW1 has exceed the upper bound of 35, its value has been replaced with the upper bound. There is another option of SIMOPTION which allows the value of the simulated variable to be replaced by the last feasible value when a bound has been exceed. This is done by using the command shown below.

:_simoption bounds previous : w1 20 35

Redoing the simulation above and tabulating the results produces the table shown below.

:_tabit w1 sw1

+------+------+--------+
| YEAR | W1   | SW1    |
+------+------+--------+
| 1925 | 35.4 | 34.957 |
| 1926 | 37.4 | 33.394 |
| 1927 | 37.9 | 30.718 |
| 1928 | 39.2 | 32.364 |
| 1929 | 41.3 | 32.364 |
| 1930 | 37.9 | 32.364 |
| 1931 | 34.5 | 34.805 |
| 1932 | 29   | 34.153 |
| 1933 | 28.5 | 34.906 |
| 1934 | 30.6 | 33.056 |
| 1935 | 33.2 | 28.478 |
+------+------+--------+

As can be seen in the above table, the simulated values obtained for W1 are different, as expected.

The ability of the user to control the values of variables during the simulation process greatly enhances the capabilities of the solution process.

Top

 

 

Ready to Order?  Click here
Not able to find what you're looking for?  Try our sitemap
SAMPLE SESSION | Free Trial | VERSIONS | Downloads
Problem? | Speakeasy | Utilities | Search

R E A C H   U S

Phone  Fax  Email
+1 352 688 7622   +1 352 688 7610  info@modeleasy.com

For questions or comments on this Website contact

For sales information, send email to

For technical support, send email to