23 std::vector<std::vector<double>> m_costs;
24 std::vector<std::vector<double>> m_resource_consumptions;
25 std::vector<double> m_capacities;
27 Instance(
unsigned int t_n_agents,
unsigned int t_n_jobs);
29 Instance(
const Instance&) =
default;
30 Instance(Instance&&)
noexcept =
default;
32 Instance& operator=(
const Instance&) =
default;
33 Instance& operator=(Instance&&)
noexcept =
default;
35 ~Instance() =
default;
36 [[nodiscard]]
unsigned int n_agents()
const {
return m_costs.size(); }
37 [[nodiscard]]
unsigned int n_jobs()
const {
return m_costs[0].size(); }
38 [[nodiscard]]
double cost(
unsigned int t_agent,
unsigned int t_job)
const {
return m_costs[t_agent][t_job]; }
39 [[nodiscard]]
double resource_consumption(
unsigned int t_agent,
unsigned int t_job)
const {
return m_resource_consumptions[t_agent][t_job]; }
40 [[nodiscard]]
double capacity(
unsigned int t_agent)
const {
return m_capacities[t_agent]; }
42 void set_cost(
unsigned int t_agent,
unsigned int t_job,
double t_value) { m_costs[t_agent][t_job] = t_value; }
43 void set_resource_consumption(
unsigned int t_agent,
unsigned int t_job,
double t_value) { m_resource_consumptions[t_agent][t_job] = t_value; }
44 void set_capacity(
unsigned int t_agent,
double t_value) { m_capacities[t_agent] = t_value; }