Java Doc for GLMTransOneToManyExpanderPlugin.java in  » Science » Cougaar12_4 » org » cougaar » logistics » plugin » trans » base » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Science » Cougaar12_4 » org.cougaar.logistics.plugin.trans.base 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.cougaar.lib.filter.UTILExpanderPluginAdapter
   org.cougaar.logistics.plugin.trans.base.GLMTransOneToManyExpanderPlugin

GLMTransOneToManyExpanderPlugin
public class GLMTransOneToManyExpanderPlugin extends UTILExpanderPluginAdapter implements BlackboardPlugin(Code)
getSubtasks is filled in. It justs blows up composite tasks into smaller one unit tasks. Examines each Task.
See Also:   UTILExpanderPluginAdapter

Inner Class :class OperatingModeCallback extends UTILFilterCallbackAdapter
Inner Class :protected static class IntRange extends OMCRange
Inner Class :class BufferingAlarm implements Alarm

Field Summary
final public  intASSET_CLASS_1
    
final public  intASSET_CLASS_10
    
final public  intASSET_CLASS_2
    
final public  intASSET_CLASS_3
    
final public  intASSET_CLASS_4
    
final public  intASSET_CLASS_5
    
final public  intASSET_CLASS_6
    
final public  intASSET_CLASS_7
    
final public  intASSET_CLASS_8
    
final public  intASSET_CLASS_9
    
final public  intASSET_CLASS_CONTAINER
    
final public  intASSET_CLASS_PERSON
    
final public  intASSET_CLASS_UNKNOWN
    
final public  longDAY_IN_MILLIS
    
final public  intDONT_PROCESS_MODE
    
final public  IntegerLEVEL_2_MAX
    
final public  IntegerLEVEL_2_MIN
    
final public  intLEVEL_2_MODE
    
final public  StringLEVEL_2_TIME_HORIZON
    
final public  IntegerLEVEL_2_TIME_HORIZON_DEFAULT
    
final public  IntegerLEVEL_6_MAX
    
final public  IntegerLEVEL_6_MIN
    
final public  intLEVEL_6_MODE
    
final public  StringLEVEL_6_TIME_HORIZON
    
final public  IntegerLEVEL_6_TIME_HORIZON_DEFAULT
    
final public  longMILLIS_PER_DAY
    
final public  intNUM_TRANSPORT_CLASSES
    
protected  ObjectalarmMutex
    
protected  AlarmcurrentAlarm
    
protected  AssetUtilglmAssetHelper
    
protected  GLMPreferenceglmPrefHelper
    
protected  GLMPrepPhraseglmPrepHelper
    
 inti
    
protected  intid
    
protected transient  OperatingModelevel2Horizonlevel6Horizon
    
 UTILFilterCallbackmodeCallback
    
protected  booleanmyExpandAggregates
    
protected  PortLocatorImplportLocator
    
protected  Schedulableschedulable
    


Method Summary
protected  voidaddToDimension(String ccc, double quantity, PhysicalPG itemPhysicalPG, CargoCatCodeDimensionPG cccdPG)
    
public  voidattachPG(Asset asset, PropertyGroup thisPG)
    
