Class CMinMigrations
java.lang.Object
org.btrplace.scheduler.choco.constraint.migration.CMinMigrations
- All Implemented Interfaces:
ChocoConstraint
,CObjective
,Injectable
,MisplacedVMsEstimator
public class CMinMigrations extends Object implements CObjective
Implements
MinMigrations
.
Currently, same heuristics that with MinMttr but a different objective- Author:
- Fabien Hermenier
-
Constructor Summary
Constructors Constructor Description CMinMigrations()
CMinMigrations(MinMigrations m)
Make a new objective. -
Method Summary
Modifier and Type Method Description Set<VM>
getMisPlacedVMs(Instance i)
Get the VMs that are supposed to be mis-placed.boolean
inject(Parameters ps, ReconfigurationProblem p)
Inject the constraint into the problem.void
postCostConstraints()
Post the constraints related to the objective.String
toString()
-
Constructor Details
-
CMinMigrations
Make a new objective.- Parameters:
m
- the user-side objective.
-
CMinMigrations
public CMinMigrations()
-
-
Method Details
-
inject
Description copied from interface:Injectable
Inject the constraint into the problem.- Specified by:
inject
in interfaceInjectable
- Parameters:
ps
- the scheduler parametersp
- the problem- Returns:
true
if the injection succeeded,false
if the problem is sure to not have a solution- Throws:
SchedulerException
- if an error occurred while injecting.
-
getMisPlacedVMs
Description copied from interface:MisplacedVMsEstimator
Get the VMs that are supposed to be mis-placed.- Specified by:
getMisPlacedVMs
in interfaceMisplacedVMsEstimator
- Parameters:
i
- the instance to inspect- Returns:
- a set of VMs identifier that may be empty (when no VMs are misplaced)
-
postCostConstraints
public void postCostConstraints()Description copied from interface:CObjective
Post the constraints related to the objective. This method is decoupled fromInjectable.inject(org.btrplace.scheduler.choco.Parameters, org.btrplace.scheduler.choco.ReconfigurationProblem)
to allow to postpone the constraint posting to the last moment.- Specified by:
postCostConstraints
in interfaceCObjective
-
toString
-