OptimisationProblem/Solver.h

18 lines
796 B
C
Raw Normal View History

2023-07-17 00:19:10 +02:00
#pragma once
#include "structures/Distances.h"
#include "structures/Centers.h"
#include "structures/Employees.h"
#include "structures/Missions.h"
#include "Solution.h"
typedef std::vector<Solution*> Solutions;
typedef std::vector<float> Scores;
void solver(int nPop, int nGen, float rCross, float rMut, Distances& distances, Centers& centers, Employees& employees, Missions& missions);
float fitness(Solution*);
Solution* selection(Solutions*, Scores*);
void crossover(float rCross, Solution*, Solution*, Solution**, Solution**);
void mutator(Solution*, float);
Solutions* generateSolutions(int nPop, Distances& distances, Centers& centers, Employees& employees, Missions& missions);
Solution* generateSolution(Distances& distances, Centers& centers, Employees& employees, Missions& missions);