Commit 582f289c authored by Alexis Lebis's avatar Alexis Lebis

Add new param for weighting fitness eval

parent bc4663c8
......@@ -62,6 +62,10 @@ int main(int argc, char* argv[]){
unsigned int MINPRE = parser.createParam((unsigned int)(0), "minPre", "minimal competency by course",'q',"Param").value();
unsigned int MAXPRE = parser.createParam((unsigned int)(3), "maxPre", "maximal competency by course",'Q',"Param").value();
unsigned int CBYTF = parser.createParam((unsigned int)(2), "cbyTF", "course by time frame to pick",'A',"Param").value();
CursusEval::WEIGHT_ECTS = parser.createParam((double)(1.0), "wECTS", "Weight of ECTS in the fitness value", 'V', "Param").value();
CursusEval::WEIGHT_REPETION = parser.createParam((double)(1.0), "wREP", "Weight of Repetition in the fitness value", 'v', "Param").value();
CursusEval::WEIGHT_JOB = parser.createParam((double)(1.0), "wJob", "Weight of profession in the fitness value", 'w', "Param").value();
CursusEval::WEIGHT_PREREQ = parser.createParam((double)(1.0), "wPrereq", "Weight of prerequisites in the fitness value", 'W', "Param").value();
//PROFESSION PARAMETERS
unsigned int JOB_SEED = parser.createParam((unsigned int)(7777), "jobSeed", "Seed used for the Profession", 'g', "Param").value();
......
#include "evaluator.h"
#include "../tools.h"
double CursusEval::WEIGHT_ECTS = 1;
double CursusEval::WEIGHT_REPETION = 1;
double CursusEval::WEIGHT_JOB = 1;
double CursusEval::WEIGHT_PREREQ = 1;
void CursusEval::operator()(Cursus & _cursus){
double fit=0.0;
int pCE, pCP, pCR, pCPR;
double pCE, pCP, pCR, pCPR;
pCE=1;
pCR=1;
pCP=1;
pCPR=1;
pCE = WEIGHT_ECTS;
pCR = WEIGHT_REPETION;
pCP = WEIGHT_JOB;
pCPR= WEIGHT_PREREQ;
std::pair<bool, double> resCE;
std::pair<bool, double> resCP;
......
......@@ -17,6 +17,10 @@ public:
void operator()(Cursus & _cursus);
static double WEIGHT_ECTS;
static double WEIGHT_REPETION;
static double WEIGHT_JOB;
static double WEIGHT_PREREQ;
private:
ConstraintsPrerequisites cpr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment