GRMACRO is an EMME/2 macro which is used to generate a link data file, containing attribute values which later are to be converted to a grid subdivision by means of program GRLINK. The macro is called either from the main menu or from the primary select of module 2.41, using the following calling sequence:
~<grmacro
width var [var ] [var ] [var ]
The parameter width corresponds to the link width (in coordinate units) used for the link-to-grid conversion. It can be either a constant (e.g. ``0.01'') or any network expression (e.g. ``lanes*.005'').
Following the link width, up to four link attributes can be specified which are to be written to the link file.
If, e.g., .01 (=10 meters, if coordinates
are given in kilometers) is assumed as link width
and the emissions for carbon monoxide, nitrous oxides and hydrocarbons
have already been computed by the corresponding formulae and saved in
the extra link attributes @co
, @nox
and @hc
, the macro
would be called as follows
~<grmacro 0.01 @co @nox @hc
This macro will generate a batch output file which can be read directly by
GRLINK. Note that the name of the output file depends on the current
settings of the flexible file naming, which is set by the
menu command batchout=
. It is therefore up to the user to set
the output file name correctly, and make sure that the output file is empty,
before calling GRMACRO. Due to the nature of the output generated by
module 2.41, the link data file will contain, in addition to the specified
link attributes, also the total of all attributes, labeled ``result
''.
The dialog for the selection of the subset of links is not answered directly by the macro, but is passed through to the terminal. Thus, the set of links to be processed can be chosen freely by the user.
If the macro is started at the main menu, the user is prompted to enter the name of the link data file to be generated. Note that this file must not already exist or it must be empty, since otherwise the link data information is appended to the end of the file.
As mentioned above, it is possible to start GRMACRO directly from the primary
select of module 2.41. This makes it possible to compute link attributes into
temporary link attributes tmpl
n (which are lost when module
2.41 is left) and call GRMACRO directly afterwards. If doing so, please
note that tmpl9
is used by GRMACRO to store the link widths. Thus, it
should not be used as one of the calling parameters. If the macro is started
from module 2.41, the output is sent to the batch output file, as defined
by the current setting of the batchout=
menu command.