| java.lang.Object org.cougaar.lib.vishnu.client.VishnuConfig
VishnuConfig | public class VishnuConfig (Code) | | Keeps track of configuration files
Also has methods for dealing with template tasks and prototypical resources for when in introspective mode.
|
Method Summary | |
protected Collection | getAssetTemplatesForTasks(List tasks, List assetClassName, Collection assetCollection)
Using the task list, figure out which assets are relevant to
the problem and return them. | protected String | getClusterName() | protected Collection | getDistinctAssetTypes(List assetClassName, Collection assetCollection)
Looks through all assets and finds prototypical instances
of distinct classes. | protected String | getFormatFile() | protected String | getGASpecsFile()
get the file containing the ga parameters for VISHNU
If the parameter "gaFile" is set, it will look
for a file in the data directory with a name equal to the
value of the parameter. | protected ParamMap | getMyParams() | protected String | getName() | public String | getNeededFile(String paramName, String defaultSuffix)
Get file name for input file. | protected String | getOtherData()
get the file containing the other data
If the parameter "otherDataFile" is set, it will look
for a file in the data directory with a name equal to the
value of the parameter. | protected String | getOtherDataFormat()
get the file containing the other data object format
If the parameter "otherDataFormatFile" is set, it will look
for a file in the data directory with a name equal to the
value of the parameter. | protected String | getSpecsFile()
get the file containing the vishnu scheduling specs
If the parameter "specsFile" is set, it will look
for a file in the data directory with a name equal to the
value of the parameter. | protected List | getTemplateTasks(List tasks, int firstTemplateTasks)
Sets the set of template tasks. |
getAssetTemplatesForTasks | protected Collection getAssetTemplatesForTasks(List tasks, List assetClassName, Collection assetCollection)(Code) | |
Using the task list, figure out which assets are relevant to
the problem and return them. For example, if there is a
prep "WITH CargoShip#5" on a task, and you only want decks for that ship,
you could subclass this function and select those decks here.
NOTE that this could also be achieved by the Vishnu CAPABILITY CRITERION.
In general, that will be a more flexible way to go, if less efficient.
If you want to do :
getAssetCallback().getSubscription ().getCollection();
instead do :
new HashSet( getAssetCallback().getSubscription ().getCollection());
Parameters: tasks - of tasks to use to filter out relevant assets Collection of assets to send to Vishnu |
getDistinctAssetTypes | protected Collection getDistinctAssetTypes(List assetClassName, Collection assetCollection)(Code) | |
Looks through all assets and finds prototypical instances
of distinct classes.
Conceptually, if the cluster has 10 trucks and 10 railcars
as assets, we want to return a list of one truck and
one railcar to be used as templates.
Uses type identification PG to find distinct types.
Collection of the asset instances |
getGASpecsFile | protected String getGASpecsFile()(Code) | |
get the file containing the ga parameters for VISHNU
If the parameter "gaFile" is set, it will look
for a file in the data directory with a name equal to the
value of the parameter.
Otherwise, looks for a file called .ga.xml.
return relative path of env file with which to start the
Vishnu Scheduler.
See Also: VishnuConfig.getNeededFile relative path to specs parameters |
getNeededFile | public String getNeededFile(String paramName, String defaultSuffix)(Code) | |
Get file name for input file. If the parameter exists, use it,
otherwise append the defaultSuffix to the cluster name and use that.
If there are more than one vishnu plugins in a cluster, one should
set the parameter to the name of the file.
|
getOtherData | protected String getOtherData()(Code) | |
get the file containing the other data
If the parameter "otherDataFile" is set, it will look
for a file in the data directory with a name equal to the
value of the parameter.
Otherwise, looks for a file called .odd.xml.
See Also: VishnuConfig.getNeededFile filename of other data object(s) |
getOtherDataFormat | protected String getOtherDataFormat()(Code) | |
get the file containing the other data object format
If the parameter "otherDataFormatFile" is set, it will look
for a file in the data directory with a name equal to the
value of the parameter.
Otherwise, looks for a file called .odf.xml.
See Also: VishnuConfig.getNeededFile filename of other data object format file |
getSpecsFile | protected String getSpecsFile()(Code) | |
get the file containing the vishnu scheduling specs
If the parameter "specsFile" is set, it will look
for a file in the data directory with a name equal to the
value of the parameter.
Otherwise, looks for a file called .vsh.xml.
See Also: VishnuConfig.getNeededFile filename of specs file |
getTemplateTasks | protected List getTemplateTasks(List tasks, int firstTemplateTasks)(Code) | |
Sets the set of template tasks. Template tasks are examined
to create the ObjectFormat for the tasks used in the problem.
Say 2 tasks are sent to the vishnu bridge, but only one is
used as the template task. If the second task has an indirect
object with an object of a type that is not in the first task,
Vishnu will reject this object when the task is sent as data AND
the specs will not be able to reference the field.
So it's imperative that the template tasks have all the fields
and all the types that should be used in the problem.
This may not be that big of a deal in practice, but this function
may have to be overridden.
By default looks at the parameter firstTemplateTasks
to determine how many of the tasks should be sent as templates.
|
|
|