protected  voidattachRoute(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  VectorexpandAsset(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  BlackboardServicegetBlackboard()
    
protected  StringgetCategory(GLMAsset asset)
    
final public  DomainServicegetDomainService()
    
protected  TaskgetLowFidelityTask(Task parentTask, Set uniformAssets)
    
protected  intgetMode(Task parentTask)
    
protected  intgetNextID()
    
protected  StringgetOriginalOwner(Task parentTask)
     Recovers owner of task's d.o.
protected  ListgetPrunedTaskList(List tasks)
    
public  VectorgetSubtasks(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  StringgetTransportType(CargoCatCodeDimensionPG cccd)
    
public  voidhandleTask(Task parentTask)
    
public  booleaninterestingTask(Task t)
    
protected  booleanisPersonTask(Task parentTask)
    
 Tries to determine if direct object is a person aggregate.
 Can be tricky since sometimes the d.o.
public  booleanisTaskWellFormed(Task taskToCheck)
    
 Examines task to see if task looks like what the plugin 
 expects it to look like.
public  voidlocalSetup()
    
protected  TaskmakeTask(Task parentTask, Asset directObject, String originalOwner)
     Makes subtask of parent task, with given direct object.
public  voidprocessTasks(java.util.List tasks)
    
protected  voidreplanLevel2(Collection level2Tasks)
     Remove the expansions of tasks that were previously expanded into level-2 subtasks.
public  voidreviewLevel2()
    
protected  CargoCatCodeDimensionPGsetDimensions(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  voidsetDomainService(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  voidsetThreadService(ThreadService ts)
    
public  voidsetupFilters()
    
protected  voidsetupOperatingModes()
    
protected  Set[]sortAssetsByCategory(Collection assets)
    
public  voidstartAgainIn(long millis)
    

Field Detail
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_MAX
final public Integer LEVEL_2_MAX(Code)



LEVEL_2_MIN
final public Integer LEVEL_2_MIN(Code)



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_MAX
final public Integer LEVEL_6_MAX(Code)



LEVEL_6_MIN
final public Integer LEVEL_6_MIN(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)



alarmMutex
protected Object alarmMutex(Code)



currentAlarm
protected Alarm currentAlarm(Code)



glmAssetHelper
protected AssetUtil glmAssetHelper(Code)



glmPrefHelper
protected GLMPreference glmPrefHelper(Code)



glmPrepHelper
protected GLMPrepPhrase glmPrepHelper(Code)



i
int i(Code)



id
protected int id(Code)



level2Horizonlevel6Horizon
protected transient OperatingMode level2Horizonlevel6Horizon(Code)
VTH operating modes



modeCallback
UTILFilterCallback modeCallback(Code)



myExpandAggregates
protected boolean myExpandAggregates(Code)



portLocator
protected PortLocatorImpl portLocator(Code)



schedulable
protected Schedulable schedulable(Code)





Method Detail
addToDimension
protected void addToDimension(String ccc, double quantity, PhysicalPG itemPhysicalPG, CargoCatCodeDimensionPG cccdPG)(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!



getCategory
protected String getCategory(GLMAsset asset)(Code)



getDomainService
final public DomainService getDomainService()(Code)



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



getPrunedTaskList
protected List getPrunedTaskList(List tasks)(Code)



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



getTransportType
protected String getTransportType(CargoCatCodeDimensionPG cccd)(Code)
return a human-readable string to indicate transport type



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



processTasks
public void processTasks(java.util.List tasks)(Code)



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



setThreadService
public void setThreadService(ThreadService ts)(Code)



setupFilters
public void setupFilters()(Code)
create the port locator



setupOperatingModes
protected void setupOperatingModes()(Code)
create and publish level-2 and 6 VTH Operating Modes



sortAssetsByCategory
protected Set[] sortAssetsByCategory(Collection assets)(Code)



startAgainIn
public void startAgainIn(long millis)(Code)
Buffering runnable wants to restart later



Fields inherited from org.cougaar.lib.filter.UTILExpanderPluginAdapter
protected UTILExpand expand(Code)(Java Doc)
protected UTILExpandableTaskCallback myInputTaskCallback(Code)(Java Doc)
protected boolean wantConfidence(Code)(Java Doc)

Methods inherited from org.cougaar.lib.filter.UTILExpanderPluginAdapter
public void changeExpansion(Expansion exp)(Code)(Java Doc)
protected UTILFilterCallback createExpansionCallback()(Code)(Java Doc)
protected UTILFilterCallback createThreadCallback(UTILGenericListener bufferingThread)(Code)(Java Doc)
protected UTILFilterCallback getInputTaskCallback()(Code)(Java Doc)
public Vector getSubtasks(Task t)(Code)(Java Doc)
public void handleConstraintViolation(Expansion exp, List violatedConstraints)(Code)(Java Doc)
public void handleFailedExpansion(Expansion exp, List failedSubTaskResults)(Code)(Java Doc)
public void handleIllFormedTask(Task t)(Code)(Java Doc)
public void handleRemovedTask(Task t)(Code)(Java Doc)
public void handleSuccessfulExpansion(Expansion exp, List successfulSubtasks)(Code)(Java Doc)
public void handleTask(Task t)(Code)(Java Doc)
public boolean interestingExpandedTask(Task t)(Code)(Java Doc)
public boolean interestingTask(Task t)(Code)(Java Doc)
public void localSetup()(Code)(Java Doc)
public void processTasks(List tasks)(Code)(Java Doc)
public void publishChangedExpansion(Expansion exp)(Code)(Java Doc)
public void reportChangedExpansion(Expansion exp)(Code)(Java Doc)
public void setupFilters()(Code)(Java Doc)
public boolean wantToChangeExpansion(Expansion exp)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.