45 lines
1.0 KiB
C++
45 lines
1.0 KiB
C++
#pragma once
|
|
#include "structures/Employee.h"
|
|
#include "structures/Mission.h"
|
|
#include "structures/Distances.h"
|
|
#include <vector>
|
|
|
|
typedef std::vector<Mission*> MissionList;
|
|
|
|
class Assignment
|
|
{
|
|
public:
|
|
/*float workTime;
|
|
int travelDistance;
|
|
int competenceTotal;*/
|
|
|
|
Distances* distances;
|
|
Employee* employee;
|
|
MissionList missions {};
|
|
Assignment(Employee* employee, Distances* distances):
|
|
employee(employee), distances(distances) // workTime(0), travelDistance(0), competenceTotal(0),
|
|
{};
|
|
|
|
float cost();
|
|
|
|
int getPreviousId();
|
|
int getPreviousId(int);
|
|
void addMission(Mission* mission);
|
|
void replaceMission(int i, MissionList*);
|
|
Mission* removeMission(int i);
|
|
Mission* getLastMission(int day);
|
|
MissionList* getMissions(int day);
|
|
|
|
int getSuitableMission(int, MissionList*, Mission**);
|
|
MissionList* getSuitableMissions(int, MissionList*);
|
|
|
|
int getCompetenceTotal();
|
|
|
|
float getTravelDistance();
|
|
|
|
float getWorkTime(int day);
|
|
float getTotalWorkTime();
|
|
float getTotalWorkTime(Mission* mission);
|
|
|
|
void print();
|
|
}; |