User Tools

Site Tools


allthatjas:mt

MT

Three new capabilities have been added:

  1. changes can be flagged as inactive so that you don't have to delete them.
  2. percentage changes can be rounded to integers.
  3. The to Bse Id, to Time, and to Fact Value fields will allow you to 'move' the changes you specify to another bse.

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, relatively, or by percentage, and can occur at specific sim times or be triggered by knowledge base changes.

Data

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 16 data fields in the input file:

  1. side - the string US-JTF or OPFOR. Required.
  2. isActive - one of (T)rue or (F)alse. Only the first character is considered. Not case-sensitive. Required.
  3. time - integer or float. Empty means nil.
  4. factValue - the value passed by the knowledge base action Process MT. Empty means nil.
  5. bseId - a string specifying the name of the bse whose resourceAccount will be changed. Required.
  6. appliesToSubordinates - one of I(mmediate), A(ll), or (N)one. Required.
  7. assetName - the string name of the asset to be changed. Required.
  8. authorizedChangeType- one of (A)bsolute, (R)elative, or (P)ercentage. Only the first character is considered. Not case-sensitive. Empty means nil.
  9. authorizedChangeAmount - integer or float. Empty means nil.
  10. onHandChangeType - one of (A)bsolute, (R)elative, or (P)ercentage. Required. Only the first character is considered. Not case-sensitive. Empty means nil.
  11. onHandChangeAmount - integer or float. Empty means nil.
  12. useRounding - one of (T)rue or (F)alse. Only the first character is considered. Not case-sensitive. Required.
  13. toBseId - a string specifying the name of the bse that will receive the assets 'moved' from the bse above. Optional.
  14. toTime - integer or float. Empty means nil.
  15. toFactValue - the value passed by the knowledge base action Process MT. Empty means nil.
  16. comments - optional

Data Editing

  • A line that begins with a pound sign (#) is considered a comment. Comments are logged and ignored.
  • An empty field means nil - no value.
  • A line with inActive set to False will be logged and ignored.
  • Time cannot be negative.
  • Time or factValue is required.
  • A line with both time and factValue is an error.
  • The bse specified by bseId must exist in scenario data and be playing. It does not have to be active.
  • The asset specified by assetName must exist in scenario data. It does not have to be in the specified bse's resource account.
  • One of onHandChangeType or authorizedChangeType is required to be absolute ('A'), (P)ercentage, or relative ('r'). Both is ok, and will make this entry change both.
  • Both onHandChangeAmount and authorizedChangeAmount cannot be empty.
  • If either onHandChangeType or authorizedChangeType is absolute ('A') or (P)ercentage, the respective changeAmount must not be negative. Only relative ('R') changes can be negative

MT Activation

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:

  • by time
  • by the knowledge base

Time Activation

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).

Knowledge Base Activation

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).

MT Execution

On Hand Amount Changes

Absolute Amount Changes

There are two possibilities when the onHandChangeType is absolute ('A')– the bse does or does not have the asset.

  1. if the bse does have the asset, the onHand amount of the existing asset is changed to the JwResourceChange onHandChangeAmount absolutely.
  2. if the bse does not have the asset, a new asset is created with both the onHand and authorized amounts set to the JwResourceChange onHandChangeAmount.
Percentage Changes

Percentage changes are multipliers that specify the resulting amount, not the amount that will be changed. This means, for example, that if you want to reduce an asset by 20%, you should enter 80 in the changeAmount field. Percentage changes are only applied to existing assets.

OnHand Before Percentage Change OnHand After
100 12 12
100 143 143
Relative Amount Changes

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

Authorized Amount Changes

Absolute Amount Changes

There are two possibilities when the authorizedChangeType is absolute ('A')– the bse does or does not have the asset.

  1. if the bse does have the asset, the authorized amount of the existing asset is changed to the JwResourceChange authorizedChangeAmount absolutely.
  2. if the bse does not have the asset, a new asset is created with the authorized amount set to the JwResourceChange authorizedChangeAmount and the onHand amount set to zero.
Percentage Changes

Percentage changes are multipliers that specify the resulting amount, not the amount that will be changed. This means, for example, that if you want to reduce an asset by 20%, you should enter 80 in the changeAmount field. Percentage changes are only applied to existing assets.

Authorized Before Percentage Change Authorized After
100 43 43
100 233 233
Relative Amount Changes

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
Applying Changes to Subordinates

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
Moving Assets to Another Bse

If the toBseId field is not empty and one of toTime or toFactValue is specified, assets removed from the bse identified by bseId will be moved to the bse identified by toBseId if possible. In no case will more than the current amountOnHand of the specified asset held by the bse identified by bseId, reflecting recent attrition, be moved. You can't move what you don't have.

  • (A)bsolute changes will add or subtract the onHandChangeAmount from the current amountOnHand.
  • (P)ercentage changes must be less than 100. You can't move what you don't have.
  • (R)elative amounts must be negative. You can't move what you don't have.
  • Changes are not applied to subordinates. The appliesToSubordinates value is ignored.
  • Moving can be done at a specific time or triggered by a fact value. For instance, in the example that follows, you can decrement BLUE_AIRFIELD1 at sim time 40, and then increment (move) the A10 assets of BLUE_AIRFIELD2 at time 42. If you do something like this, the assets do not exist anywhere between hours 40 and 42, because they have been removed from BLUE_AIRFIELD1, but not yet moved to BLUE_AIRFIELD2.
bse idAssetOnhand beforechangetypechangeAmountSpecifiedamountToChangeComputedonhand afterto bse idOnhand beforeonhand after
BLUE_AIRBASE1A10200P25-15050BLUE_AIRBASE2100250
BLUE_AIRBASE1A10200R-50-50150BLUE_AIRBASE2100150
BLUE_AIRBASE1A10200R-250-2000BLUE_AIRBASE2100300
BLUE_AIRBASE1A10200A50-15050BLUE_AIRBASE2100250
BLUE_AIRBASE1A10200A0-2000BLUE_AIRBASE2100300

Knowledge Base

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.

The completed ScheduledEvent looks like this:

When ScheduledEvent1 becomes true at hour 4, both JtfC2s look through the resourceChanges for JwResourceChanges that are on their side and have a factValue = 'MT1'. Any JwResourceChanges found are scheduled for immediate execution.

Instrumentation and Logging

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.

To Do

  • Gui
  • Instrumentation

Alternate Names

  • REC - Resource Explicit Change
  • MAJIC - Manual Adjustment of Jas Inventory Contents
/volume1/synshare/web/macqueen.us/dokuwiki/data/pages/allthatjas/mt.txt · Last modified: 2010/02/11 23:04 by 127.0.0.1