Package org.btrplace.model
Class Instance
java.lang.Object
org.btrplace.model.Instance
- Direct Known Subclasses:
LabelledInstance
public class Instance extends Object
An instance aggregates a model and a list of constraints.
- Author:
- Fabien Hermenier
-
Constructor Summary
Constructors Constructor Description Instance(Model m, Collection<? extends SatConstraint> cs, OptConstraint o)
Make a new instance.Instance(Model m, OptConstraint o)
Make a new instance. -
Method Summary
Modifier and Type Method Description boolean
equals(Object o)
Model
getModel()
Get the model.OptConstraint
getOptConstraint()
Get the declared optimization constraint.Collection<SatConstraint>
getSatConstraints()
Get the declared constraints.int
hashCode()
Instance
setOptConstraint(OptConstraint opt)
Set the optimisation constraint.
-
Constructor Details
-
Method Details
-
getModel
Get the model.- Returns:
- a model
-
getSatConstraints
Get the declared constraints.- Returns:
- a collection of satisfaction oriented constraints that may be empty
-
getOptConstraint
Get the declared optimization constraint.- Returns:
- the optimization constraint to consider (not null)
-
setOptConstraint
Set the optimisation constraint.- Parameters:
opt
- the constraint.- Returns:
this
-
equals
-
hashCode
public int hashCode()
-