Class BucketWorkloadMovementSolver
java.lang.Object
overit.geocallapp.wfm.roughplanning.bl.workloadmovement.solver.BucketWorkloadMovementSolver
- All Implemented Interfaces:
overit.geocall.wfm.planning.bl.valuemovement.solver.ValueMovementSolver
public class BucketWorkloadMovementSolver
extends Object
implements overit.geocall.wfm.planning.bl.valuemovement.solver.ValueMovementSolver
Solver for workload movement operations using buckets.
This implementation orders the source timed values by workload from largest to smallest
and moves them to the target buckets until the total amount is reached or
there are no more movements left to try.
- Since:
- 20.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected overit.geocall.wfm.planning.bl.valuemovement.solution.ValueMovementSolutionCreates an empty solution.protected voiddoMove(overit.geocall.wfm.planning.bl.valuemovement.problem.ValueMovementProblem problem, overit.geocall.wfm.planning.bl.valuemovement.solution.ValueMovementSolution solution) Template method to be implemented by concrete solvers.overit.geocall.wfm.planning.bl.valuemovement.solution.ValueMovementSolutionmove(overit.geocall.wfm.planning.bl.valuemovement.problem.ValueMovementProblem problem) Moves value from source time ranges to target time ranges according to the problem specification.protected voidorderSourceTimedValues(List<overit.geocall.wfm.planning.bl.valuemovement.TimedValue> sourceTimedValues) protected booleanselectTimedValue(overit.geocall.wfm.planning.bl.valuemovement.TimedValue timedValue, DateTimeRange destinationRangeForTimedValues) protected overit.geocall.wfm.planning.bl.valuemovement.TimedValueupdateWorkloadMovement(overit.geocall.wfm.planning.bl.valuemovement.TimedValue workloadMovement, overit.geocall.wfm.planning.bl.valuemovement.problem.ValueMovementProblem problem) Updates a workload movement with the target date range.
-
Field Details
-
LOG
-
-
Constructor Details
-
BucketWorkloadMovementSolver
public BucketWorkloadMovementSolver()
-
-
Method Details
-
move
public overit.geocall.wfm.planning.bl.valuemovement.solution.ValueMovementSolution move(overit.geocall.wfm.planning.bl.valuemovement.problem.ValueMovementProblem problem) throws DAValidateException, DAException Description copied from interface:overit.geocall.wfm.planning.bl.valuemovement.solver.ValueMovementSolverMoves value from source time ranges to target time ranges according to the problem specification.- Specified by:
movein interfaceoverit.geocall.wfm.planning.bl.valuemovement.solver.ValueMovementSolver- Parameters:
problem- the problem definition containing movement parameters- Returns:
- the result of the movement operation
- Throws:
DAValidateException- if validation failsDAException- if a data access error occurs
-
createEmptySolution
protected overit.geocall.wfm.planning.bl.valuemovement.solution.ValueMovementSolution createEmptySolution()Creates an empty solution.- Returns:
- an empty solution
-
doMove
protected void doMove(overit.geocall.wfm.planning.bl.valuemovement.problem.ValueMovementProblem problem, overit.geocall.wfm.planning.bl.valuemovement.solution.ValueMovementSolution solution) Template method to be implemented by concrete solvers.- Parameters:
problem- the validated problemsolution- the solution to populate
-
selectTimedValue
protected boolean selectTimedValue(overit.geocall.wfm.planning.bl.valuemovement.TimedValue timedValue, DateTimeRange destinationRangeForTimedValues) -
orderSourceTimedValues
protected void orderSourceTimedValues(List<overit.geocall.wfm.planning.bl.valuemovement.TimedValue> sourceTimedValues) -
updateWorkloadMovement
protected overit.geocall.wfm.planning.bl.valuemovement.TimedValue updateWorkloadMovement(overit.geocall.wfm.planning.bl.valuemovement.TimedValue workloadMovement, overit.geocall.wfm.planning.bl.valuemovement.problem.ValueMovementProblem problem) Updates a workload movement with the target date range.- Parameters:
workloadMovement- the workload movement to updateproblem- the problem containing the target date range- Returns:
- the updated workload movement
-