-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPeriodManager.cs
38 lines (35 loc) · 1.36 KB
/
PeriodManager.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using ComfortCare.Domain.BusinessLogic.interfaces;
namespace ComfortCare.Domain.BusinessLogic
{
/// <summary>
/// This class is the manger for creating the period plan for all the citizens, and schema's for all the employees
/// this is the main entry point if the core domain logic
/// </summary>
public class PeriodManager : IPeriodManager
{
#region fields
private readonly RouteGenerator _routeGen;
private readonly SchemaGenerator _schemaGen;
#endregion
#region Constructor
public PeriodManager(RouteGenerator routeGen, SchemaGenerator schemaGen)
{
_routeGen = routeGen;
_schemaGen = schemaGen;
}
#endregion
#region Methods
/// <summary>
/// This is the main method for running the algorithms to create new period and
/// assign employees to the routes created
/// </summary>
/// <param name="numberOfDays">The number of days to calculate routes</param>
/// <param name="numberOfAssignments">The number of assignments for each day</param>
public void CalculateNewPeriod(int numberOfDays, int numberOfAssignments)
{
var routes = _routeGen.CalculateDailyRoutes(numberOfDays, numberOfAssignments);
_schemaGen.GenerateSchema(routes);
}
#endregion
}
}