public class MaxOnline extends SatConstraint
In discrete restriction mode, the constraint only ensures that the set of
nodes have at most n
nodes being online at by end of the reconfiguration
process. The set of nodes may have more number than n nodes being online in
the reconfiguration process.
In continuous restriction mode, a boot node action is performed only when the number of online nodes is smaller than n.
Constructor and Description |
---|
MaxOnline(Set<Node> nodes,
int n)
Make a new discrete constraint.
|
MaxOnline(Set<Node> nodes,
int n,
boolean continuous)
Make a new constraint specifying restriction explicitly.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
getAmount()
Get the maximum number of online nodes.
|
SatConstraintChecker<MaxOnline> |
getChecker()
Get the validator used to check if a plan satisfies the constraint.
|
int |
hashCode() |
String |
toString() |
getInvolvedNodes, getInvolvedVMs, isContinuous, isSatisfied, isSatisfied, restrictionToString, setContinuous
public MaxOnline(Set<Node> nodes, int n, boolean continuous)
nodes
- The set of nodesn
- The maximum number of online nodescontinuous
- true
for continuous restrictionpublic int getAmount()
public boolean equals(Object o)
equals
in class SatConstraint
public int hashCode()
hashCode
in class SatConstraint
public SatConstraintChecker<MaxOnline> getChecker()
SatConstraint
getChecker
in class SatConstraint
SatConstraintChecker
Copyright © 2015 University of Nice-Sophia Antipolis. All Rights Reserved.