[go: up one dir, main page]

Menu

[49ee99]: / mct / Evaluator.tpl  Maximize  Restore  History

Download this file

53 lines (37 with data), 1.0 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef $project_EVALUATOR_HPP_
#define $project_EVALUATOR_HPP_
//#include <cmath>
#include <stdlib.h>
#include <math.h>
#include "../OptFrame/Evaluation.hpp"
#include "../OptFrame/Evaluator.hpp"
#include "Representation.h"
#include "Memory.h"
#include "Solution.h"
#include "Evaluation.h"
#include "ProblemInstance.hpp"
#define EPSILON_$project 0.0001
class $projectEvaluator: public Evaluator<Rep$project $commamproject>
{
private:
$projectProblemInstance& p$project;
// Your private vars
public:
$projectEvaluator($projectProblemInstance& _p$project): // If necessary, add more parameters
p$project(_p$project)
{
// Put the rest of your code here
}
Evaluation$project& evaluate(const Rep$project& rep)
{
// 'rep' is the representation of the solution
double fo = 0; // Evaluation Function Value
return * new Evaluation$project(fo $initializememory);
}
virtual bool betterThan(double a, double b)
{
// $minmax
return $epsilon
}
};
#endif /*$project_EVALUATOR_HPP_*/