| java.lang.Object org.cougaar.core.adaptivity.PlayHelper
PlayHelper | public class PlayHelper (Code) | | Helper class for computing OperatingModes from plays and
Conditions
|
Method Summary | |
public void | updateOperatingModes(Play[] plays, Map iaompMap, Set iaompChanges, List missingConditions) Update all operating modes based on conditions and the playbook.
This is the real workhorse of the adaptivity engine and carries
out playbook-based adaptivity. |
ATTRIBUTE_PREFIX | final public static String ATTRIBUTE_PREFIX(Code) | | |
updateOperatingModes | public void updateOperatingModes(Play[] plays, Map iaompMap, Set iaompChanges, List missingConditions)(Code) | | Update all operating modes based on conditions and the playbook.
This is the real workhorse of the adaptivity engine and carries
out playbook-based adaptivity. All the active plays from the
playbook are considered. If the ifClause evaluates to true, then
the operating mode values are saved in a Map under the operating
mode name. When multiple plays affect the same operating mode,
the values are combined by intersecting the allowed value ranges.
If a play specifies a constraint that would have the effect of
eliminating all possible values for an operating mode, that
constraint is logged and ignored. Finally, the operating modes
are set to the effective value of the combined constraints.
Some operating modes may be remote (in different agents). Such
remote OperatingModes are designated with a naming convention
wherein the remote location is designated with square brackets,
e.g. [agent.3ID]. This notation may also be used with
attribute-based addresses using the notation:
[attribute...]. The
caller supplies a Map of such remote modes and we use or update
that Map accordingly. The names of remote operating modes that
are added or removed are returned.
Parameters: plays - the plays to be tested and applied. Parameters: iaompMap - a Map of the current remote operating modeconstraints. Items are added or removed from this Map accordingto whether or not the given plays specify constraints on thoseremote modes. Parameters: iaompChanges - the names of the remote operating modeconstraints that were added or removed from iaompMap. The actionis implied by whether or not the iaompMap has the named iaomp. |
|
|