22 const unsigned int m_n_regular_staff;
23 const unsigned int m_n_part_time_staff;
24 const unsigned int m_n_time_periods;
26 unsigned int m_regular_staff_shift_duration = 0;
27 std::vector<std::vector<double>> m_regular_staff_fixed_wage_cost;
28 std::vector<double> m_regular_staff_minimum_number_of_shifts;
29 std::vector<double> m_regular_staff_maximum_number_of_shifts;
30 std::vector<std::vector<double>> m_part_time_staff_fixed_wage_cost;
31 std::vector<std::vector<double>> m_part_time_staff_hourly_wage_cost;
32 std::vector<double> m_part_time_staff_minimum_number_of_shifts;
33 std::vector<double> m_part_time_staff_maximum_number_of_shifts;
34 std::vector<double> m_unmet_demand_penalty_cost;
35 std::vector<double> m_demand;
37 Instance(
unsigned int t_n_regular_staff,
unsigned int t_n_part_time_staff,
unsigned int t_n_time_periods);
39 [[nodiscard]]
unsigned int n_regular_staff()
const {
return m_n_regular_staff; }
41 [[nodiscard]]
unsigned int n_part_time_staff()
const {
return m_n_part_time_staff; }
43 [[nodiscard]]
unsigned int n_time_periods()
const {
return m_n_time_periods; }
45 [[nodiscard]]
unsigned int shift_duration()
const {
return m_regular_staff_shift_duration; }
47 [[nodiscard]]
double regular_staff_fixed_wage_cost(
unsigned int t_staff_index,
unsigned int t_time_index)
const {
48 return m_regular_staff_fixed_wage_cost.at(t_staff_index).at(t_time_index);
51 [[nodiscard]]
double regular_staff_minimum_number_of_shifts(
unsigned int t_staff_index)
const {
52 return m_regular_staff_minimum_number_of_shifts.at(t_staff_index);
55 [[nodiscard]]
double regular_staff_maximum_number_of_shifts(
unsigned int t_staff_index)
const {
56 return m_regular_staff_maximum_number_of_shifts.at(t_staff_index);
59 [[nodiscard]]
double part_time_fixed_wage_cost(
unsigned int t_staff_index,
unsigned int t_time_index)
const {
60 return m_part_time_staff_fixed_wage_cost.at(t_staff_index).at(t_time_index);
63 [[nodiscard]]
double part_time_staff_hourly_wage_cost(
unsigned int t_staff_index,
unsigned int t_time_index)
const {
64 return m_part_time_staff_hourly_wage_cost.at(t_staff_index).at(t_time_index);
67 [[nodiscard]]
double part_time_staff_minimum_number_of_shifts(
unsigned int t_staff_index)
const {
68 return m_part_time_staff_minimum_number_of_shifts.at(t_staff_index);
71 [[nodiscard]]
double part_time_staff_maximum_number_of_shifts(
unsigned int t_staff_index)
const {
72 return m_part_time_staff_maximum_number_of_shifts.at(t_staff_index);
75 [[nodiscard]]
double unmet_demand_penalty_cost(
unsigned int t_time_index)
const {
76 return m_unmet_demand_penalty_cost.at(t_time_index);
79 [[nodiscard]]
double demand(
unsigned int t_time_index)
const {
80 return m_demand.at(t_time_index);
83 void set_regular_staff_shift_duration(
unsigned int t_value) {
84 m_regular_staff_shift_duration = t_value;
87 void set_regular_staff_fixed_wage_cost(
unsigned int t_staff_index,
unsigned int t_time_index,
double t_value) {
88 m_regular_staff_fixed_wage_cost.at(t_staff_index).at(t_time_index) = t_value;
91 void set_regular_staff_minimum_number_of_shifts(
unsigned int t_staff_index,
double t_value) {
92 m_regular_staff_minimum_number_of_shifts.at(t_staff_index) = t_value;
95 void set_regular_staff_maximum_number_of_shifts(
unsigned int t_staff_index,
double t_value) {
96 m_regular_staff_maximum_number_of_shifts.at(t_staff_index) = t_value;
99 void set_part_time_fixed_wage_cost(
unsigned int t_staff_index,
unsigned int t_time_index,
double t_value) {
100 m_part_time_staff_fixed_wage_cost.at(t_staff_index).at(t_time_index) = t_value;
103 void set_part_time_staff_hourly_wage_cost(
unsigned int t_staff_index,
unsigned int t_time_index,
double t_value) {
104 m_part_time_staff_hourly_wage_cost.at(t_staff_index).at(t_time_index) = t_value;
107 void set_part_time_staff_minimum_number_of_shifts(
unsigned int t_staff_index,
double t_value) {
108 m_part_time_staff_minimum_number_of_shifts.at(t_staff_index) = t_value;
111 void set_part_time_staff_maximum_number_of_shifts(
unsigned int t_staff_index,
double t_value) {
112 m_part_time_staff_maximum_number_of_shifts.at(t_staff_index) = t_value;
115 void set_unmet_demand_penalty_cost(
unsigned int t_index_index,
double t_value) {
116 m_unmet_demand_penalty_cost.at(t_index_index) = t_value;
119 void set_demand(
unsigned int t_time_index,
double t_value) {
120 m_demand.at(t_time_index) = t_value;
123 friend std::ostream & operator<<(std::ostream&,
const Instance&);
124 friend Instance read_instance_from_file(
const std::string&);