AspenOOMFV10 ScriptLanguageReferenceManual
AspenOOMFV10 ScriptLanguageReferenceManual
Aspen OOMF, aspenONE, the aspen leaf logo and Plantelligence and Enterprise Optimization are trademarks or
registered trademarks of Aspen Technology, Inc., Bedford, MA.
All other brand and product names are trademarks or registered trademarks of their respective companies.
This document is intended as a guide to using AspenTech's software. This documentation contains AspenTech
proprietary and confidential information and may not be disclosed, used, or copied without the prior consent of
AspenTech or as set forth in the applicable license agreement. Users are solely responsible for the proper use of
the software and the application of the results obtained.
Although AspenTech has tested the software and reviewed the documentation, the sole warranty for the software
may be found in the applicable license agreement between AspenTech and the user. ASPENTECH MAKES NO
WARRANTY OR REPRESENTATION, EITHER EXPRESSED OR IMPLIED, WITH RESPECT TO THIS DOCUMENTATION,
ITS QUALITY, PERFORMANCE, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
Contents iii
FOR-DO Command ............................................................................... 36
WHILE-DO Command ........................................................................... 37
Examples of Program Flow Control ......................................................... 37
Expressions and Conditionals ........................................................................... 39
Examples of Math Functions .................................................................. 42
Examples of String Functions ................................................................. 43
Examples of Relational and Logical Functions........................................... 44
Examples of File Functions .................................................................... 44
Examples of List Functions .................................................................... 45
Examples of Query Functions ................................................................. 45
Examples of Miscellaneous Functions ...................................................... 46
Examples of Effects of Units of Measure .................................................. 46
Examples Using String Functions to Create Variable Names ....................... 47
Wildcards ...................................................................................................... 48
Glob-Style Wildcards ............................................................................ 48
Regular Expression Matching ................................................................. 48
Examples of Wildcards .......................................................................... 49
General Commands ........................................................................................ 51
Getting Help ........................................................................................ 51
Exiting the System ............................................................................... 51
Executing System Commands ................................................................ 51
Timer.................................................................................................. 51
OOMF Model Adapters..................................................................................... 52
iv Contents
Printing Variables Fixed in the Current Mode............................................ 70
Printing Variables Fixed in Other Modes .................................................. 70
Printing Variables with Active Bounds ..................................................... 71
Printing Largest Variable Shadow Prices .................................................. 71
Printing Variables Using a Query ............................................................ 72
Examples of Variable Commands............................................................ 73
Alias Commands ............................................................................................ 74
Printing Aliases .................................................................................... 74
Printing Alias Values ............................................................................. 74
Printing Alias Variables.......................................................................... 75
Equation Commands....................................................................................... 76
Excluding Equations.............................................................................. 76
Including Equations .............................................................................. 76
Evaluating Equations ............................................................................ 76
Printing Equations ................................................................................ 77
Printing Largest Residuals ..................................................................... 77
Printing Largest Residual Shadow Prices.................................................. 78
5 Measurements ...................................................................................................91
Measurement Commands ................................................................................ 91
Checking Measurements ....................................................................... 91
Disabling Measurements ....................................................................... 92
Enabling Measurements ........................................................................ 92
Printing Measurements ......................................................................... 93
Printing Measurement Variables ............................................................. 93
Examples of Measurement Commands .................................................... 93
Contents v
Measurement Qualities.................................................................................... 96
Disabling Simple Measured-Parameterized Pairs....................................... 97
Disabling Measured-Parameterized Pairs in Specification Groups ................ 97
Enabling Specification Groups ................................................................ 98
Executing the Variable Quality Capability................................................. 98
Examples of Measurement Qualities........................................................ 98
7 Objective Functions.........................................................................................119
Objective Function Commands ....................................................................... 119
Changing Objective Function Attributes................................................. 119
Evaluating the Objective Function ........................................................ 120
Evaluating the Objective Function’s Derivatives...................................... 120
Evaluating the Objective Function’s Hessian .......................................... 120
Printing the Objective Function ............................................................ 121
Jacobian and Derivative Commands................................................................ 121
Analyzing the Jacobian........................................................................ 121
Analyzing the Jacobian Sparsity ........................................................... 121
Evaluating the Jacobian ...................................................................... 122
Printing the Jacobian .......................................................................... 122
Printing Jacobian Variables .................................................................. 122
Printing Jacobian Equations ................................................................. 123
Printing Block Derivative Methods......................................................... 123
Examples Of Derivative Commands ...................................................... 123
vi Contents
8 Analysis...........................................................................................................125
Analysis Commands...................................................................................... 125
Checking Degrees of Freedom.............................................................. 125
Sensitivity Analysis............................................................................. 125
Analyzing Variables ............................................................................ 126
Analyzing Equations ........................................................................... 127
Examples of Analysis Commands.......................................................... 127
Solver Commands ........................................................................................ 129
Setting the Solver .............................................................................. 129
Viewing Solver Settings ...................................................................... 129
Entering DMO Parameters ................................................................... 129
Entering LSSQP Parameters................................................................. 131
Entering NSOLVE Parameters............................................................... 136
Solving the Problem ........................................................................... 137
Examples of Solver Commands ............................................................ 137
Recovery Commands .................................................................................... 138
Resetting Variables to Initial Values...................................................... 138
Contents vii
Deleting a snapshot............................................................................ 149
Task Language............................................................................................. 150
XML Schema for Task Language ........................................................... 150
Example Tasks................................................................................... 155
12 Global Structures...........................................................................................179
Overview..................................................................................................... 179
Example...................................................................................................... 180
viii Contents
Recovery Commands .................................................................................... 192
Recovery........................................................................................... 192
Report Commands........................................................................................ 193
Reporting Everything .......................................................................... 193
Reporting the Flowsheet...................................................................... 193
Reporting Streams ............................................................................. 193
Index ..................................................................................................................201
Contents ix
x Contents
Who Should Read this Guide
This manual is intended for users of the stand-alone OOMF core component or
users of the equation-oriented capabilities of products, such as Aspen Plus,
that embed OOMF. Typically, users write scripts to manipulate the simulation
data. Note that such scripts are not necessary for normal operations of
products that embed OOMF. However, these scripts may be used to extend
the capabilities of these products or to analyze the current simulation.
OOMF is embedded within several AspenTech products such as Aspen Plus,
Aspen HYSYS Refining, Aspen Advisor, Aspen PIMS, Aspen Water, Aspen
HYSYS to host models exported from Aspen Custom Modeler, Aspen MBO etc.
Some of these products have extended the capabilities of the OOMF scripting
language. These product specific extensions may be found in separate
sections at the end of this document.
Introduction
This document describes the script language used by the OOMF kernel – the
engine behind the EO strategy in products such as Aspen Plus. These script
commands may be typed at the command line or entered into script files or
input forms.
The script language is very effective for tasks such as:
Debugging an equation-oriented run.
Defining sets of process values.
Setting the inclusion status of blocks, measurements, etc.
Creating custom reports.
The script language has many features of an advanced programming
language, such as mathematical and string functions, if-then-else logic, and
for-do loops.
Defining Scripts
Scripts may be defined in the following ways:
An external file that may be created with a standard text editor. The
extension of the file should be EBS.
Products using OOMF may define additional ways to create scripts.
Executing Scripts
Scripts may be executed in a number of ways:
By manually executing the script from the command line or from another
script. This may be done with the INVOKE command.
By associating the script with a block or the flowsheet. This is done by
assigning the script as a method attached to the block. A method is a
function that is called at specific times during the execution sequence of
OOMF. The following methods are available:
INIT This method is executed when the block is created and is available for
all blocks except hierarchies.
PRESOLVE This method is executed before a solve is started. It can be very useful
for defining run-specific information, such as process data.
POSTSOLVE This method is executed after a solve is completed. This is useful for
checking the results of the run and writing customized reports.
The script that is assigned as the block method may be an external file.
You may also manually execute a block’s script method with the INVOKE
command.
More on invoking scripts may be found in Invoke Commands.
Note: Some products using OOMF may have their own methods of entering
scripts which may have additional syntax restrictions. See the chapters for
individual products at the end of this manual for details.
Related Documentation
Title Content
Command Summary
Below is a list of the script commands. This list may be displayed from the
kernel with the HELP command.
EO Commands
Command Purpose
1 Script Commands 9
Command Purpose
CHECK CONNECTIONS Analyze all connections and connection groups. Report status and any
inconsistencies.
CHECK MEASUREMENT Print a report showing measurements that have not activated
correctly.
COMPARE VARFILE Compare database with current values
CONDITIONAL EQUATION Define conditional equations
CONNECTION Define or show variable and port connections
DELETE BLOCKS Delete blocks from the current scope
DELETE PORTS Delete ports from the current scope
DELETE SNAPSHOT Delete a specified snapshot
DELETE TASK Delete a task that has been loaded
DERIVATIVE Show the derivative method for all blocks in the current scope
DISABLE CONNECTION Disable any connection whose name matches a list of name
expressions.
DISABLE MEASUREMENT Disable any measurement whose name matches a list of name
expressions.
DISABLE SPECIFICATION Disable any specification group whose name matches a list of name
GROUPS expressions.
ECHO Print a value
ENABLE CONNECTION Enable any connection whose name matches a list of name
expressions.
ENABLE MEASUREMENT Enable any measurement whose name matches a list of name
expressions.
ENABLE SPECIFICATION Enable any specification group whose name matches a list of name
GROUPS expressions.
EVALUATE EQUATIONS Evaluate the equations
EVALUATE JACOBIAN Evaluate the Jacobian
EVALUATE OBJECTIVE HESSIAN Display the diagonal of the Hessian
EVALUATE OBJECTIVE Evaluate and display the value
EVALUATE OBJECTIVE Evaluate and display the derivative
DERIVATIVE
EVALUATE RESIDUALS Evaluate the equations
EXCLUDE BLOCKS Exclude a block
EXPOSE PORT Expose a port contained within the current scope to the block which
FIND BLOCK Search the block hierarchy for a block
FIX STREAMS Fix the named streams
FLUSH Flush all the indicated devices
FREE PROP DATA Initialize Aspen Properties and free an aprpdf file
FREE STREAMS Free the named streams
HOMOTOPY PARAMETERS Show or Set the list of variables, the appropriate target values, and, if
necessary, the appropriate initial values that should be used as
parameters, parameter targets, and parameter initial values by the
10parsity solver.
IDENTIFY LIBRARY Ask a loaded library to give its version
INACTIVATE VARIABLE Inactivate a variable profile
PROFILE
10 1 Script Commands
Command Purpose
1 Script Commands 11
Command Purpose
PRINT INACTIVE CONNECTIONS Print any inactive connection whose name matches a list of name
expressions.
PRINT INACTIVE SPECIFICATION Print any inactive specification group whose name matches a list of
GROUPS name expressions.
PRINT INCLUDED BLOCKS Print all blocks in the current scope and child containers that are
currently included
PRINT INCOMPLETE Print the list of connections that are incomplete. Incomplete
CONNECTIONS connections
PRINT JACOBIAN Print the Jacobian (matrix for first derivatives)
PRINT JACOBIAN EQUATIONS Print the Jacobian for certain equations
PRINT JACOBIAN VARIABLES Print the Jacobian for certain variables
PRINT LARGEST EQUATION Show the largest equation shadow prices
SCALED_SHADOW_PRICES
PRINT LARGEST EQUATION Show the largest equation shadow prices
SHADOW_PRICES
PRINT LARGEST EQUATIONS Show the largest residuals
PRINT LARGEST RESIDUAL Show the largest residual shadow prices
SCALED_SHADOW_PRICES
PRINT LARGEST RESIDUAL Show the largest residual shadow prices
SHADOW_PRICES
PRINT LARGEST RESIDUALS Show the largest residuals
PRINT LARGEST VARIABLE Show the largest variable shadow prices in scaled SI
SHADOW_PRICES SSI
PRINT LARGEST VARIABLE Show the largest variable shadow prices in user units
SHADOW_PRICES
PRINT MEASUREMENTS Report on all or specified variable measurements.
PRINT MEASUREMENTS Report the measurements that reference the specified variables
VARIABLES
PRINT OBJECTIVE Display an objective function
PRINT QUERY Print the attributes of variables that satisfy a query string.
PRINT RESIDUALS Print a report for equations
PRINT SCOPE Output the scope stack
PRINT SOLVERS List the currently loaded solvers
PRINT SPECIFICATION GROUP Print any specification group whose name matches a list of name
expressions.
PRINT SPECIFICATION GROUP Print the specification group name that references the specified
VARIABLES variables
PRINT SPECIFICATIONS List variables that have a spec type other than Calc
PRINT SUMMARY Summarize the state of the kernel
PRINT TIMER Print the timer
PRINT VARIABLES Print a report for variables
PRINT VARIABLES Print a report for variable connections
CONNECTIONS
PRINT VARIABLE HISTORY Compute a variable’s history and print it
PRINT VARIABLE PROFILE Print a variable profile
PRINT VARIABLES SSI Print a report for variables in scaled SI
12 1 Script Commands
Command Purpose
1 Script Commands 13
Command Purpose
STOP Stop the dynamic simulation and exit dynamic interactive mode
STOP TIMER Stop the timer
SUM SQUARES OBJECTIVE Define an objective function
SWAP PROPERTY Swap the Aspen Properties property method or option set
SYMBOLIC OBJECTIVE Define an objective function
SYSTEM Have the operating system execute a command
TOGGLE SOLVE SCOPE Changes the status of any connections and spec groups that cross the
current scope boundary
UNLOAD LIBRARY Unload a previously loaded library
UNPROCESS VARIABLE QUALITY Undo the effect of &BAD_STATUS_LIST and measurement
UNSET Undefine a set of parameters
UPDATE VARIABLES Update binary variable file from the current variable vector
WRITE BLOCK Save the specified block to the named XML file
WRITE BLOCK ATTRIBUTES Write the list of block attributes to a specified file
WRITE SIMULATION Save the simulation to the specified XML file
WRITE SNAPSHOT Write the list of block attributes and variables to a specified file
WRITE VARFILE Write a database of variable information
WRITE VARFILE EXCEPT Write a database of variable information
See Also
Aspen Plus Extensions - Command Summary
Aspen Custom Modeler Extensions - Adding an ACM Model to OOMF
Aspen HYSYS Refining Extensions - Command Summary
For these commands, arguments should be separated by commas. Many of
these commands support output redirection by adding TO followed by an
output device specification. Additional help may be available for these
commands by typing help followed by the commands full name.
Commands above that support regular expressions can understand GLOB or
REGEXP style regular expressions. Commands listed below (except
assignment) do not support GLOB.
Additional Commands
ADD UOM {uom1} = (multiplier * ){uom2} ([+ | -] offset)
BREAK
CONTINUE
EXIT
IF, FOR, and WHILE blocks
HELP [command name]
PRINT uom(s) [ list_of_uom_specs | for list_of_physical_types]
QUIT
SET paramname = expression
LOCAL paramname [= expression] [, paramname …]
RETURN [expression]
14 1 Script Commands
Assignments
variableId[.lower | .upper | .step | .scale | .bound | .spec | .sbweight] = expression
variableId(.uom) = { uom }
variableId(.spec) = const | calc | meas | param | optim | recon | indep(endent) | fixed
| free
variableId(.bound) = hard | relaxed | soft
blockId(.deriv_method) = analytic | numeric | update_numeric | update_analytic
blockId(.nlratiodev) = real
blockId(.zerotol) = real
blockId(.move) = TRUE | FALSE
blockId(.moveamount) = real
blockId(.pert) = real
blockId(.included) = expression
blockId.streamId.str.spec = const | calc | meas | param | optim | recon |
indep(endent) | fixed | free
blockId.streamId.str.phase = unknown | liquid | vapor | vl | vlf
objId.direction = MAXIMIZE | MINIMIZE
objId.scale = expression
objId.uom = { uom }
equationId(.included) = TRUE | FALSE | 15parsit expression
regexp = expression
Notes
expression may be any of:
number
1 Script Commands 15
"a quoted string"
regexp
TRUE, FALSE, ON, or OFF
identifier
&identifier
variable_attribute
expression + expression
expression – expression
expression * expression
expression / expression
expression ^ expression
expression OR expression
expression AND expression
expression . expression
expression relop expression
( expression )
op ( expression )
– expression
NOT expression
number is any of the following:
integer
real
integer { uom }
real { uom }
integer { $ / uom }
real { $ / uom }
real {si}
real {ssi}
real {*}
where uom is a valid unit (see section on Unit of Measure and Physical Types)
num_or_param is one of:
number
&identifier
relop is any of these relational operators: < > = <> <= >=
vmaskElem is any of:
Name physical_type lower value
Upper scale units spec
Step sbweight shadow active
vmask is [ list_of_vmaskElem ]
op is any of:
16 1 Script Commands
abs loge log10
cos sin tan
exp defined head
tail string2id id2string
OpenFile OpenBinary DeviceInfo
OpenTee ToLower ToUpper
BlockVars QueryVars Int
Val TypeOf AliasesByVar
ConnectionsByVar MeasurementsByVar SpecGroupsByVar
ActiveConn InActiveConn ActiveSpecGroup
InActiveSpecGroup ActiveMeas InActiveMeas
BlockAttrs PortVars QuerySpecGroups
regexp is % regular_expression %
You can use echo to examine the value of block attributes, equation residuals
and attributes, and variable values and attributes. For example:
echo blkname.deriv_method
echo variable_name.spec
WHILE <expression> DO
list_commands
ENDWHILE
1 Script Commands 17
Predefined Script Parameters
Parameter Description
18 1 Script Commands
Parameter Description
1 Script Commands 19
20 1 Script Commands
2 OOMF Script Language
Basics
Input Language
command TO device
Input Language
SET REPORT_DEVICE = device
Input Language
SET HISTORY_DEVICE = device
Input Language
FLUSH
PRINT FLUSHING device
CHANGE FLUSHING device, level
Journaling
A parameter is available to create a journal of all the commands you type at
the console or are invoked in script files. This parameter is called
JOURNAL_DEVICE and may be displayed with the ECHO command and
changed with the SET command. This output can be directed to a file and/or
the terminal. You turn it off by directing it NOWHERE.
A parameter is available to control the level of invoke commands that will be
journaled. This parameter is called JOURNAL_LEVEL and may be displayed
with the ECHO command and changed with the SET command. A value of 0
will journal only the topmost level of commands. A value of 1 will journal the
top two levels of commands. A value of 99999 will journal all levels.
The journal file starts with a comment (using //) indicating the build number
and build date of the executable being run followed by the current date, time
and journal status. Each command executed is added to the journal file
followed by a time-stamp comment. The journal file is designed so that it may
be run like any other script file, i.e. with the INVOKE command.
Input Language
ECHO &REPORT_DEVICE
ECHO &HISTORY_DEVICE
ECHO &JOURNAL_DEVICE
REPORT_DEVICE Destination where output from the PRINT and REPORT commands are to
be directed. Use ECHO &REPORT_DEVICE to examine the current value.
device defaults to TERMINAL but may be any of the following:
TERMINAL NOWHERE OPENFILE OPENTEE
See the section Redirecting the Output of a Command for details on
these options.
RESTORE_STATE Indicates whether or not to restore variable state for existing
user blocks that are re-initialized when a new block is added to the problem
matrix. Only blocks that have a matrix precedence higher than the
block being added are affected by this parameter (default = FALSE).
RUN_MODE Run mode for a simulation. The options are SS (for steady-state
simulations), INIT (for initialization simulations) and DYN (for dynamic
simulations). The default value is SS. (The INT and DYN run modes are only
relevant to dynamic models.).
SCRIPT_PATH Semicolon separated list of directories that are searched left to right if a
specified script cannot be found. (default = undefined).
SOFT_BOUND Flag for soft bounds (default = TRUE).
STEP_BOUND Flag for step bounds (default = TRUE).
UOM_WIDTH Width of the units field in the PRINT commands, such as PRINT
VARIABLES, PRINT ALIAS, PRINT FIXED and WRITE VARFILE (default
= 8).
WRITE_VARFILE_MASK Default variable mask used for the WRITE VARFILE command (default =
[NAME, UNITS, VALUE, INIT, CHANGE, LOWER, UPPER, STEP,
BOUND, SPEC, SSPEC, SCALE, SBWEIGHT, RLOWER, RUPPER])
Input Language
SET parameter = expression
LOCAL parameter = expression
Input Language
UNSET parameter
Note: If the file argument is the same as a block ID, problem ID, or the word
PLANT, then the command may be interpreted as an attempt to invoke a
block script or plant-level script. To avoid this, use names for external files
that do not conflict with these IDs.
Input Language
INVOKE file, arg1, arg2, …
Input Language
INVOKE blockid, method, arg1, arg2, …
Input Language
SCOPE INVOKE blockid, method
Script Arguments
Scripts may have arguments passed to them and may return a single
argument. The arguments are passed with the INVOKE command:
INVOKE file, arg1, arg2, …
These may be referenced in the invoked script as &ARG1, &ARG2 etc. These
are local script parameters and thus only available within the invoked script.
The total number of arguments passed to the script file is available as
&ARGC.
The script file may define a return value using the RETURN command:
RETURN value
This command terminates execution of the script.
The invoking script may reference the returned value as &RET_VALUE. This
is a local script parameter.
S1 S2
B1 B2 B3 S3 B6
B4 B5
IF-THEN-ELSE Command
This command can be used to define conditionals to control program
execution.
Input Language
IF ( condition ) THEN
ELSEIF ( condition ) THEN
ELSE
ENDIF
FOR-DO Command
This command can be used to define an execution loop.
Input Language
FOR index IN list DO
BREAK
CONTINUE
ENDFOR
Input Language
WHILE ( condition ) DO
BREAK
CONTINUE
ENDWHILE
Input Language
expression
(expression) # {uom}
Mathematical Functions:
+ Addition
- Subtraction
* Multiplication
/ Division
^ Power
ABS Absolute value
LOGE Natural logarithm
LOG10 Logarithm
COS Cosine
SIN Sine
TAN Tangent
EXP Exponentiation
SQRT Square root
INT Nearest integer
Logical Functions:
AND Logical AND
OR Logical OR
NOT Logical NOT
File Functions:
OPENFILE Redirects output to the specified ASCII file. To simply open the file, enter:
OPENFILE( "file" )
The name of the file is enclosed in double quotation marks. To open the file
with an option, enter:
OPENFILE( [ "file", option ] )
Note the use of the brackets. option is one of the following:
READ Open file for reading only.
WRITE Open file for writing only.
APPEND Open file for writing. Any data written will be
appended to the end of the file.
EXISTFILE Checks the existence of a file
EXISTFILE( "file" )
The name of a file is enclosed in double quotation marks along with the path.
This command returns True if the file exists, else returns False.
OPENBINARY Redirects output to the specified binary file. To simply open the file, enter:
OPENBINARY( "file" )
The name of the file is enclosed in double quotation marks. To open the file
with an option, enter:
OPENBINARY( [ "file", option ] )
Note the use of the brackets. option is one of the following:
BINARY_READ Open file for binary reading only.
BINARY_WRITEOpen file for binary writing only.
BINARY_APPEND Open file for binary writing. Any data written
will be appended to the end of the file.
OPENTEE Redirects output to a series of destinations:
OPENTEE( [ list ] )
list is a comma-separated list of destinations enclosed in brackets. It may
include TERMINAL and OPENFILE.
DEVICEINFO Returns information about the specified device. This function should be used
in PRINT FORMATTED and IF-THEN-ELSE commands.
Query Functions:
BLOCKVARS Returns list of variables in the specified block
BLOCKATTRS Returns list of attributes in the specified block
QUERYVARS Returns list of variables using the specified query string
ALIASBYVAR Returns list of aliases matching the specified variable.
Wildcards may be used for the variable name.
CONNECTIONSBYVAR Returns list of connections matching the specified variable.
Wildcards may be used for the variable name.
MEASUREMENTSBYVAR Returns list of measurement names (as
blockid.tagid_description) matching the specified variable.
Wildcards may be used for the variable name.
SPECGROUPSBYVAR Returns list of Specification Groups matching the specified
variable. Wildcards may be used for the variable name.
Miscellaneous Functions:
VAL Returns the value of the quantity, rather than a reference to the ID.
TYPEOF Returns the argument type.
DEFINED Logical function indicating if the parameter argument has been given value.
To get the list of all the variables in port C2S.F.STR and then print it to the
screen, enter the following commands:
Wildcards
There are two wildcard capabilities in OOMF: glob-style and regular
expression matching. The former is the simplest and meets most user needs.
The latter is more complex but is more powerful.
Glob-Style Wildcards
Glob-style wildcards are a simple way to refer to a group of objects so you
can access them in one statement, rather than having to repeat a similar
command again. Not all commands in the script language support glob
wildcards.
There is an implied wildcard at the beginning and end of the string in percent
signs. The ^ and $ special characters allow you to override this implied
wildcard.
When using regular expression to match variable names, you must include
the entire variable name within the percent signs. That is, some parts of the
variable name cannot lie outside the percent signs. The attribute you are
changing may lie outside the percent signs.
Examples of Wildcards
To enter a lower limit of zero for all flows in the flowsheet with glob style
wildcards enter:
*.FLOW.LOWER = 0.0 {KMOL/HR}
To enter a lower limit of zero for all the flows in block C2S:
C2S.*.FLOW.LOWER = 0.0 {KMOL/HR}
Consider the following regular expression:
%FLOW\.LOWER% = 0.0
In simple wildcard jargon, this is equivalent to
*FLOW.LOWER* = 0.0
This is because of the implied wildcard of the percent signs. This would place
lower bounds on all variables that have FLOW in them, i.e., both mass and
molar flows. Note the use of the \ to treat the . as a literal. We do not enter
the units of measure so that we apply the zero as Kmol/Hr for mole flows and
Kg/Hr for mass flows.
If we write
Getting Help
This command provides on-line help.
Input Language
HELP command
Input Language
QUIT
EXIT
Input Language
SYSTEM " command "
Timer
A timer that tracks CPU usage is available.
Input Language
START TIMER
STOP TIMER
RESTART TIMER
Input Language
IDENTIFY LIBRARY dll_name
LOAD LIBRARY dll_name
UNLOAD LIBRARY dll_name
Hierarchies
Hierarchies are blocks that are used to contain parts of a flowsheet. This
allows you to organize your flowsheet into manageable sections that may be
solved separately.
See Also
Aspen Plus Extensions - Hierarchies
S1 S2
B1 B2 B3 S3 B6
B4 B5
Input Language
PRINT BLOCK HIERARCHY
Finding a Block
This command is used to find a block within a flowsheet. It searches within
the current scope and, if the block is not found, continues the search from the
global scope.
Input Language
FIND BLOCK blockid
Input Language
TOGGLE SOLVE SCOPE
Examples of Hierarchy
The following interactive session shows a flowsheet with two hierarchies
called C2HIER and C3HIER and a normal block. First, the block statistics are
printed and the hierarchies appear as any other block. When the scope is
pushed into one of the hierarchies, the blocks within the hierarchy appear.
Within the hierarchy the problem is non-square due to streams, connections
and specification groups that cross the hierarchy boundary. When the
TOGGLE SOLVE SCOPE command is issued the problem becomes square.
The SOLVE command solves the reduced scope problem.
EO> PRINT BLOCK STATISTICS
---Block-- -Nvar- -Neqn- -Nfix- Nexcld -Ndof- NfreeI --Nnz- --Nz%-
C2HIER 1369 1324 24 0 0 7 6808 0.38
C3HIER 79 64 7 0 0 1 183 4
CONDUA 12 5 3 0 0 0 15 33
---------- ------ ------ ------ ------ ------ ------ ------ ------
Total 1460 1393 34 0 0 8 7006
EO> PUSH SCOPE C3HIER
EO> PRINT BLOCK STATISTICS
---Block-- -Nvar- -Neqn- -Nfix- Nexcld -Ndof- NfreeI --Nnz- --Nz%-
CVAP 41 33 3 0 0 1 96 7.7
CIN 35 30 3 0 0 0 85 8.9
C3MEAS 3 1 1 0 0 0 2 1e+002
---------- ------ ------ ------ ------ ------ ------ ------ ------
Total 79 64 7 0 0 1 183
Successful solution.
Problem converged
EO> ANALYZE DOF
Problem is square
EO> TOGGLE SOLVE SCOPE
EO> ANALYZE DOF
Problem has 1 degrees of freedom
EO> RESET SCOPE
EO> ANALYZE DOF
Problem is square
EO>
Listing Blocks
The BLOCKS command is used to show the list of instantiated blocks in the
current scope. This command does not list blocks in child containers.
Input Language
BLOCKS
The PRINT ALL BLOCKS command is used to list all the blocks in the current
scope, including child containers. The blocks are listed by their full qualified
names.
Input Language
PRINT ALL BLOCKS
The PRINT EXCLUDED BLOCKS command is used to list all blocks in the
current scope, including child containers, that are currently excluded. The
blocks are listed by their full qualified names.
Input Language
PRINT EXCLUDED BLOCKS
The PRINT INCLUDED BLOCKS command is used to list all blocks in the
current scope, including child containers, that are currently included. The
blocks are listed by their full qualified names.
Input Language
PRINT INCLUDED BLOCKS
Excluding Blocks
These commands can be used to exclude blocks from the problem. Excluding
a block removes all its equations and variables from the flowsheet.
When a block is excluded, Spec Management automatically reprocesses all the
Connections and Spec Groups to ensure that the problem remains square.
Input Language
EXCLUDE BLOCKS block_list
Including Blocks
This command can be used to include blocks that have been previously
excluded. This procedure works in a similar manner to the EXCLUDE
BLOCKS command (see previous section).
Input Language
INCLUDE BLOCKS block_list
Input Language
BLOCK SCRIPTS block_list
Input Language
PRINT BLOCK CONVERGENCE block_list
Input Language
PRINT BLOCK STATISTICS block_list
PRINT BLOCK STATISTICS FULL block_list
PRINT BLOCK STATISTICS FULL also includes the starting indices of the
variables, equations and non-zeroes for each block. A description of each
column heading follows:
Column Description
Input Language
blockid.attribute = value
Block Attributes
INCLUDED Flag indicting if the block is in the included state.
NLRATIODEV Allowable deviation of the block’s non-linearity ratio when using
Schubert updating. If the non-linearity ratio is greater than this value,
the block’s Jacobian is re-computed. (default = 0.01)
DERIV_METHODDerivative method.
ANALYTIC Derivatives are set by the model subroutine.
NUMERIC Derivatives are computed numerically. The
perturbation size may be specified with the PERT block
attribute.
PERT Perturbation size to use for the computation of numerical derivatives
for the specified block. (default = 1.0E-6).
ZEROTOL Zero tolerance for numeric sparsity detection. (default = 1.0D-12)
MOVE Flag indicating if variables with zero value should be moved during
numeric sparsity detection. (default = TRUE)
MOVEAMOUNT Amount to move variables with zero value during numeric sparsity
detection. (default = 0.01)
For a list the block attributes that are supported by the exported Aspen
Custom Modeler models but not the base OOMF models attributes, see ACM
Block Attributes
Input Language
PRINT BLOCK ATTRIBUTES block_list
Input Language
PRINT BLOCK ATTRIBUTES DETAILED block_list
Input Language
PRINT BLOCK PARAMETERS block_list
Variable Attributes
The following table shows the variable attributes along with allowable values.
Attribute Description
NAME Name.
VALUE Value. (also VAL, VALUES)
INITIAL Initial value.
CHANGE Change in value. If a value is entered for this attribute, the INIT
attribute is also changed automatically.
LOWER Lower bound. (also LB)
UPPER Upper bound. (also UB)
STEP Step bound (also SB)
BOUND Bound type:
HARD Hard bound.
RELAXED Relaxed bound.
SOFT Soft bound. If the initial value of the variable is outside
its bounds, the appropriate variable bound is relaxed to this
initial value.
SOFT2 Special case of the soft bound that allows the variable
value to vary between -1e+35 and 1e+35. The UPPER and
LOWER attributes are ignored.
SBWEIGHT Soft bound weight.
SCALE Scale factor.
INTSCALE Internal scale factor.
RLOWER Resolved lower bound.
RUPPER Resolved upper bound.
PHYSICAL_TYPE Physical type. Changing the physical type is not recommended,
but when you do so, use a string such as PDROP.
In PRINT commands, this is an integer value corresponding to
the physical type. See the section Physical Types for options
and integer values.
UNITS Units of measure string.
SPEC The specification of the variable. (also SPECS) This is a string
that sets the specification in each mode. See table below.
During the run of any particular mode, only the specification for
that mode is known to the OOMF system.
SSPEC Specification in the current mode
SHADOW_PRICE Shadow price (also SP)
ACTIVE_BOUND Active bound (also AB)
Input Language
variableid.attribute = value
aliasid.attribute = value
...
Printing Variables
Prints to the report device selected information about the listed variables.
The set of attributes to print for each variable is determined by the variable
masking, which is a list of variable attributes enclosed by parentheses.
For PRINT VARIABLES, values are given in the variable’s units of measure;
for PRINT VARIABLES SSI, values are given in scaled SI units.
The list of variables can be specified by variable index, variable name or a list
of block names.
The format of the output is affected by script parameters NAME_WIDTH and
UOM_WIDTH. Numbers are printed using a “g” format which switches
between decimal and scientific notation based on the magnitude of the
number, using a fixed width which cannot be changed.
Input Language
PRINT VARIABLES [ vmask ], list
PRINT VARIABLES SSI [ vmask ], list
Input Language
PRINT FIXED [ vmask ], list
Input Language
PRINT SPECIFICATIONS block_list
Input Language
PRINT ACTIVE_BOUNDS [ vmask ], list
PRINT ACTIVE_BOUNDS SSI [ vmask ], list
Input Language
PRINT LARGEST VARIABLE SHADOW_PRICES integer, list
PRINT LARGEST VARIABLE SHADOW_PRICES SSI integer, list
Input Language
PRINT QUERY [ vmask ], block_list, query
Alias Commands
Aliases are user-defined alternate names for variables. The alias may be used
to refer to a variable in other script language commands. This is useful to
avoid typing long variable names.
Printing Aliases
This command lists the alias definitions for the current scope.
Input Language
ALIAS
Input Language
PRINT ALIAS name [ vmask ]
Input Language
PRINT ALIAS VARIABLES var_list
Excluding Equations
This command may be used to exclude, or remove, equations from the
problem. This may change the number of degrees of freedom, depending on
the variable specifications.
Input Language
equationid.INCLUDED = FALSE
Including Equations
This command may be used to include equations that have been previously
excluded.
Input Language
equationid.INCLUDED = TRUE
Evaluating Equations
Equations may be evaluated with either of the following commands. Equations
in excluded blocks are not evaluated.
Input Language
EVALUATE EQUATIONS
EVALUATE RESIDUALS
Input Language
PRINT EQUATIONS list
PRINT RESIDUALS list
Input Language
PRINT LARGEST RESIDUALS integer, block_list
PRINT LARGEST EQUATIONS integer, block_list
Input Language
PRINT LARGEST RESIDUAL SHADOW_PRICES integer, block_list
PRINT LARGEST EQUATIONS SHADOW_PRICES integer, block_list
Input Language
REMOVE SPECIFICATION GROUP spec_list
Input Language
DISABLE SPECIFICATION GROUP spec_list
Input Language
ENABLE SPECIFICATION GROUP spec_list
Input Language
PRINT SPECIFICATION GROUP spec_list
Input Language
PRINT SPECIFCATION GROUP VARIABLES var_list
Input Language
PRINT BLOCK PORTS block_list
PRINT BLOCK PORTS DETAILED block_list
Input Language
PRINT VARIABLES blockid.streamid.STR
Input Language
blockid.streamid.STR.attribute = value
Stream Specifications
SPEC SIM PAR REC OPT
See Also
Aspen Plus Extensions - Stream Commands
Adding Connections
This command is used to add connections either between one or more pairs of
variables or between one or more pairs of ports.
Input Language
ADD CONNECTION cxn_name, cxn_list
Input Language
ADD CUSTOM CONNECTION cxn_name, cxn ports, cxn_types
Removing Connections
This command is used to remove Connections and Spec Groups, completely
eliminating them from the EO Strategy. The product specific user interface
input, of course, is not affected.
When a Connection is removed, Spec Management automatically reprocesses
all the Connections and Spec Groups to ensure that the problem remains
square. The removed Connections and Spec Groups will not appear in any
PRINT command, and will have an Inactive status in the GUI, if defined
there. (The Status on the GUI is not updated until an Incremental Build or
Solve is performed.)
If you use these commands from within products that embed OOMF, note that
any Connections defined in the product’s user interface that are removed with
this command are recreated if the EO Strategy is reinitialized either from SM
Results or from a complete rebuild.
This command will not remove product specific connections such as
Aspen Plus stream connections (Use STREAMS NONE instead).
Aspen Plus HXFlux connections (use DISABLE HXFLUX instead).
Input Language
REMOVE CONNECTION cxn_list
Disabling Connections
This command is used to disable a specific Connection or Spec Group. For a
Connection, this excludes the connection equation from the problem. For a
Spec Group, this disables the group.
When a connection is disabled, Spec Management automatically reprocesses
all the Connections and Spec Groups to ensure that the problem remains
square. (The Status on the GUI is not updated until an Incremental Build or
Solve is performed.)
Input Language
DISABLE CONNECTION cxn_list
Enabling Connections
This command is used to enable a specific Connection or Spec Group. It does
the reverse of the DISABLE CONNECTION command discussed in the
previous section.
Input Language
ENABLE CONNECTION cxn_list
Input Language
CHECK CONNECTIONS
Printing Connections
The CONNECTIONS command prints from the current scope level only:
Spec Groups.
User connections.
The PRINT CONNECTIONS and PRINT CONNECTIONS DETAILED
commands print from the current scope:
Spec Groups.
User connections.
Product specific connections such as
Aspen Plus stream connections.
Aspen Plus HXFlux connections.
PRINT CONNECTIONS DETAILED will show a detailed report for all
connections.
The PRINT VARIABLES CONNECTIONS command prints for the current
scope all the User connections. This will show the source and destination
variables as well as their indices, and the connection multiplier and offset.
The PRINT MEASUREMENT CONNECTIONS and PRINT MEASUREMENT
CONNECTIONS DETAILED commands print, for the current scope, all the
measurement connections. When a measurement is defined for a simulation,
a measurement connection is created between a measurement variable and a
model variable. See the chapter on Measurements for more information on
creating and configuring measurements.
Input Language
CONNECTIONS
PRINT CONNECTIONS cxn_list
PRINT CONNECTIONS DETAILED cxn_list
PRINT VARIABLES CONNECTIONS
PRINT MEASUREMENT CONNECTIONS cxn_list
PRINT MEASUREMENT CONNECTIONS DETAILED cxn_list
Input Language
PRINT INACTIVE CONNECTIONS cxn_list
PRINT INACTIVE MEASUREMENT CONNECTIONS cxn_list
Input Language
PRINT INCOMPLETE CONNECTIONS cxn_list
Input Language
PRINT CONNECTION VARIABLES var_list
See Also
Aspen Plus Extensions - Stream Commands
Aspen Plus Extensions - HXFlux Commands
Measurement Commands
Measurements are used to associate model variables with actual plant
measurements. Measurements are typically configured through the product’s
user interface. If you are using standalone OOMF, measurements may be
added using the “add measurements” command. Do not use the “add
measurements” command from within the Aspen Plus user interface. These
commands allow you to control the status of your measurements.
Checking Measurements
This command is used to verify that the measurements for the problem are
properly defined. This will check for the following
Source variables that are not calculated.
Model variables that are not calculated.
Inactive measurement connections.
This command is automatically issued at the end of the Synchronization step.
If all the connections are properly defined, this command will return the
message All measurements are correctly specified. Otherwise, this command
will return a table of improperly specified measurements. This output is sent
to the Report Device.
Input Language
CHECK MEASUREMENTS
5 Measurements 91
Disabling Measurements
This command is used to disable a specific measurement. This excludes the
measurement from the problem: the measurement connection is broken, the
variables are removed, and the offset equation is excluded.
When a measurement is disabled, Spec Management automatically
reprocesses all the Connections and Spec Groups to ensure that the problem
remains square. Connections and Spec Groups that contain references to the
disabled measurement become Inactive. (The Status on the GUI is not
updated until an Incremental Build or Solve is performed.)
Input Language
DISABLE MEASUREMENT meas_list
Enabling Measurements
This command is used to enable a specific measurement. It does the reverse
of the DISABLE MEASUREMENT command discussed in the previous
section.
Input Language
ENABLE MEASUREMENT meas_list
92 5 Measurements
Printing Measurements
Prints a list of measurements to the report device. This command uses the
following script parameters for controlling the format of portions of the
output: NAME_WIDTH, MEAS_TAG_WIDTH, MEAS_DESC_WIDTH,
MEAS_UOM_WIDTH, MEAS_NUMBER_WIDTH. Numbers are printed in a
“g” format (decimal or scientific notation depending on the magnitude of the
number).
Input Language
PRINT MEASUREMENTS meas_list
Input Language
PRINT MEASUREMENTS VARIABLES var_list
5 Measurements 93
show the specifications of the Model and Source variables, respectively. All
entries in these two columns should be Calc.
In the following example, measurement C2MEAS.C3R is disabled. Since the
measurement does not appear in any Spec Groups, no Spec Groups become
Inactive as a result of this change:
EO> PRINT BLOCK STAT
---Block-- -Nvar- -Neqn- -Nfix- Nexcld -Ndof- NfreeI --Nnz- --Nz%-
C2S 1256 1244 5 0 2 7 6560 0.42
DDEF 45 36 2 0 0 0 131 8.5
CVAP 41 33 2 0 -1 1 97 7.5
CONDUA 12 5 2 0 0 0 16 32
CIN 35 30 4 0 1 0 72 7.7
F 41 35 4 0 2 0 103 8
C2MEAS 24 8 12 0 -4 0 12 13
---------- ------ ------ ------ ------ ------ ------ ------ ------
Total 1454 1391 31 0 0 8 6991
94 5 Measurements
Note the reduction in size of the measurement block, C2MEAS, and that it
now contains an excluded equation.
In this next example, we repeat the above except that measurement
C2MEAS.XD is disabled. This measurement appears in Spec Group C2MEAS,
causing it to become Inactive. Since this Spec Group is used to ensure proper
configuration of all the measurements, once it becomes Inactive, a number of
bad measurements appear when the CHECK MEASUREMENTS command is
issued:
EO> DISABLE MEASUREMENT C2MEAS.XD
1 measurement disabled.
5 Measurements 95
[CIN.BLK.MASS,Calc]
1 inactive specification group found.
Measurement Qualities
The quality of a variable may be used to change problem specifications. The
Variable Quality capability allows you to:
Disable a Measured-Parameterized pair between a measurement block
Plant and Offset variable.
Disable all Measured-Parameterized pairs within a defined list of
Specification Groups.
Enable a disabled Specification Group.
Each of these capabilities will be discussed in turn.
There are two tools you must use for the Variable Quality capability:
The QUALITY variable attribute.
The script parameter BAD_STATUS_LIST.
Every variable has a QUALITY attribute. The quality may be set with the
following script command:
variableid.QUALITY = status
Where status is one of the following:
96 5 Measurements
GOOD The quality of the measured or parameterized variable is good.
BAD The quality of the measured variable is bad.
OVERRIDE The quality of the parameterized variable is to be overridden.
Normally, only Measured variables are given a quality of BAD; only
Parameterized variables are given a status of OVERRIDE.
The BAD_STATUS_LIST contains a list of Specification Groups and Variable-
Specification Group pairs used by the Variable Quality capability. This script
parameter may be defined with the SET script command:
SET BAD_STATUS_LIST =[ specid1, specid2, ... \
[ variableid1, specid1 ], \
[ variableid2, specid2 ], ... ]
The following sections discuss the use of the Variable Quality capability.
5 Measurements 97
If a variable has a Measured specification with a BAD quality or a
Parameterized specification with an OVERRIDE quality, then all Specification
Groups listed in BAD_STATUS_LIST are searched for the variable. If found,
then all Measured variables within the Specification Group are changed to
Calculated and all Parameterized variables are changed to Constant.
This effectively breaks all the Measured-Parameterized pairs involving the bad
variable. For this to work correctly, the Specification Groups should have an
equal number of Measured and Parameterized variables, otherwise they would
become non-square and inactive.
Input Language
PROCESS VARIABLE QUALITY
UNPROCESS VARIABLE QUALITY
98 5 Measurements
Creating bad spec group AS__PARMODE:
C2MEAS.BLK.F_OFFSET (Param -> Const)
C2MEAS.BLK.XF_OFFSET (Param -> Const)
C2HIER.C2MEAS.BLK.D_PLANT (Meas -> Calc)
C2HIER.C2MEAS.BLK.B_PLANT (Meas -> Calc)
C2HIER.C2MEAS.BLK.RR_PLANT (Meas -> Calc)
C2HIER.C2S.BLK.EFF_1 (Param -> Const)
EO>
If we reset the quality to GOOD and process again, the new Specification
Group is removed:
EO> C2HIER.C2MEAS.BLK.RR_PLANT.QUALITY = GOOD
EO> PROCESS VARIABLE QUALITY
Remove bad spec group AS__PARMODE
EO>
In this example, we first disable Specification Group PARMODE and associate
it with the reflux ratio variable. When the variable’s quality goes BAD,
Specification Group PARMODE is enabled.
EO> DISABLE SPEC GROUP PARMODE
1 specification group disabled.
EO> SET BAD_STATUS_LIST = [[C2HIER.C2MEAS.BLK.RR_PLANT,PARMODE]]
EO> C2HIER.C2MEAS.BLK.RR_PLANT.QUALITY = BAD
EO> PROCESS VARIABLE QUALITY
Enable spec group PARMODE
EO>
5 Measurements 99
100 5 Measurements
6 Saving and Restoring
This chapter describes the OOMF Script commands used for saving and
restoring variable and block data to and from binary and ASCII files. It also
describes how simulation and block data can be persisted in compound
storage (binary) files and XML files.
Input Language
SAVE VARIABLES [ vmask ], list TO "file"
Input Language
RESTORE VARIABLES [ vmask ], list FROM "file"
RESTORE VARIABLES EXCEPT [ vmask ], list FROM "file"
Input Language
RESTORE FREE VARIABLES [ vmask ], list FROM "file"
RESTORE FREE VARIABLES EXCEPT [ vmask ], list FROM "file"
Input Language
UPDATE VARIABLES [ vmask ] TO "file"
Input Language
WRITE VARFILE [ vmask ], list TO "file"
WRITE VARFILE EXCEPT [ vmask ], list TO "file"
These attributes can be used. (See the Variable Commands section for
descriptions.)
VALUE INITIAL CHANGE LOWER
UPPER STEP BOUND SBWEIGHT
SPEC UNITS SCALE PHYSICAL_TYPE
QUALITY BASEUOM SHADOW_PRICE ACTIVE_BOUND
NAME SSPEC RLOWER RUPPER
Input Language
READ VARFILE [ vmask ], list FROM "file"
READ VARFILE EXCEPT [ vmask ], list FROM "file"
READ VARFILE QUERY [QUERY], [ vmask ], list FROM "file"
Input Language
COMPARE VARFILE [ vmask ], list FROM "file"
Input Language
WRITE SNAPSHOT [ vmask ], list TO “file”
Examples:
WRITE SNAPSHOT TO "file.snp"
WRITE SNAPSHOT [ units, value, lower, upper ] TO "file.txt"
WRITE SNAPSHOT [ units, value, spec ], a, b* TO &history_device
Input Language
SAVE SIMULATION TO "file"
Input Language
OPEN SIMULATION FROM "file"
Input Language
ADD SIMULATION FROM "file"
Input Language
SAVE BLOCK blk_name TO "file"
Input Language
LOAD BLOCK FROM "file"
Input Language
READ SIMULATION FROM "file"
Input Language
APPEND BLOCKS FROM "file"
Input Language
WRITE BLOCK blk_name TO "file"
This chapter describes the OOMF Script commands for manipulating objective
functions, Jacobians, and derivatives.
There are three types of objective functions available: linear, sum of squares
and symbolic. The coefficient of a term in a linear objective function may have
a constant numeric value with units or another variable’s name. In the latter
case the objective term is either bi-linear or quadratic. You can define as
many objective functions as you want. In this way, you can keep track of all
your objective function values during any particular run. The objective
function you wish to solve is determined by the setting of script parameter
OBJECTIVE.
Note that variables are stored internally in OOMF in the units in which model
residuals are evaluated (model base units). Some models may be in SI units
while others may be in metric units. Hence, SI units are used during the
evaluation of a custom objective function in order to have a common basis for
evaluation in the overall flowsheet.
Input Language
objid.attribute = value
Input Language
EVALUATE OBJECTIVE objid
Input Language
EVALUATE OBJECTIVE DERIVATIVE objid
Input Language
EVALUATE OBJECTIVE HESSIAN objid
Input Language
PRINT OBJECTIVE objid
Input Language
ANALYZE JACOBIAN reltol, pertsize, block_list
Input Language
ANALYZE SPARSITY zerotol, pertsize, block_list
Input Language
EVALUATE JACOBIAN
Input Language
PRINT JACOBIAN list
Input Language
PRINT JACOBIAN VARIABLES list
Input Language
PRINT JACOBIAN EQUATIONS list
Input Language
DERIVATIVE
Let’s interactively analyze the Jacobian for block C2S and report errors for
any derivatives with relative errors greater than 0.1 using a perturbation size
of 1.0E-6.
EO> ANALYZE JACOBIAN 1.0, 1.0D-6, C2S
Analyzing C2S
Found 5 significant differences out of 6858 non-zeros
---i--- ----------equation---------- ----------variable---------- --analytic-- ---numeric--
148 C2S.BLKEQN_PHSEQBL_1_C2H4 C2S.BLK.CVAP_1.C2H6 -0.4405 -447.5
254 C2S.BLKEQN_PHSEQBL_3_C2H4 C2S.BLK.CVAP_3.C2H6 -1.969e-006 4.254e-007
3392 C2S.BLKEQN_PHSEQBL_59_C2H4 C2S.F.STR.MOLES 0.002919 -0.001528
3393 C2S.BLKEQN_PHSEQBL_59_C2H4 C2S.BLK.F.C2H4.FL_VMFRC 0.001769 0.0233
3403 C2S.BLKEQN_PHSEQBL_59_C2H4 C2S.BLK.EFF_1 -0.09316 0.01107
This chapter describes the OOMF Script commands used for analysis and
controlling the solver.
Analysis Commands
These commands help you analyze your problem and can assist in debugging.
Input Language
ANALYZE DOF
Sensitivity Analysis
This command computes the sensitivity between a set of independent and
dependent variables. The sensitivity is the derivative or gain between the
variables. This can be very useful for analyzing flowsheet behavior or in
control system design. This output is sent to the HISTORY_DEVICE.
Input Language
SENSITIVITY obj [ depend ], [ indep ]
8 Analysis 125
current objective function is used.
depend Comma separated list of dependent variables. These variables must be
calculated in the current mode.
indep Comma separated list of independent variables. These variables must be
fixed or independent in the current mode.
Analyzing Variables
This command analyzes the structure of the problem and divides the variables
into a set of observable and unobservable variables and redundant and
nonredundant measurements. A variable is defined as observable or
determinable if there are sufficient measurements or fixed variables that will
allow it to be determined through the model. A measurement is defined as
redundant if the variable associated with it can be determined or estimated
even in the absence of this measurement.
A problem is well determined if there are no unobservable variables.
Consider the following simple system:
X1 = X2 + X3
X3 = 1
X3 is determined from the second equation. However X1 and X2 cannot be
determined from the first equation. Therefore both are unobservable. If we fix
X1 or X2 , then all the variables are observable.
If we attach measurement X2m to variable X2, then X2 can be estimated
from its measurement:
X2 = X2m
Then X1 can be computed from X2 and X3. Thus X2 becomes observable.
However this would not be possible without this measurement. Therefore
measurement X2m is nonredundant.
This report is written to the history device.
Input Language
ANALYZE VARIABLES obj, [ list ]
126 8 Analysis
Analyzing Equations
Equation analysis is a numerical tool that helps to troubleshoot problems with
singular jacobians by isolating the groups of equations which are linearly
dependent. These groups are unique and do not depend on any options for
the LU factorization. An equation is linearly dependent with other equations if
it can be reproduced by adding the other equations multiplied by appropriate
factors.
A problem with linearly dependent equations can arise from:
An improperly written model.
A flowsheet with multiple solutions.
Combinations of free/fixed variables that cause two or more equations to
become similar. Either the specifications do not make sense, or the model
has design or coding flaws, or both.
Note that because this algorithm factorizes the Jacobian, you should evaluate
the jacobian before invoking this command. Also note that active bounds are
not yet considered.
This command reports groups of dependent equations. Each group defines a
cluster of equations that are dependent among themselves. The equations
from one group are not dependent with respect to the other groups. Generally
speaking, the more groups you have the more broken your problem is.
This report is written to the history device.
Input Language
ANALYZE EQUATIONS
8 Analysis 127
Number of incident variables: 1492
Number of incident equations: 1492
Numerical rank : 1492
Structural rank : 1492
No linearly dependent equations were found.
Now let’s make a bad specification change by fixing an extra variable in a
block. This will create an overspecified problem:
EO> CVAP.BLK.COUT_PRES.SPEC = CONST>
128 8 Analysis
Solver Commands
These commands are used to specify the solver and its parameters.
Input Language
SOLVER solver
Input Language
SOLVER SETTINGS parameter = value, parameter = value,…
Input Language
DMO.parameter = value
8 Analysis 129
Input Language Description
parameter Name of the parameter to change.
value Value for the entered parameter.
DMO Parameters
DMO Parameter Description
130 8 Analysis
DMO Parameter Description
SAVEJDFFILE Flag to save binary form of the Jacobian in the JDF file. This file is read by the
solution analysis, DMOSAT.
0 Do not save JDF file (default)
1 Save the JDF file
SCREENFORM Flag to modify the output format for the iteration log.
0 Format designed for direction into a file
1 Format designed for interactive screen observation (default)
HESSIANUPDATES Number of Hessian updates kept before resetting. (default = 10)
RIGORUPDATES Number of constraint updates before a rigorous analysis phase. (default = 25)
FACTORSPACE Parameter related to the workspace allocated for the solution of the linear system
of equations. Problems with excessive fill-in may require a higher number.
(default = 6)
ACTIVESPACE Parameter related to the workspace allocated for part of the active set strategy.
(default = 2)
PIVOTSEARCH Parameter related to the pivoting strategy. (default = 10)
VARSCALE Flag to indicate the use of variable scaling.
0 Do not scale variables
1 Scale variables (default)
PRINTFREQ Flag to indicate diagnostic printing level for variables and residuals.
-1 Minimum diagnostics (default)
1 Maximum diagnostics (including all variable and residual values at every
iteration)
LUSTATS Flag to indicate diagnostic printing level for linear system.
0 No diagnostics (default)
1 Full diagnostics
QPSTATS Flag to indicate diagnostic printing level for the QP subproblem.
0 No diagnostics (default)
1 Full diagnostics
IWORKF Integer workspace parameter (default = 1.0)
RWORKF Real workspace parameter (default = 1.0)
RESCVG Residual convergence tolerance (default = 1.0D-6)
OBJCVG Objective function convergence tolerance (default = 1.0D-6)
ANALYSISTHRES Threshold parameter for a forced re-analysis of the problem structure. This
number should be higher in cases of a natural high fill-in such as highly heat
integrated units. (default = 2.0)
Input Language
LSSQP.parameter = value
8 Analysis 131
Input Language Description
parameter Name of the parameter to change.
value Value for the entered parameter.
LSSQP Parameters
LSSQP Description
Parameter
132 8 Analysis
LSSQP Description
Parameter
MAXQPF Maximum number of consecutive SQP iterations with QP failure before terminating
LSSQP (default=10).
GNPMAX An artificial weighting factor to drive the QP problem to the feasible region. In rare
occasions, it has to be increased to avoid a small feasibility index (default=1.0D6).
MDHESS Hessian approximation option. Generally, this should only be changed for the DRPE case.
The options follow:
0 Use general BFGS update to approximate the Hessian.
2 Always calculate Gauss-Newton-type Hessian approximation.
3 Use Gauss-Newton-type Hessian approximation for initialization but update it
with BFGS update.
4 Selectively choose between BFGS update or Gauss-Newton-type Hessian
approximation. (default=2 for DRPE, 0 for all other modes).
LEWBAS Type of basis for range-space representation. Allowed options follow:
0 Orthogonal basis (potentially more stable) (default)
1 Coordinate basis (less overhead especially for problems with large degree of
freedoms)
LSCOPT Line search options. Allowed options follow:
1 Same as option 3 for the first ITRBND iterations. Perform only step bounding
with CHGMAX thereafter.
2 Same as option 4 for the first ITRBND iterations. Perform only step bounding
with CHGMAX thereafter.
3 Exact penalty function.
4 Exact penalty function with Powell’s Watchdog relaxation (default).
5 Exact penalty function with second-order correction.
6 Exact penalty function with trust region control.
7 Exact penalty function with trust region control and second order correction.
IXSCS LSSQP internal variable and constraint scaling options. Allowed options follow:
0 No internal variable or equation scaling (in addition to the scaling performed by
models and/or executive)
3 Derive variable scaling from initial x0; derive constraint scaling from Jacobian
4 No variable scaling; derive constraint scaling from Jacobian (default)
5 Derive variable and constraint scaling simultaneously from Jacobian
For some problems, IXSCS=3 can provide an improvement in performance.
BNDAPP Approach to bounds allowed in one iteration (default=0.99).
QPINFE QP infeasible parameter. If QPINFE is positive and greater than the QP feasibility index,
then a new search direction is determined by minimizing the sum of absolute violations.
This can be helpful when trying to find a feasible solution to an initially infeasible
optimization problem (default=0.0).
KMUDEC Options for adjusting penalty parameters:
0 Do not allow penalty parameter to be decreased.
1 Allow penalty parameter to be decrease gradually (default).
2 Use Lagrange multiplier as penalty parameter. This may work better for some
problems.
TOLBAS Threshold pivot tolerance when selecting a basis (default=0.1).
TOLANA Threshold pivot tolerance for the rare case of reanalyzing a matrix (default=0.1).
8 Analysis 133
LSSQP Description
Parameter
SPDROP Matrix elements with absolute value smaller than SPDROP are dropped by the sparse
linear solver (default=1.D-15).
SINGT1 Matrix elements with absolute value less than SINGT1 are not allowed to become pivot
elements when selecting a basis (default=1.D-8).
SINGT2 Matrix elements with absolute value less than SINGT2 are not allowed to become pivot
elements during numerical factorization (default=1.D-10).
NNDCMP Number of equality constraints that should not be used to eliminate variables
(default=0).
DELTLS Actual to predicted merit function reduction ratio below which a line search step will be
rejected (default=0.1).
BIGBND Big number to identify fake bounds (-BIGBND, BIGBND) (default=1.D20).
BNDADJ Adjustment to bounds to create a feasible region when a QP subproblem is infeasible
(default=1.D-5).
BSMALL Smallest diagonal in Choleskey decomposition of the projected Hessian (default=1.D-8).
SMLSCL Small number to limit scaling (default=1.D-8).
BIGSCL Big number to limit scaling (default=1.D10).
LCHBAS Allow basis changing. See below:
0 No
1 Yes (default)
BASFLP Growth of the largest sensitivity matrix element to trigger a new basis selection
(default=100.). Parameter LCHBAS must be 1. Set this number to a larger value to
prevent LSSQP from reselecting the basis.
TAUHYB Parameter for deciding whether to use Gauss-Newton-type Hessian approximation for
MDHESS=4 (default=0.1).
LSIZEB Hessian sizing option. This is represented as a two-digit decimal number; each digit sets
a parameter:
0 Don’t resize Hessian after first iteration; use identity matrix for initial Hessian.
1 Don’t resize Hessian after first iteration; use FSCALF to scale initial Hessian.
10 Resize Hessian after first iteration; use identity matrix for initial Hessian.
11 Resize Hessian after first iteration; use FSCALF to scale initial Hessian (default).
FSCALF Initial Hessian scaling factor. If FSCALF is positive, the initial Hessian is set to
FSCALF*I. Otherwise, the initial Hessian is set to |FSCALF|*FSCALV*I where FSCALV
is an estimate of the magnitude of the objective function. If FSCALF is zero, a value
of -0.1 is used (default=0.01).
RRLOW Low limit of yTs/sTBs to limit the BFGS update (default=0.2).
RRHIGH High limit of yTs/sTBs to limit the BFGS update (default=100.).
ETASKP Range-space to full step ratio above which BFGS update will be skipped (default=0.95).
VMUINI Initial line search penalty parameter (default=1.D-3).
VMUMIN Minimum line search penalty parameter (default=1.D-8).
VMUFAC Penalty parameter multiplier factor from Lagrange multiplier (default=2.).
MSFREQ Matrix scaling frequency.
0 No matrix scaling.
1 Scale matrix before a basis selection (default).
2 Scale matrix before an analyze call.
3 Scale matrix before both basis selection and analysis calls.
134 8 Analysis
LSSQP Description
Parameter
8 Analysis 135
LSSQP Description
Parameter
IFDTYP Numerical derivative option. Users should use the numerical derivative options provided
by the executive. Potential nonzeros in the gradient that are actual zeros should be set
to small values for options 2 and 4:
0 No numerical derivative calculation (default).
1 Use numerical derivative for Jacobian.
2 Use numerical derivative for Jacobian and gradient.
3 Verify Jacobian at the initial point.
4 Verify Jacobian and gradient at the initial point.
Numerical derivatives are computed using the following step size:
DPERTF max(|X|,XPMIN)
When using this option to verify the Jacobian, derivatives are reported with errors
greater than:
DERDIF max( | analytic value |,| numerical value |, DERMIN )
DPERTF Relative perturbation size for numerical derivative calculation. See above (default=1.D-
6).
XPMIN Absolute perturbation size for numerical derivative. See above (default=0.01).
DERDIF Relative tolerance for reporting derivative errors. See above (default=0.001).
DERMIN Absolute tolerance for reporting derivative errors. See above (default=0.01).
Input Language
NSOLVE.parameter = value
NSOLVE Parameters
NSOLVE Parameter Description
136 8 Analysis
NSOLVE Parameter Description
Stabilization Stabilization technique used for controlling the variable step sizes: 0=
Powell’s Dogleg and 1=One Dimensional Line-Search (default=1).
Check_steps Flag that indicates whether the 2-norm of the variable step vector needs to
be within the specified tolerance: 0=do not check for step sizes, 1=check for
step sizes (default = 1).
Print_level Iteration history printing level. Values higher than 4 print a detailed iteration
history in the solver report file (default = 4).
Function_tolerance Allowed tolerance on 2-norm of the residual function vector (default =
1.0D-6).
Maximum_function_error Maximum error allowed based on the 2-norm of the residual function vector
(default =1.0D30).
Variable_tolerance Allowed tolerance on variable step sizes based on the 2-norm of the variable
step vector (default = 0.01). This is used only if the parameter
Check_steps=1.
Trust_radius Radius of the initial trust region measured as a ratio of the 2-norm of the
variable vector (default=0.1). This is used only with Powell’s Dogleg strategy
(when parameter Stabilization=0). The radius is automatically adjusted after
each iteration using Powell’s formula.
Input Language
SOLVE objid
Models may add a custom solution algorithm that can augment or substitute
this primary solution process. These custom solution algorithms will be
invoked automatically.
8 Analysis 137
Recovery Commands
These commands are used to restore the problem state after a failed solution.
Input Language
RESET VARIABLES
RESET VARS
RESET VAR
See Also
Aspen Plus Extensions - Recovery Commands
138 8 Analysis
9 Printing and Reports
This chapter describes the OOMF Script commands that let you print
information and create reports.
Input Language
PRINT SUMMARY
Input Language
PRINT CONVERGENCE SUMMARY
This example shows the output form the PRINT CONVERGENCE SUMMARY
command.
EO> PRINT CONVERGENCE SUMMARY
Convergence summary
-------------------
Status: Converged
Iterations: 7
Residual convergence: 3.861e-008
Objective convergence: 1.566e-007
Initial objective: 2.556
Final objective: 2.647
Formatted Printing
Formatted print is a powerful tool to allow you to create your own custom
reports.
Input Language
PRINT FORMATTED expression1 , expression2 , expression3 , …
\n Indicates a carriage return, line feed. Format statements are not assumed
to end with a carriage return and line feed so you must use the \n at the
end of the format if you wish to move to a new line.
\t Horizontal tab (ASCII character HT).
\v Vertical tab (ASCII character VT).
\b Backspace (ASCII character BS).
\r Carriage return without linefeed (ASCII character CR).
\f Form feed (ASCII character FF).
\a Audible bell (ASCII character BEL).
\\ Backslash character (\).
%n.mf Indicates a field to print a real number in fixed format. n is the minimum
field width, and m specifies the number of digits to the right of the
decimal. If m is zero, no decimal point is printed. The default value for m
is 6. If the magnitude of the value you’re printing is large enough, the
minimum field width n may be exceeded.
%n.me Indicates a field to print a real number in exponential format. n is the
minimum field width. The case of the e indicates the case of the
exponential in the output. m is the number of places to the right of the
decimal. If m is zero, no decimal point is printed. The default value for m
is 6. The total number of spaces taken by this format is MAX(n,m+6) (two
spaces are allocated for the power term).
%n.mg Indicates a field to print a real number in general format. n is the
minimum field width. The case of the g indicates the case of the
exponential in the output, if any. m is the number of significant digits.
Exponential (e) format is used if the exponent is less than -4 or greater
than or equal to m; otherwise, fixed (f) format is used. Trailing zeros and
a trailing decimal point are not printed. The exponential format uses 5
spaces. Thus, to ensure a fixed space usage, set n=m+5.
%nd Print an integer value. n is the minimum field width.
%no Print an integer value in octal.
%nx Print an integer value in hexadecimal. The case of the x indicates the case
of the hexadecimal letters.
%c Print an integer value as its equivalent ASCII character code.
%ns Indicates a field to print a string. n is the minimum field width. If the
length of the string is less than n, then the string is right justified.
%% Print a percent sign (%).
In the above formats, a flag may be placed between the percent sign (%)
and the format which indicates the following:
Flag Description
Input Language
ECHO expression
Reporting Blocks
This command prints a report of the specified blocks to the report device.
Input Language
REPORT BLOCKS block_list
Input Language
REPORT OBJECTIVE objid
OOMF supports the instantiation of, interaction with, and solution of event
driven dynamic models. Typically, these models are comprised of differential
and algebraic equation systems. This chapter describes the OOMF
parameters, equation-based scripting language commands, and the XML-
based, task-modeling language that can be used to interact with these
models and control the simulation while it is running
RUN_MODE Run mode for the simulation. The options are SS (for steady-state
simulations), INIT (for initialization simulations) and DYN (for dynamic
simulations). The default value is SS. The INIT and DYN run modes are
relevant only to dynamic models
DYN_RUN_TO Time to which the dynamic simulation should run to.
DYN_INTERVAL Reporting or communication interval for the dynamic simulation.
Pausing a simulation
This command is used to pause a dynamic simulation while it is running and
to enter dynamic interactive mode, which will be depicted by a Dyn> prompt
in the client window.
Input Language
PAUSE
Running a simulation
This command is used to continue running a dynamic simulation from a
paused state. The simulation will continue to run until the time specified in
the dyn_run_to parameter is reached or another pause command is invoked.
OOMF will only respond to a run command when it is in dynamic interactive
mode.
Input Language
RUN
Input Language
STEP
Stopping a simulation
This command is used to exit from dynamic interactive mode.
Input Language
STOP
Input Language
REINITIALIZE
Input Language
ADD TASKS FROM <file>
Viewing tasks
This command is used to send a list of all the tasks loaded in OOMF to the
current output device.
Input Language
SHOW TASKS
Deleting a task
This command is used to unload a task from OOMF.
Input Language
DELETE TASK <task_name>
Input Language
ACTIVATE VARIABLE PROFILE <var_list>
Input Language
INACTIVATE VARIABLE PROFILE <var_list>
Input Language
PRINT VARIABLE PROFILE <var_list>
Input Language
PRINT VARIABLE HISTORY <var_name, start_time, end_time,
interval>
Input Language
SAVE SNAPSHOT <snapshot_name>
Loading a snapshot
This command is used to load a snapshot into OOMF.
Input Language
LOAD SNAPHOT <snapshot_id>
Viewing snapshots
This command is used to send the list of saved snapshots to the current
output device. The name, ID and time of each snapshot is printed to the
output device.
Input Language
SNAPSHOTS
Deleting a snapshot
This command is used to delete a snapshot.
Input Language
DELETE SNAPSHOT <snapshot_id>
Ramping a variable
The following example depicts how to ramp the value of a variable:
<?xml version="1.0" encoding="utf-8"?>
<Tasks>
<Task name="RampHeat" active="true" once="true" time="0.0">
<Body>
<Ramp variable="B1.Q" target="10" period="5.0" type="Discrete" />
</Body>
</Task>
</Tasks>
In this task, the value of variable B1.Q is ramped to a value of 10 over a
period of 5 time units starting a time 0. If the ramp type is “Discrete”, as
shown in the example, the solver will update the value of the ramped variable
at each communication step whereas if the ramp type is “Continuous”, the
solver will update the value at each integration step. While continuous ramps
are more accurate, they may also cause the solver to slow down.
This chapter describes the OOMF script commands used to manipulate units
of measure, and lists the available units of measure and physical types.
Input Language
variableid.UOM = {uom}
Input Language
variableid ## {uom}
Units of Measure
The units available include the English engineering set (ENG), the
International System set (SI) and the metric engineering set (MET), as well
as other common units. OOMF supports up to 2147483648 units of measure
per physical type.. The following table contains the set of available units.
Type of Units Code SI Set ENG Set MET Set Other Units Options
FISCAL 8 $ $ $
FLOW 9 KG/SEC LB/HR KG/HR LB/SEC, MLB/HR,
TONS/DAY, MCFH,
TONNE/HR, LB/DAY,
KG/DAY, TONS/HR,
KG/MIN, KG/YEAR,
GM/MIN, GM/HR, GM/DAY,
MGM/HR, GGM/HR,
MGM/DAY, GGM/DAY,
LB/MIN, MMLB/HR,
MLB/DAY, MMLB/DAY,
LB/YEAR, MLB/YEAR,
MMLB/YEAR, TONS/MIN,
MTONS/YEAR,
MMTONS/YEAR, L-
TONS/MIN, L-TONS/HR, L-
TONS/DAY, ML-
TONS/YEAR, MML-
TONS/YEAR,
KTONNE/YEAR
FLUX 61 CUM/SQM-SEC CUFT/SQFT-SEC L/SQM-SEC L/SQM-HR, GAL/SQFT-MIN
FLUX-HEAT-AR 120 WATT/SQM BTU/HR-SQFT CAL/SEC-SQM J/SEC-SQM, MMBTU/HR-
SQFT, KW/SQM
FLUX-MOLE 121 KMOL/SQM-S LBMOL/SQFT-HR KMOL/SQM-HR LBMOL/SQFT-S,
MOL/SQCM-S
FORCE 14 NEWTON LBF DYNE
FREQUENCY 28 HZ RPM RPM RAD/SEC, RPS, KRPM,
MMRPM, RPH
G-RATE 92 KG/SEC-SQM LB/HR-SQFT KG/HR-SQM
HEAD 33 J/KG FT-LBF/LB M-KGF/KG SQM/SQSEC, INCH, FT,
METER, KJ/KG, KM-
KGF/KG, MFT, MJ/KG,
MFT-LBF/LB, FT-HEAD,
METER-HEAD, INCH-HEAD
HEAT 53 J BTU CAL KCAL, MMKCAL, MMBTU,
PCU, MMPCU, KJ, GJ, N-M,
MJ, MCAL, GCAL, MBTU,
KW-HR
HEAT-FLUX 80 WATT/M BTU/HR-FT CAL/SEC-M J/SEC-M, MMBTU/HR-
FT,GCAL/HR-M,GJ/HR-M,
KCAL/HR-M, KJ/HR-M,
HEAT-FLUX-AR 95 WATT/SQM BTU/HR-SQFT CAL/SEC-SQM J/SEC-SQM, MMBTU/HR-
SQFT
HEAT-RATE-V 122 WATT/CUM BTU/HR-CUFT CAL/SEC-CUM J/SEC-CUM, MMBTU/HR-
CUFT, GJ/HR-CUM
USR-DUMMY5 95
USR-DUMMY6 96
USR-DUMMY7 97
USR-DUMMY8 98
USR-DUMMY9 99
VELOCITY 25 M/SEC FT/SEC M/SEC MILE/HR, KM/HR, FT/MIN,
MM/DAY, MM/HR,
MM/DAY30, IN/DAY
VFLOW-LENGTH 84 SQM/SEC GPM/FT SQCM/SEC SQM/HR, SQFT/MIN
VFLOW-RPM 100 CUM/SEC/RPM CUFT/HR/RPM L/MIN/RPM GAL/MIN/RPM,
GAL/HR/RPM,
BBL/DAY/RPM,
CUM/HR/RPM,
CUFT/MIN/RPM,
BBL/HR/RPM,
CUFT/SEC/RPM,
CUM/DAY/RPM,
CUM/YEAR/RPM,
L/HR/RPM,
KBBL/DAY/RPM,
MMCUFT/HR/RPM,
MMCUFT/DAY/RPM,
MCUFT/DAY/RPM,
L/SEC/RPM, L/DAY/RPM,
CUM/MIN/RPM
VISCOSITY 26 N-SEC/SQM CP CP LB/FT-HR, MN-SEC/SQM,
P, GM/SEC-CM, DYN-
SEC/SQCM, PA-SEC
VOL-ENTHALPY 88 J/CUM BTU/CUFT CAL/CC KCAL/CUM, KJ/CUM,
MMBTU/BBL
VOL-HEAT-CAP 79 J/CUM-K BTU/CUFT-R CAL/CC-K KCAL/CUM-K, KJ/CUM-K,
BTU/CUFT-F
VOL-HTR-COEF 126 WATT/CUM-K BTU/HR-CUFT-R CAL/SEC-CC-K WATT/CUM-C, WATT/CUM-
F, KW/CUM-K, KW/CUM-C,
BTU/HR-CUFT-F
VOLTAGE 113 VOLT KVOLT
VOLUME 27 CUM CUFT L CUIN, GAL, BBL, CC,
KCUM, MCUM, MCUFT,
MMCUFT, ML, KL, MML,
MGAL, MMGAL, UKGAL,
MUKGAL, MMUKGAL,
MBBL, MMBBL, KBBL,
CUYD
VOLUME-CYCL 104 CUM/CYCLE CUFT/CYCLE L/CYCLE GAL/CYCLE, GAL/CYCLE,
BBL/CYCLE, CUM/CYCLE,
CUFT/CYCLE, BBL/CYCLE,
CUFT/CYCLE, CUM/CYCLE,
CUM/CYCLE, L/CYCLE,
KBBL/CYCLE,
MMCUFT/CYCLE
Most of the above units are self-explanatory. Units and unit parts that may
require explanation follow:
Units Description
Physical Types
Every model variable has a physical dimensionality (physical type) that is
assigned by the model developer. Each physical type has a corresponding
integer code.
Type Code Physical Type
0 UNTYPED
1 AREA (SQM)
2 COMPOSITION
3 MASS-DENSITY (KG/CUM)
4 DIFFUSIVITY (SQM/SEC)
5 ENERGY (J)
6 ENTHALPY (J/KMOL)
7 ENTROPY (J/KMOL-K)
8 FISCAL ($)
9 FLOW (KG/SEC)
10 MASS-FLOW (KG/SEC)
11 MOLE-FLOW (KMOL/SEC)
12 VOLUME-FLOW (CUM/SEC)
13 ENTHALPY-FLO (WATT)
14 FORCE (N)
15 MOLE-HEAT-CA (J/KMOL-K)
16 HEAT-TRANS-C (WATT/SQM-K)
17 LENGTH (M)
18 MASS (KG)
19 POWER (WATT)
20 PRESSURE (N/SQM)
21 SURFACE-TENS (N/M)
22 TEMPERATURE (K)
23 THERMAL-COND (WATT/M-K)
24 TIME (SEC)
25 VELOCITY (M/SEC)
26 VISCOSITY (N-SEC/SQM)
27 VOLUME (CUM)
28 FREQUENCY (HZ)
29 UNIT-PRICE ($/KG)
30 ENERGY-PRICE ($/J)
31 DELTA-T (DELTA-K)
32 ANGLE (RAD)
33 HEAD (J/KG)
34 BOND-WORK-IN (J/KG)
35 FILTER-RESIS (1/M)
36 SPEC-FLT-RES (M/KG)
37 MOLE-DENSITY (KMOL/CUM)
38 MASS-DENSITY (KG/CUM)
39 MOLE-ENTHALPY (J/KMOL)
40 MASS-ENTHALPY (J/kg))
41 MOLE-ENTROPY (J/KMOL/K)
42 MASS-ENTROPY (J/KG-K)
43 MOLE-VOLUME (CUM/KMOL)
44 DIMENSIONLESS
45 DIPOLEMOMENT (J*CUM)**0.5
46 SOLUPARAM (J/CUM)**0.5
47 ELEC-POWER (WATT)
48 ELEC-PRICE ($/J)
49 MASS-HEAT-CA (J/KG-/K)
50 UA (J/SEC-K)
51 MOLES (KMOL)
52 WORK (J)
53 HEAT (J)
54 AREA-PRICE ($/SQM)
55 VOLUME-PRICE ($/CUM)
56 ITEM-PRICE ($/ITEM)
57 NUM-CONC (NO/CUM)
58 MASS-CONC (KG/CUM)
59 INVERSE-TIME (1/SEC)
60 LN-INV-TIME (LN(1/SEC))
61 FLUX (CUM/SQM-SEC)
62 AREA-USAGE (SQM/SEC)
63 VOLUME-USAGE (CUM/SEC)
64 MOLE-CONC (KMOL/CUM)
65 POWER-VOLUME (WATT/CUM)
66 MASS-TRANS-C (KG/S-SQM-KG/CUM)
67 SPECIFICAREA (SQM/CUM)
68 INVERSE-LENG (1/M)
69 CHROM-VELOCITY (M/SEC)
70 MASS-FLUX (KG/SQM-SEC)
71 SOLVENT-PERM (KG/SQM-S-PA)
72 SOLUTE-PERM (SQM/M-S)
73 WATER-RATE (KG/J)
74 PDROP-PER-HT (N/CUM)
75 PDROP (N/SQM)
76 PACK-FACTOR (1/M)
77 NUM-CON-RATE (NO/CUM-SEC)
78 INVERSE-AREA (1/SQM)
79 VOL-HEAT-CAP (J/CUM-K)
80 HEAT-FLUX (WATT/M)
81 INVERSE-TEMP (1/K)
82 INVERSE-PRES (SQM/N)
83 TEMP-VOLUME (CUM-K/KMOL)
84 VFLOW-LENGTH (SQM/SEC)
85 CONTENTS (FRACTION)
86 POP-DENSITY (NO/M/CUM)
87 INVERSE-HT-C (SQM-K/WATT)
88 VOL-ENTHALPY (J/CUM)
89 MOLE-FLOW-LEN (KMOL/SEC-M)
90 USR-DUMMY0
91 USR-DUMMY1
92 USR-DUMMY2
93 USR-DUMMY3
94 USR-DUMMY4
95 USR-DUMMY5
96 USR-DUMMY6
97 USR-DUMMY7
98 USR-DUMMY8
99 USR-DUMMY9
100 VFLOW-RPM (CUM/SEC/RPM)
101 F-FACTOR (KG-CUM)**0.5/SEC
102 MASS-CYCL (KG/CYCLE)
103 MOLE-CYCL (MOL/CYCLE)
104 VOLUME-CYCL (L/CYCLE)
105 ENTHALPY-CYC (J/CYCLE)
106 MASS-OPER (KG/OP-SEC)
107 MOLE-OPER (MOL/OP-SEC)
108 VOLUME-OPER (L/OP-MIN)
109 ENTHALPY-OPR (J/OP-SEC)
110 RHO-VSQRD (KG/M-SQSEC)
111 SOUND-LEVEL (DECIBELS)
112 MOM-INERTIA
113 VOLTAGE (VOLT)
114 CURRENT (AMP)
115 MASS-VOLUME (CUM/KG)
116 MASS-PER-LEN
117 ENERGY-VOL
118 SIEMENS-M
119 COST-RATE
120 FLUX-HEAT-AR
121 FLUX-MOLE
122 HEAT-RATE-V
123 MOLE-RXN-RATE
124 MOL-RXN-RATW
125 MOLE-PRICE
126 VOL-HTR-COEF
127 POWER-AREA
128 POWER-MASS
129 MASS-EMISSIO (KG/J)
130 INVERSE-VEL (SEC/M)
131 SPEC-MAT-RES (KG/J-M)
132 ACCELERATION
133 MASS-CONTENT (KG/KG_DRY)
134 AREA-SQTIME
135 MOLE-AREA
1 AROM-FACTOR
2 ANILINE-PT
3 API
4 AROM-BY-VOL
5 BASIC-N2-CONT
6 BENZ-BY-VOL
7 CON-11
8 CON-CLEAR
9 CONRAD-CARBON
10 CETANE-IDX
11 DON-11
12 DON-CLEAR
13 EX-BENZ-EMISS
14 WATSON-K
15 LUMIN-NO
16 MON-11
17 MON-CLEAR
18 NPLUS2A-BY-VOL
19 NAPH-VOL-PCT
20 NOX-EMISS
21 OLEF-VOL-PCT
22 O2-WT-PCT
23 POUR-PT
24 POUR-PT-IDX
25 RON-11
26 RON-CLEAR
27 RVP-IDX
28 REID-VAP-PRES
29 SP-GRAVITY
30 SP-VOLUME
31 SULF-WT-PCT
32 TOXIC-EMISS
33 VANADIUM-BY-WT
34 VISCO-INDEX
35 VOC-EMISS
36 AROM-BY-WT
37 ASPHALT-CONT
38 C5-BY-WT
39 CLOUD-PT
40 COPPER-CONT
41 IRON-CONT
42 D2887-X-PCT
43 D86-X-PCT
44 DRIVE-IDX
45 FLASH-PT
46 FREEZE-PT
47 NPLUSA-BY-VOL
48 NAPH-WT-PCT
49 NICKEL-CONT
50 N2-CONT
51 OLEF-WT-PCT
52 PARAF-VOL-PCT
53 PARAF-WT-PCT
54 REFRACT-INDEX
55 SMOKE-PT
56 SODIUM-CONT
57 STD-LIQ-DEN
58 SULFUR-MCAP-WT
59 TBP-X-PCT
60 WAX-CONT
61 X-PCT-EVAP
Input Language
variableid.conn_type = {conn_type}
Overview
Variable data within any model in OOMF can serve as a global data structure
that can be used within another model in OOMF. Models that contain global
structure data can be instantiated and deleted in a manner similar to any
other OOMF model. In order to account for the possibility that the model with
global structure data may move around in the matrix after it is first
instantiated since a hierarchy container or another intermediate block may
expand or contract and to account for the possibility that the global structure
may be deleted by a user without deleting the model that uses the structure,
a generic OOMF model has the capability to restructure itself in place, i.e.,
starting at the position in the matrix where it was first instantiated.
Since a generic OOMF model can now restructure itself after it is placed in the
matrix, it can be parameterized by another model that contains global
structure data. For example, a model that wishes to be a consumer of
external global data within another model should have a named block
attribute or parameter that can later be associated with an instance of the
model that contains the global data. This mechanism will allow the model
that is consumer of a global structure to be able to instantiate itself in the
matrix even if the global structure has not been placed yet. When the model
that uses an external global structure, referred to as “AModel”, is first
instantiated, with instance name “B2”, it can build all its variables, including
dummy variables that are similar to those contained in the structure
instance, and the associated equations. Later, when a model with global
structure data, referred to as “AStruct”, is instantiated, with instance name
“B1”, and the global structure parameter of “B2” is assigned to be “B1”, “B2”
will restructure itself in place, i.e., the dummy (redundant) variables
and incorrect rows in “B2” will get eliminated and a new set of variables and
equations that now refer to the global structure data from “B1” will be
created. The choice of what “B2” adds to the matrix initially when the global
structure instance is not present and later when it restructures is completely
up to the model writer. The only requirement is that “B2” is square before
and after the global structure instance is assigned.
OOMF’s default implementation of the abstract class AMFEOBlock,
AMFEOBlockImpl, provides all the necessary functionality. All OOMF
Example
An example of how the global structure data within AStruct can be used within a
generic OOMF model AModel is presented in the example script that follows:
load lib "amodel"
load lib "astruct"
load lib "pltcon"
DEFINE SUPERPLANT myplant
END myplant
add block hier as myplant
add block b1 as astruct
push scope hier
add block b2 as amodel
add block PLT as pltcon
print var
print eqn
print jac
//Assign the global structure parameter name in block B2 to be
the global structure instance named “B1”
B2.MYSTRUCT="B1"
print var
print eqn
print jac
This chapter describes the commands that let you use Aspen Properties data
in an OOMF simulation.
Input Language
LOAD PROP DATA filename
Input Language
FREE PROP DATA filename
Aspen Plus embeds OOMF and extends its equation oriented capabilities. The
following sections explain how to use OOMF and these extensions from within
the Aspen Plus user interface or the engine.
Executing Scripts
Scripts may be executed in a number of ways:
By manually executing the script from the command line or from another
script. This may be done with the INVOKE, INVOKELOCAL and
INVOKEGLOBAL commands.
By associating the script with a block or the flowsheet. This is done by
assigning the script as a method attached to the block. A method is a
function that is called at specific times during the execution sequence of
OOMF. The following methods are available:
INIT This method is executed when the block is created and is available for
all blocks except hierarchies.
PRESOLVE This method is executed before a solve is started. It can be very useful
for defining run-specific information, such as process data.
POSTSOLVE This method is executed after a solve is completed. This is useful for
checking the results of the run and writing customized reports.
Command Summary
In addition to the generic OOMF commands mentioned in previous sections,
the following commands are available within the Aspen Plus environment.
EO Commands
Command Purpose
APPLY SOLVER SETTINGS Apply the solver settings from the input file to the current mode.
DISABLE HXFLUX Disable all Hxflux connections in the local scope.
DISABLE STREAM Disable all streams in the local scope.
ENABLE HXFLUX Enable all Hxflux connections in the local scope.
ENABLE STREAM Enable all streams in the local scope.
HXFLUX Turn on/off Aspen Plus Hxflux connections
INVOKEGLOBAL Execute commands in a GLOBALSCRIPT
INVOKELOCAL Execute commands in a LOCALSCRIPT from block script
PRINT COMPONENT LIST Print the list of components in a component group.
RECOVER Recover from a bad EO solution by calling every block's pre and post-
solve steps
REPORT ALL Print a report for blocks and streams
REPORT APBLK Report on overall work requirements for blocks and thermo
REPORT FLOWSHEET Make an Aspen Plus flowsheet report
REPORT FULL Print a full Aspen Plus report for the current set of blocks and streams
REPORT STREAMS Print an Aspen Plus stream report
SETCOMPLIST Set the list of components in a component group to a variable.
STREAMS Turn on/off AspenPlus stream connections
SYNCHRONIZE Synchronize an Aspen Plus block with its block bead
UPDATE BLEND Update the crude assays
UPDATE PDF Update the AspenPlus PDF
See Also
Standard OOMF - Command Summary
Input Language
INVOKELOCAL scriptid, arg1, arg2, …
Input Language
INVOKEGLOBAL scriptid, arg1, arg2, …
Input Language
UPDATE BLEND
Input Language
UPDATE PDF
Hierarchies
Aspen Plus has the following extensions that make it easier for a user to
create hierarchies.
See Also
Standard OOMF - Hierarchies
Hierarchy Input
Hierarchies have sets of input that are similar to what can be defined for an
entire flowsheet. These include:
Property methods.
Streams.
Blocks.
Convergence options, such as EO solver parameters.
Stream Commands
Adding and Removing Stream Connections
This command controls all the Aspen Plus stream connections within the
current scope.
Input Language
STREAMS status
Input Language
DISABLE STREAMS
Input Language
ENABLE STREAMS
HXFlux Commands
These commands are used to control the connections configured for HXFlux
blocks. These commands only affect the HXFlux connections defined through
the block’s input form and not connections defined through EO
Configuration | Connection forms.
Input Language
HXFLUX status
Input Language
DISABLE HXFLUX
This command disables both the temperature and duty connections for all
HXFlux blocks in the current scope. A PRINT INACTIVE CONNECTIONS
command will show the disabled connections. This command no effect on
connections defined through the EO Configuration | Connection forms.
Input Language
ENABLE HXFLUX
Recovery Commands
These commands are used to restore the problem state after a failed solution.
Recovery
This command calls every block's pre and post-solve methods. This command
was introduced because Aspen Plus blocks use their post-solve method to
update SM block values after an EO solution. If the EO solution does not
converge, the EO variable values are bad and the SM data is corrupted with
bad values. In order to recover the state of the flowsheet, you must use the
RESET VARIABLES command to restore the EO variable values, followed by
this command.
Report Commands
These commands are used to generate an Aspen Plus report.
Reporting Everything
These commands print Aspen Plus report files. REPORT ALL prints
information on the current scope level only (not into any hierarchies).
REPORT FULL prints information on the complete flowsheet, regardless of
the current scope.
Input Language
REPORT ALL
REPORT FULL
Input Language
REPORT FLOWSHEET
Reporting Streams
This command prints a report of the specified streams to the report device.
Input Language
REPORT STREAMS stream_list
See Also
Standard OOMF – Report Commands
See Also
Standard OOMF - Using the Interactive Prompt
Command Summary
In addition to the generic OOMF commands mentioned in previous sections,
the following commands are available within the Aspen HYSYS Refining
environment. These commands are implemented in the OOMF loadable DLL
called refcmds.
See Also
Standard OOMF - Command Summary
Index 201
BSMALL LSSQP parameter, 135 customer support, 7
BUILD_DATE script parameter, DATE script parameter, 27
27, 146 DEFAULT_FLUSHING script
BUILD_NUMBER script parameter, parameter, 24, 27
27, 146 DEFINED script function, 42
Built-In script parameters, 27 Degrees of freedom, checking, 126
CHANGE FLUSHING script Deleting a snapshot
command, 24 script command, 150
CHANGE SCOPE script command, Deleting a task
58 script command, 148
CHANGE variable attribute, 68 DELTLS LSSQP parameter, 135
CHECK CONNECTIONS script DERDIF LSSQP parameter, 137
command, 88 DERIV_METHOD block attribute, 65
CHECK MEASUREMENT script Derivative Commands. See
command, 92 Jacobian and Derivative
Check_steps NSOLVE parameter, Commands
138 DERIVATIVE script command, 124
CHECK_UOM script parameter, 27 DERMIN LSSQP parameter, 137
CHGBND LSSQP parameter, 133 DEVICEINFO script function, 41
CHGMAX LSSQP parameter, 133 DIAG_LEVEL script parameter, 27
Command Line Prompt, Using, 4 DIRECTION Objective function
Command Line Prompt, Using in attribute, 120
Aspen Plus, 186 DISABLE CONNECTION script
Command Line Prompt, Using in command, 87
RefSYS, 200 DISABLE HXFLUX script command,
Command Line Prompt, Using with 192
ACM Models, 196 DISABLE MEASUREMENT script
COMPARE VARFILE script command, 93
command, 106 DISABLE SPECIFICATION GROUPS
Connection Commands script command, 81
Checking connections, 88 DISABLE STREAMS script
Disabling connections, 87 command, 191
Enabling connections, 87 Divergent_steps NSOLVE
Printing connection variables, 90 parameter, 137
Printing connections, 88 DMO script command, 130
Printing inactive connections, 89 DPERTF LSSQP parameter, 137
Printing incomplete connections, DROPTOL DMO parameter, 131
89 DYN_INTERVAL
Removing Connections, 85, 86 script parameter, 146
Connections DYN_RUN_TO
And variable specifications, 85 script parameter, 146
CONNECTIONS script command, 88 e-bulletins, 7
CONNECTIONSBYVAR script ECHO script command, 144
function, 42 ENABLE CONNECTION script
Controlling kernel command, 87
Defined, 56 ENABLE HXFLUX script command,
CONVERGED script parameter, 27 193
COS script function, 39 ENABLE MEASUREMENT script
CREEPFLAG DMO parameter, 131 command, 93
CREEPITER DMO parameter, 131 ENABLE SPECIFICATION GROUP
CREEPSIZE DMO parameter, 131 script command, 81
Crude blends ENABLE STREAMS script command,
Update script command, 190 191
202 Index
Equal to (=) script function, 41 FLUSH script command, 24
Equation Commands FOR-DO script command, 36
Evaluating, 77 Formatted printing, 141
Excluding, 77 Freeing Properties Data
Including, 77 script command, 184
Printing, 78 FSCALF LSSQP parameter, 135
Printing largest, 78 Function_tolerance NSOLVE
Printing largest residual prices, parameter, 138
79 Global script parameters, 26
ETASKP LSSQP parameter, 135 Global Scripts
EVALUATE JACOBIAN script Defining, 5, 187
command, 123 Invoking, 189
EVALUATE OBJECTIVE DERIVATIVE GNPMAX LSSQP parameter, 134
script command, 121 Greater than (>) script function,
EVALUATE OBJECTIVE HESSIAN 41
script command, 121 Greater than or equal to (>=)
EVALUATE OBJECTIVE script script function, 41
command, 121 HEAD script function, 42
EXCLUDE BLOCKS script command, help desk, 7
62 HELP script command, 51
EXISTFILE script function, 41 HESSIANUPDATES DMO
EXIT script command, 51 parameter, 132
EXP script function, 39 Hierarchies
FACTORSPACE DMO parameter, Defining the scope, 58
132 Finding a block, 59
FACTORSPREED DMO parameter, Printing the hierarchy, 59
131 Solving a hierarchy, 60
File Commands HISTORY_DEVICE script
Comparing variables with an parameter, 23, 27
ASCII file, 106 HXFlux Commands
Restoring free variables from a Controlling HXFlux Connections,
binary file, 104 192
Restoring variables and block Disabling HXFlux Connections,
attributes from an ASCII file, 192
107 Enabling HXFlux Connections,
Restoring variables from a binary 193
file, 103, 109, 110, 111, 116, HXFLUX script command, 192
117 ID2STRING script function, 40
Restoring variables from an IFDITR LSSQP parameter, 136
ASCII file, 105 IFDTYP LSSQP parameter, 136,
Saving variables and block 137
attributes to an ASCII file, IF-THEN-ELSE script command, 35
107 Inactivating a variable profile
Saving variables to a binary file, script command, 149
102 INCLUDE BLOCKS script command,
Saving variables to an ASCII file, 63
105 INCLUDED block attribute, 65
Updating variables in a binary INCLUDED Equation attribute, 77
file, 104 INDEX script function, 40
File script functions, 41 INITIAL variable attribute, 68
FIND BLOCK script command, 59 Input Language Rules, 6
FLANGE_PHASE script parameter, INSERTSTR script function, 40
27 INT script function, 39
Index 203
Interactive Prompt, Using, 4 LINCST LSSQP parameter, 136
Interactive Prompt, Using in Aspen LINESEARCH DMO parameter, 131
Plus, 186 list concatenation script function,
Interactive Prompt, Using in 42
RefSYS, 200 List script functions, 42
Interactive Prompt, Using with ACM Loading a snapshot
Models, 196 script command, 150
INVOKE command, 33 Loading Properties Data
Invoke Commands script command, 184
Invoking a block script, 33 Loading task definitions
Invoking a global script, 189 script command, 148
Invoking a local script, 189 LOCAL script command, 29
Invoking an external file, 33 Local script parameters, 27
Invoking scripts within a scope, Local Scripts
34 Defining, 5, 187
Using script arguments, 34 Invoking, 189
INVOKEGLOBAL command, 189 LOG10 script function, 39
INVOKELOCAL command, 189 LOGE script function, 39
ITRBND LSSQP parameter, 133 Logical script functions, 41
IWORKF DMO parameter, 132 LOWER variable attribute, 68
Jacobian and Derivative Commands LSCOPT LSSQP parameter, 134
Analyzing the Jacobian, 122 LSIZEB LSSQP parameter, 135
Analyzing the Jacobian Sparsity, LSSQP script command, 132
122 LUBNDS LSSQP parameter, 136
Evaluating the Jacobian, 123 LUSTATS DMO parameter, 132
Printing block derivative MAJOR_VERSION script parameter,
methods, 124 28
Printing the Jacobian, 123 Mathematical script functions, 39
Printing the Jacobian equations, Maximum_function_error NSOLVE
124 parameter, 138
Printing the Jacobian variables, Maximum_iterations NSOLVE
123 Parameter, 137
JOURNAL_DEVICE script MAXITER DMO parameter, 131
parameter, 24, 28 MAXITR LSSQP parameter, 133
JOURNAL_LEVEL script parameter, MAXLSC LSSQP parameter, 133
24, 28 MAXQPF LSSQP parameter, 134
Journaling. See Redirecting Output MAXSLF LSSQP parameter, 133
and Journaling MDHESS LSSQP parameter, 134
KBKOUT LSSQP parameter, 136 MEAS_CAPACITY script parameter,
KFOWDG LSSQP parameter, 136 28
KMUDEC LSSQP parameter, 134 Measurement Commands
KOWARM LSSQP parameter, 136 Checking measurements, 92
KPFREQ LSSQP parameter, 133 Disabling measurements, 93
KPNTOP LSSQP parameter, 133 Enabling measurements, 93
KPTLEV Measurement Qualities, 97
IXSCS Parameter, 134 Printing measurements, 94
KPTLEV LSSQP Parameter, 133 Printing measurements variables,
LCHBAS LSSQP parameter, 135 94
LENGTH script function, 40 MEASUREMENTSBYVAR script
Less than (<) script function, 41 function, 42
Less than or equal to (<=) script Methods
function, 41 Defined, 5, 187
LEWBAS LSSQP parameter, 134 MINITER DMO parameter, 131
204 Index
MINITR LSSQP parameter, 133 PRINT ACTIVE_BOUNDS script
MINOR_VERSION script parameter, command, 72
28 PRINT ACTIVE_BOUNDS SSI script
MODE script parameter, 28 command, 72
Modes PRINT ALIAS script command, 75
script parameter for, 28 PRINT ALIAS VARIABLES script
MOVE block attribute, 65 command, 76
MOVEAMOUNT block attribute, 65 PRINT BLOCK ATTRIBUTES script
MSFREQ LSSQP parameter, 135 command, 65, 66
MSMETH LSSQP parameter, 136 PRINT BLOCK CONVERGENCE
NAME_WIDTH script parameter, 28 script command, 64
NBDBAS LSSQP parameter, 136 PRINT BLOCK HIERARCHY script
NFEASB LSSQP parameter, 133 command, 59
NFINFB LSSQP parameter, 133 PRINT BLOCK PORTS DETAILED
NICHK LSSQP parameter, 136 script command, 83
NLRATIODEV block attribute, 65 PRINT BLOCK PORTS script
NNDCMP LSSQP parameter, 135 command, 83
Not equal to (<>) script function, PRINT BLOCK STATISTICS FULL
41 script command, 64
NOT script function, 41 PRINT BLOCK STATISTICS script
NSOLVE script command, 137 command, 64
NUMBER_WIDTH script parameter, Print Commands
28 Formatted printing, 141
OBJCVG DMO parameter, 132 Miscellaneous print commands,
Objective Function Commands 144
Attributes, 120 Printing problem convergence,
Evaluating the objective function, 140
121 Printing the problem summary,
Evaluating the objective 140
function’s derivatives, 121 PRINT CONNECTION VARIABLES
Evaluating the objective script command, 90
function’s Hessian, 121 PRINT CONVERGENCE SUMMARY
Printing the objective function, script command, 140
122 PRINT EQUATIONS script
OBJECTIVE script parameter, 28 command, 78
ONLINE script parameter, 28 PRINT FIXED script command, 71
OPENBINARY script function, 41 PRINT FLUSHING script command,
OPENFILE script function, 41 24
OPENTEE script function, 41 PRINT FORMATTED script
OR script function, 41 command, 141
P_AMB script parameter, 28 PRINT INACTIVE CONNECTIONS
Pausing a simulation script command, 89
script command, 147 PRINT INACTIVE SPECIFICATION
PERT block attribute, 65 GROUPS Script command, 81
PHASE Stream attribute, 84 PRINT INCOMPLETE CONNECTIONS
Physical Type, 172 script command, 89
PIVOTSEARCH DMO parameter, PRINT JACOBIAN EQUATIONS
132 script command, 124
POP SCOPE script command, 58 PRINT JACOBIAN script command,
Port Commands. See Stream 123
Commands PRINT JACOBIAN VARIABLES script
PORTVAR script function, 42 command, 123
Power (^) script function, 39
Index 205
PRINT LARGEST EQUATION Program flow control
SCALED_SHADOW_PRICES FOR-DO constructs, 36
script command, 79 IF-THEN-ELSE constructs, 35
PRINT LARGEST EQUATION WHILE-DO constructs, 37
SHADOW_PRICES script PROMPT script parameter, 28
command, 79 PUSH SCOPE script command, 58
PRINT LARGEST RESIDUAL QPINFE LSSQP parameter, 134
SCALED_SHADOW_PRICES QPSTATS DMO parameter, 132
script command, 79 Query
PRINT LARGEST RESIDUAL Printing variables with, 73
SHADOW_PRICES script Query script functions, 42
command, 79 QUERYSPEVGROUPS script
PRINT LARGEST RESIDUALS script function, 42
command, 78 QUERYVARS script function, 42
PRINT LARGEST VARIABLE QUIT script command, 51
SHADOW PRICES script READ SNAPSHOT script command,
command, 72 107
PRINT LARGEST VARIABLE READ VARFILE EXCEPT script
SHADOW PRICES SSI script command, 105
command, 72 READ VARFILE script command,
PRINT MEASUREMENTS script 105
command, 94 READ_VARFILE_MASK script
PRINT MEASUREMENTS VARIABLES parameter, 28
script command, 94 RECOVER script command, 193
PRINT OBJECTIVE script command, Recovery commands
122 Recovery, 193
PRINT QUERY script command, 73 Resetting variables, 139
PRINT RESIDUALS script Redirecting output and Journaling
command, 78 Examining the output devices, 25
PRINT SCOPE script command, 58 Flushing, 24
PRINT SPECIFICATION GROUP Journaling, 24
VARIABLES script command, Redirecting the output of a
82 command, 21
PRINT SPECIFICATION GROUPS the history device, 23
script command, 81 the report device, 23
PRINT SPECIFICATIONS script Reinitializing a simulation
command, 71 script command, 148
PRINT SUMMARY script command, Relational script functions, 41
140 RELAX_TOL script parameter, 28
PRINT TIMER script command, 51 RELEPS LSSQP parameter, 133
PRINT UOM script command, 160 REMOVE CONNECTIONS script
PRINT VARIABLES script command, command, 85, 86
70 REMOVE SPECIFICATION GROUPS
PRINT VARIABLES SSI script script command, 80, 147, 148,
command, 70 149, 150
Print_level NSOLVE parameter, 138 REMOVESTR script function, 40
PRINT_VAR_MASK script REPORT ALL script command, 194
parameter, 28 REPORT BLOCKS script command,
PRINTFREQ DMO parameter, 132 145
PROBID script parameter, 28 Report Commands
PROBNAME script parameter, 28 Reporting blocks, 145
PROCESS VARIABLE QUALITY Reporting everything, 194
script command, 97 Reporting streams, 194
206 Index
Reporting the flowsheet, 194 Accessing, 31
Reporting the objective function, Built-in script parameters, 27
145 Global script parameters, 26
REPORT FLOWSHEET script Local script parameters, 27
command, 194 Setting, 29
REPORT OBJECTIVE script Unsetting, 31
command, 145 SCRIPT_PATH script parameter, 29
REPORT STREAMS script command, Scripts
194 Defining, 5, 187
REPORT_DEVICE script parameter, Executing, 5, 187
23, 29 Global, defined, 5, 187
RESCVG DMO parameter, 132 Local, defined, 5, 187
RESET SCOPE script command, 58 SEARCHMODE DMO parameter,
RESET VARIABLES script 131
command, 139 SENSITIVITY script command, 126
Residual Commands. See Equation SET script command, 29
Commands SIN script function, 39
RESTART TIMER script command, SINGT1 LSSQP parameter, 135
51 SINGT2 LSSQP parameter, 135
RESTORE FREE VARIABLES EXCEPT SMLSCL LSSQP parameter, 135
script command, 104 snapshot, 150
RESTORE FREE VARIABLES script SOFT_BOUND script parameter, 29
command, 104 SOLVE script command, 138
RESTORE VARIABLES script Solver commands
command, 103, 109, 110, 111, Entering DMO parameters, 130
116, 117 Entering LSSQP parameters, 132
RETURN command, 34 Entering NSOLVE parameters,
RFEASB LSSQP parameter, 133 137
RFINFB LSSQP parameter, 133 Setting the solver, 130
RIGORUPDATES DMO parameter, Solving the problem, 138
132 Viewing solver settings, 130
RRHIGH LSSQP parameter, 135 SOLVER script command, 130
RRLOW LSSQP parameter, 135 SOLVER SETTINGS script
RUN_MODE command, 130
script parameter, 146 SPDROP LSSQP parameter, 135
Running a simulation SPEC Stream attribute, 84
script command, 147 SPEC variable attribute, 68
RWORKF DMO parameter, 132 SPECGROUPSBYVAR script
SAVE VARIABLES script command, function, 42
102 Specification Group Commands
SAVEJDFFILE DMO parameter, 132 Disabling Specification Groups,
Saving a snapshot 81
script command, 150 Enabling Specification Groups,
SBWEIGHT variable attribute, 68 81
SCALE Objective function attribute, Printing inactive specification
120 groups, 81
SCALE variable attribute, 68 Printing Specification Group
Scope variables, 82
Defined, 56 Printing specification groups, 81
SCOPE INVOKE command, 34 Removing Specification Groups,
SCREENFORM DMO parameter, 132 80, 147, 148, 149, 150
Script Functions, 39 Specification variable attribute, 68
Script parameters SQRT script function, 39
Index 207
Stabilization NSOLVE parameter, Units of measure commands
138 Dealing with Untyped Variables,
Stable_iterations NSOLVE 161
parameter, 137 Printing units of measure, 160
START TIMER script command, 51 Variable Units of Measure, 160,
STEP variable attribute, 68 178
STEP_BOUND script parameter, 29 UNITS variable attribute, 68
Stepping through a simulation UNSET script command, 31
script command, 147 UOM Objective function attribute,
STOP TIMER script command, 51 120
Stopping a simulation UOM_WIDTH script parameter, 29
script command, 147 UPDATE BLEND script command,
Stream Commands 190
Adding and removing stream UPDATE PDF script command, 190
connections, 191 UPDATE VARIABLES script
Attributes, 84 command, 104
Disabling Stream connections, UPPER variable attribute, 68
191 USERDROPTOL DMO parameter,
Enabling Stream connections, 131
191 VAL script function, 42
Printing block ports, 83 VALUE Objective function attribute,
Printing connections, 88 120
Printing stream values, 83 VALUE variable attribute, 68
STREAMS script command, 191 Variable Commands
string concatenation script Changing variable attributes, 69
function, 40 Printing connections, 88
String script functions, 40 Printing largest variable shadow
STRING2ID script function, 40 prices, 72
SUBSTR script function, 40 Printing variables, 70
support, technical, 7 Printing variables fixed in other
Swapping Properties Data modes, 71
script command, 184 Printing variables fixed in the
System commands, executing, 51 current mode, 71
SYSTEM script command, 51 Printing variables using a query,
TAIL script function, 42 73
TAN script function, 39 Printing variables with active
task, 148 bounds, 72
task language, 151 Variable_tolerance NSOLVE
TAUHYB LSSQP parameter, 135 parameter, 138
technical support, 7 VARSCALE DMO parameter, 132
TIMER script commands, 51 Viewing a variable history
TO script command, 21 script command, 149
TOGGLE SOLVE SCOPE script Viewing a variable profile
command, 60 script command, 149
TOLANA LSSQP parameter, 134 Viewing snapshots
TOLBAS LSSQP parameter, 134 script command, 150
TOLOWER script function, 40 Viewing tasks
TOUPPER script function, 40 script command, 148
Trust_radius NSOLVE parameter, VMUINI LSSQP parameter, 135
138 VMUMIN LSSQP parameter, 135
TYPE Stream attribute, 84 web site, technical support, 7
TYPEOF script function, 42 WHILE-DO script command, 37
Units of measure, 162 Wildcards
208 Index
Glob-style, 48 WRITE VARFILE script command,
Regular expression matching, 48 105
WRITE SNAPSHOT script WRITE_VARFILE_MASK script
command, 107 parameter, 29
WRITE VARFILE EXCEPT script XPMIN LSSQP parameter, 137
command, 105 ZEROTOL block attribute, 65
ZPERTF LSSQP parameter, 136
Index 209
210 Index