ShiftSearch Class

ShiftSearch

Definition

Namespace: SRS.ShiftSolver.Solvers
Assembly: ShiftSolver (in ShiftSolver.dll) Version: 2.3.0+2c0a765360648175f37b32b9a08ecd256c911c4c
C#
public class ShiftSearch : TimeLimitChecker, 
	IShiftSolver
Inheritance
Object    TimeLimitChecker    ShiftSearch
Implements
IShiftSolver

Constructors

ShiftSearch Initializes a new instance of this class.

Properties

MaxIterations If this is set to a non-negative value then the algorithm will finish after this number of iterations (or when the MaxRunTime is reached if it is less than the time taken to complete the iterations). If the same RandomSeed is used then the same solution will be produced after the same number of iterations each time the solver is run. This means that this can be used for reproducible tests. The default value is -1, meaning that the solver is only limited by the MaxRunTime.
PauseEvent Used to pause the solver while it is running.
RandomSeed If the same random seed is used for an instance then the solver will always create the same final solution (as long as the same amount of time is used).
SolverCaller

It is recommended to instead use the ShiftSolverStatusUpdated event to receive feedback from the solver as it is solving.

Used to get information from the solver while it is running.

SolveStatistics A summary of statistics related to the solve.
Stopped If this is set to true while the Solve method is executing then the solver will stop and return the best solution found so far.
Title Returns a title/name for the algorithm.
TotalEvaluations Returns the number of unique solutions analysed by the algorithm.

Methods

CheckPaused Check if this thread is paused.
Equals
(Inherited from Object)
Finalize
(Inherited from Object)
GetHashCode
(Inherited from Object)
GetType
(Inherited from Object)
MemberwiseClone
(Inherited from Object)
Solve(Solution) Build and improve the solution.
Solve(Solution, Double) Build and improve the solution.
ToString
(Inherited from Object)

Events

ShiftSolverStatusUpdated Occurs when the the solver has new information to feedback.

Fields

MaxRunTime Gets or sets the maximum running time for the solver (in milliseconds).
MaxShiftLengthInMinutes Gets or sets the maximum shift length in minutes. This applies to all employees. The algorithm will not search for shifts longer than this value.
MinShiftLengthInMinutes Gets or sets the minimum shift length in minutes. This applies to all employees. The algorithm will not search for shifts shorter than this value.

See Also