| org.cougaar.lib.filter.UTILExpanderPluginAdapter org.cougaar.logistics.plugin.trans.base.GLMTransOneToManyExpanderPlugin
Inner Class :protected static class IntRange extends OMCRange | |
Inner Class :class BufferingAlarm implements Alarm | |
Method Summary | |
protected void | addToDimension(String ccc, double quantity, PhysicalPG itemPhysicalPG, CargoCatCodeDimensionPG cccdPG) | public void | attachPG(Asset asset, PropertyGroup thisPG) | protected void | attachRoute(Task parentTask, Task subtask)
Attaches two preps to task : SEAROUTE and SEAROUTE_DISTANCE
SEAROUTE will appear in the TPFDD Viewer as the path of the ship, if the
item goes by ship. | public Vector | expandAsset(Task task, Asset asset)
Function that breaks up a AssetGroup or AggregateAsset into smaller pieces.
Return values should only by Assets and small AggregateAssets (derived classes
must determine how big is OK. | public BlackboardService | getBlackboard() | protected String | getCategory(GLMAsset asset) | final public DomainService | getDomainService() | protected Task | getLowFidelityTask(Task parentTask, Set uniformAssets) | protected int | getMode(Task parentTask) | protected int | getNextID() | protected String | getOriginalOwner(Task parentTask) Recovers owner of task's d.o. | protected List | getPrunedTaskList(List tasks) | public Vector | getSubtasks(Task parentTask)
Implemented for UTILExpanderPlugin interface
Break up tasks into constituent parts.
There are three possible paths a task can take:
1) If the task is already a LEVEL 2 task, attaches a lowFiAssetPG to the asset and
passes it through.
2) If the task's dates and the operating mode VTH determine it should be handled
in level-2 mode, create a level-2 task from the original
3) If the task should be handled in level-6, expand it's d.o. | protected String | getTransportType(CargoCatCodeDimensionPG cccd) | public void | handleTask(Task parentTask) | public boolean | interestingTask(Task t) | protected boolean | isPersonTask(Task parentTask)
Tries to determine if direct object is a person aggregate.
Can be tricky since sometimes the d.o. | public boolean | isTaskWellFormed(Task taskToCheck)
Examines task to see if task looks like what the plugin
expects it to look like. | public void | localSetup() | protected Task | makeTask(Task parentTask, Asset directObject, String originalOwner) Makes subtask of parent task, with given direct object. | public void | processTasks(java.util.List tasks) | protected void | replanLevel2(Collection level2Tasks) Remove the expansions of tasks that were previously expanded
into level-2 subtasks. | public void | reviewLevel2() | protected CargoCatCodeDimensionPG | setDimensions(Task parentTask, NewPhysicalPG physicalPG, Collection realAssets)
Takes a collection of assets and sets the dimensions of the physical pg
to be their sum, in area, volume, and weight. | public void | setDomainService(DomainService ds)
NOTE : This is called magically by reflection from BindingUtility.setServices
setServices looks for any method in a component that starts with "set" and
tries to find a service X. | public void | setThreadService(ThreadService ts) | public void | setupFilters() | protected void | setupOperatingModes() | protected Set[] | sortAssetsByCategory(Collection assets) | public void | startAgainIn(long millis) |
ASSET_CLASS_1 | final public int ASSET_CLASS_1(Code) | | |
ASSET_CLASS_10 | final public int ASSET_CLASS_10(Code) | | |
ASSET_CLASS_2 | final public int ASSET_CLASS_2(Code) | | |
ASSET_CLASS_3 | final public int ASSET_CLASS_3(Code) | | |
ASSET_CLASS_4 | final public int ASSET_CLASS_4(Code) | | |
ASSET_CLASS_5 | final public int ASSET_CLASS_5(Code) | | |
ASSET_CLASS_6 | final public int ASSET_CLASS_6(Code) | | |
ASSET_CLASS_7 | final public int ASSET_CLASS_7(Code) | | |
ASSET_CLASS_8 | final public int ASSET_CLASS_8(Code) | | |
ASSET_CLASS_9 | final public int ASSET_CLASS_9(Code) | | |
ASSET_CLASS_CONTAINER | final public int ASSET_CLASS_CONTAINER(Code) | | |
ASSET_CLASS_PERSON | final public int ASSET_CLASS_PERSON(Code) | | |
ASSET_CLASS_UNKNOWN | final public int ASSET_CLASS_UNKNOWN(Code) | | |
DAY_IN_MILLIS | final public long DAY_IN_MILLIS(Code) | | |
DONT_PROCESS_MODE | final public int DONT_PROCESS_MODE(Code) | | currently not supported *
|
LEVEL_2_MODE | final public int LEVEL_2_MODE(Code) | | |
LEVEL_2_TIME_HORIZON | final public String LEVEL_2_TIME_HORIZON(Code) | | |
LEVEL_2_TIME_HORIZON_DEFAULT | final public Integer LEVEL_2_TIME_HORIZON_DEFAULT(Code) | | |
LEVEL_6_MODE | final public int LEVEL_6_MODE(Code) | | |
LEVEL_6_TIME_HORIZON | final public String LEVEL_6_TIME_HORIZON(Code) | | |
LEVEL_6_TIME_HORIZON_DEFAULT | final public Integer LEVEL_6_TIME_HORIZON_DEFAULT(Code) | | |
MILLIS_PER_DAY | final public long MILLIS_PER_DAY(Code) | | |
NUM_TRANSPORT_CLASSES | final public int NUM_TRANSPORT_CLASSES(Code) | | |
level2Horizonlevel6Horizon | protected transient OperatingMode level2Horizonlevel6Horizon(Code) | | VTH operating modes
|
myExpandAggregates | protected boolean myExpandAggregates(Code) | | |
attachPG | public void attachPG(Asset asset, PropertyGroup thisPG)(Code) | | Since FOR preps are lost a custom property is added to determine unit
Parameters: asset - to attach PG to Parameters: thisPG - pg to attach to asset |
attachRoute | protected void attachRoute(Task parentTask, Task subtask)(Code) | |
Attaches two preps to task : SEAROUTE and SEAROUTE_DISTANCE
SEAROUTE will appear in the TPFDD Viewer as the path of the ship, if the
item goes by ship. SEAROUTE_DISTANCE is used by the TRANSCOM vishnu scheduler
to make the sea-vs-air decision. (Specifically, it decides if at a reasonable
ship speed (~15 knots), the task could be completed in the time allowed by ship,
and if so, decides to send the item by ship.)
Parameters: parentTask - - used to calculate the route (using the from-to pair) Parameters: subtask - - task to attach the preps to |
expandAsset | public Vector expandAsset(Task task, Asset asset)(Code) | |
Function that breaks up a AssetGroup or AggregateAsset into smaller pieces.
Return values should only by Assets and small AggregateAssets (derived classes
must determine how big is OK. By default all Aggregate are broken up).
If myExpandAggregates is true, expands both aggregate assets and asset groups.
If it's false, only expands asset groups.
Parameters: asset - A vector of assets that this asset has been broken into. |
getBlackboard | public BlackboardService getBlackboard()(Code) | | implemented for BlackboardPlugin interface -- need public access!
|
getLowFidelityTask | protected Task getLowFidelityTask(Task parentTask, Set uniformAssets)(Code) | | create level 2 task by aggregating the contents of the direct object *
|
getMode | protected int getMode(Task parentTask)(Code) | | Decide the mode the task should be processed in, depending on when it asks to be done,
and comparing that time against the current time and the level 2 and 6 time horizons
either LEVEL_6_MODE, LEVEL_2_MODE, or DONT_PROCESS_MODE (currently not supported) |
getNextID | protected int getNextID()(Code) | | |
getOriginalOwner | protected String getOriginalOwner(Task parentTask)(Code) | | Recovers owner of task's d.o. from either a FOR prep on the task
or the owner part of UID of the d.o.
Parameters: parentTask - task to examine owner of the task = which unit sent the task, owns the asset |
getSubtasks | public Vector getSubtasks(Task parentTask)(Code) | |
Implemented for UTILExpanderPlugin interface
Break up tasks into constituent parts.
There are three possible paths a task can take:
1) If the task is already a LEVEL 2 task, attaches a lowFiAssetPG to the asset and
passes it through.
2) If the task's dates and the operating mode VTH determine it should be handled
in level-2 mode, create a level-2 task from the original
3) If the task should be handled in level-6, expand it's d.o. as usual
4) TBD - perhaps, in the future, we'll ignore tasks that are far into the future
until the current time advances far enough. This would require the buffering thread
to wake up periodically, however, using the alarm service. Hmmm...
There is also the possibility of rescinding level 2 and replanning as level 6.
That would be real work though.
Vector of subtasks of parentTask |
handleTask | public void handleTask(Task parentTask)(Code) | | |
interestingTask | public boolean interestingTask(Task t)(Code) | | Implemented for UTILGenericListener interface
Look for tasks that have TRANSPORT as their verb
Parameters: t - Task to check for interest boolean true if task is interesting |
isPersonTask | protected boolean isPersonTask(Task parentTask)(Code) | |
Tries to determine if direct object is a person aggregate.
Can be tricky since sometimes the d.o. is a group of aggregates.
|
isTaskWellFormed | public boolean isTaskWellFormed(Task taskToCheck)(Code) | |
Examines task to see if task looks like what the plugin
expects it to look like.
Checks FROM and TO prepositions to see they're all there.
Parameters: taskToCheck - Task to check for consistency true if task is OK |
localSetup | public void localSetup()(Code) | | |
makeTask | protected Task makeTask(Task parentTask, Asset directObject, String originalOwner)(Code) | | Makes subtask of parent task, with given direct object.
removes OFTYPE prep, since it's not needed by scheduler
|
replanLevel2 | protected void replanLevel2(Collection level2Tasks)(Code) | | Remove the expansions of tasks that were previously expanded
into level-2 subtasks. By removing the expansion and publish
changing the task, the task will appear as a "new" task to the
plugin again in the next execute cycle.
If the task somehow got it's plan element removed by the time this
is called, just skip it. Somehow a logic provider seems to be able
to remove the task's expansion during my transaction.
Parameters: level2Tasks - tasks that were previously expanded into level 2that we want to replan. |
reviewLevel2 | public void reviewLevel2()(Code) | | |
setDimensions | protected CargoCatCodeDimensionPG setDimensions(Task parentTask, NewPhysicalPG physicalPG, Collection realAssets)(Code) | |
Takes a collection of assets and sets the dimensions of the physical pg
to be their sum, in area, volume, and weight.
It doesn't make sense to aggregate length, width, and height, since they
wouldn't correspond to area and volume.
Parameters: realAssets - to sum Parameters: physicalPG - to set with their aggregate dimensions |
setDomainService | public void setDomainService(DomainService ds)(Code) | |
NOTE : This is called magically by reflection from BindingUtility.setServices
setServices looks for any method in a component that starts with "set" and
tries to find a service X.
More specifically, it's looking for a method signature like:
setXService (XService s)
See Also: org.cougaar.core.component.BindingUtility.setServices |
setupFilters | public void setupFilters()(Code) | | create the port locator
|
setupOperatingModes | protected void setupOperatingModes()(Code) | | create and publish level-2 and 6 VTH Operating Modes
|
startAgainIn | public void startAgainIn(long millis)(Code) | | Buffering runnable wants to restart later
|
|
|