| org.cougaar.lib.filter.UTILExpanderPluginAdapter org.cougaar.logistics.plugin.trans.TransportExpanderPlugin
All known Subclasses: org.cougaar.logistics.plugin.trans.SeaTransportExpanderPlugin,
TransportExpanderPlugin | public class TransportExpanderPlugin extends UTILExpanderPluginAdapter implements UTILAssetListener(Code) | | Breaks up incoming tasks into aggregates that are no bigger than the largest carrier asset.
Carrier could be truck, ship, or plane.
|
Method Summary | |
protected void | adjustDimensions(GLMAsset asset, PhysicalPG originalPhysicalPG, double tons) | public void | attachPG(Asset asset, PropertyGroup thisPG) | protected void | calculateCommonMaxContain(double[] maxcontain) | protected void | expandAggregates(Task task, Vector subtasks)
expands aggregate assets into truck-sized chunks, putting the
subtasks into subtasks
Rounds the item wt to the same precision as vishnu uses so no disaggreements
about how much a truck can hold. | protected void | expandLowFi(Task task, Vector subtasks) | protected void | expandLowFiAsset(Task task, Vector subtasks)
expands aggregate assets into truck-sized chunks, putting the
subtasks into subtasks
Rounds the item wt to the same precision as vishnu uses so no disaggreements
about how much a truck can hold. | public double[] | getAssetMaxContain(GLMAsset glmasset) | public int | getAssetQuantity(AggregateAsset aggAsset) | protected ForUnitPG | getForUnitPG(Asset asset) | public double | getItemContribution(GLMAsset itemAsset) | protected List | getPrunedTaskList(List tasks) | public Vector | getSubtasks(Task task) Breaks up task aggregates into truck sized chunks if bigger
than biggest truck. | protected Asset | getTruckSizedAsset(Asset itemProto, PhysicalPG originalPhysicalPG, String itemID, double contrib) | protected String | getUniqueID(Asset boxProto) | public void | handleChangedAssets(Enumeration newAssets) | public void | handleNewAssets(Enumeration newAssets)
Place to handle new assets. | public boolean | interestingAsset(Asset a) | public boolean | interestingTask(Task task) State that we are interested in all transport tasks
Parameters: task - the task to test. | protected boolean | isSelfPropelled(Task t, Asset directObject) | public void | localSetup() | Task | makeTask(Task parentTask, Asset directObject, ForUnitPG unitPG) Makes subtask of parent task, with given direct object. | public void | processTasks(java.util.List tasks) | public void | resetCapacities() | protected void | setItemPG(Asset newAsset, Asset boxProto) | public void | setupFilters()
The idea is to add subscriptions (via the filterCallback), and when
they change, to have the callback react to the change, and tell
the listener (many times the plugin) what to do. | void | test() |
CAP_FUDGE | final protected static double CAP_FUDGE(Code) | | |
didSetCapacity | protected boolean didSetCapacity(Code) | | |
maxContainCapacity | protected double maxContainCapacity(Code) | | |
maxPassengerCapacity | protected double maxPassengerCapacity(Code) | | |
attachPG | public void attachPG(Asset asset, PropertyGroup thisPG)(Code) | | Since FOR preps are lost a custom property is added to determine unit
|
calculateCommonMaxContain | protected void calculateCommonMaxContain(double[] maxcontain)(Code) | | calculates the max contain -- smallest of all seen
|
expandAggregates | protected void expandAggregates(Task task, Vector subtasks)(Code) | |
expands aggregate assets into truck-sized chunks, putting the
subtasks into subtasks
Rounds the item wt to the same precision as vishnu uses so no disaggreements
about how much a truck can hold.
|
expandLowFiAsset | protected void expandLowFiAsset(Task task, Vector subtasks)(Code) | |
expands aggregate assets into truck-sized chunks, putting the
subtasks into subtasks
Rounds the item wt to the same precision as vishnu uses so no disaggreements
about how much a truck can hold.
|
getAssetMaxContain | public double[] getAssetMaxContain(GLMAsset glmasset)(Code) | | |
getAssetQuantity | public int getAssetQuantity(AggregateAsset aggAsset)(Code) | | gets the quantity of items in this task
Sub classes may want to override this
Parameters: aggAsset - asset that has quantity quantity in int |
getItemContribution | public double getItemContribution(GLMAsset itemAsset)(Code) | | gets the contribution each individual item makes to consuming
the capacity of the transport vehicle
Sub classes may want to override this
Parameters: itemAsset - -- the asset of the direct object of the task double of the contribution in TONS |
getSubtasks | public Vector getSubtasks(Task task)(Code) | | Breaks up task aggregates into truck sized chunks if bigger
than biggest truck. This is defined by a parameter : maxTruckContainWeight
Parameters: task - the task to expand a vector with the exapnded subtask |
handleNewAssets | public void handleNewAssets(Enumeration newAssets)(Code) | |
Place to handle new assets.
Looks for least common denominator
Parameters: newAssets - new assets found in the container |
interestingAsset | public boolean interestingAsset(Asset a)(Code) | |
Implemented for UTILAssetListener
OVERRIDE to see which assets you
think are interesting
Parameters: a - asset to check for notification boolean true if asset is interesting |
interestingTask | public boolean interestingTask(Task task)(Code) | | State that we are interested in all transport tasks
Parameters: task - the task to test. true if the tasks verb is TRANSPORT, false otherwise |
isSelfPropelled | protected boolean isSelfPropelled(Task t, Asset directObject)(Code) | | |
localSetup | public void localSetup()(Code) | | |
makeTask | Task makeTask(Task parentTask, Asset directObject, ForUnitPG unitPG)(Code) | | Makes subtask of parent task, with given direct object.
removes OFTYPE prep, since it's not needed by scheduler
|
resetCapacities | public void resetCapacities()(Code) | | |
setupFilters | public void setupFilters()(Code) | |
The idea is to add subscriptions (via the filterCallback), and when
they change, to have the callback react to the change, and tell
the listener (many times the plugin) what to do.
Override and call super to add new filters, or override
createXXXCallback to change callback behaviour.
|
|
|