MT is the working name for a new capability in JAS that allow users to change the onHand and/or authorized amounts of Bse assets. These changes can be made absolutely or relatively, and can occur at specific sim times or be triggered by knowledge base changes.
Currently MT data is read from a csv file. The location of this file is specified by the MtData setting under the System heading in the jasS.ini file. The name of this file is user-specified. Future development will include a gui.
; File: jasS.ini ; Title: Settings file for JAS Simulation System [System] ErrorLogFile=simError.log MtData=C:\Documents and Settings\DefaultUser\My Documents\JAS\resourceChanges.csv
There are 11 data fields in the input file:
The MT data file is read during sim initialization. Each line in the file is checked for errors, the results are logged to the Jas message log, and each line that passes edit checks is stored in the scenario data as a JwResourceChange object. JwResourceChange objects can be activated in two different ways:
Once the simulation is through with initialization, it asks each object in the scenario if there is anything it wants to do before the sim starts playing by sending the message simulationIsAboutToStart. When the JtfC2 object for each side receives this message, it selects all the JwResourceChanges that belong to its side that have an explicit time value. These JwResourceChanges are scheduled for execution at the time specified if the bse is still alive (not dead and not dissolved).
JwResourceChanges that have a factValue rather than an explicit time are scheduled for immediate execution if the fact that references them turns true in the knowledge base, and the bse is still alive (not dead and not dissolved).
There are two possibilities when the onHandChangeType is absolute ('A')– the bse does or does not have the asset.
Relative amount changes are only applied to existing assets and in no case will the resulting onHand amount be negative.
OnHand Before | Relative Change | OnHand After |
---|---|---|
100 | 12 | 112 |
100 | -12 | 88 |
100 | -112 | 0 |
There are two possibilities when the authorizedChangeType is absolute ('A')– the bse does or does not have the asset.
Relative amount changes are only applied to existing assets and in no case will the resulting authorized amount be negative.
Authorized Before | Relative Change | Authorized After |
---|---|---|
100 | 12 | 112 |
100 | -12 | 88 |
100 | -112 | 0 |
Resource changes to a bse can be applied to A(ll) of a bse's subordinates, N)one of them, or to just the bse's I(mmediate) subordinates.
Value of appliesToSubordinates | Change |
---|---|
N | Bse only |
I | Bse and immediate subordinates only |
A | Bse and all subordinates |
To trigger resource changes from the knowledge base, first set up a fact that will eventually evaluate to true. This fact should logically be put on the JtfC2 knowledge base for the appropriate side. This example uses a ScheduledEvent that goes true at time = 4.0.
On the ScheduledEvent, select Process MT as the action.
Then enter a value in the Requested MT Value field that corresponds to the factValue of the JwResourceChanges that you want to execute on this fact.
There is currently no specific MT instrumentation. The results of changes to onHand amounts can be seen in the Resource Accounting instrument. You can see the results of MT processing in the JAS message log by turning on the MTDebug message category.