Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
FIC_DK_P GA Solving
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
6
Issues
6
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
M3TAL
FIC_DK_P GA Solving
Commits
582f289c
Commit
582f289c
authored
Jun 04, 2020
by
Alexis Lebis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new param for weighting fitness eval
parent
bc4663c8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
5 deletions
+20
-5
main.cpp
application/main.cpp
+4
-0
evaluator.cpp
src/model/ea/evaluator.cpp
+12
-5
evaluator.h
src/model/ea/evaluator.h
+4
-0
No files found.
application/main.cpp
View file @
582f289c
...
@@ -62,6 +62,10 @@ int main(int argc, char* argv[]){
...
@@ -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
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
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
();
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
//PROFESSION PARAMETERS
unsigned
int
JOB_SEED
=
parser
.
createParam
((
unsigned
int
)(
7777
),
"jobSeed"
,
"Seed used for the Profession"
,
'g'
,
"Param"
).
value
();
unsigned
int
JOB_SEED
=
parser
.
createParam
((
unsigned
int
)(
7777
),
"jobSeed"
,
"Seed used for the Profession"
,
'g'
,
"Param"
).
value
();
...
...
src/model/ea/evaluator.cpp
View file @
582f289c
#include "evaluator.h"
#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
){
void
CursusEval
::
operator
()(
Cursus
&
_cursus
){
double
fit
=
0.0
;
double
fit
=
0.0
;
int
pCE
,
pCP
,
pCR
,
pCPR
;
double
pCE
,
pCP
,
pCR
,
pCPR
;
pCE
=
1
;
pCE
=
WEIGHT_ECTS
;
pCR
=
1
;
pCR
=
WEIGHT_REPETION
;
pCP
=
1
;
pCP
=
WEIGHT_JOB
;
pCPR
=
1
;
pCPR
=
WEIGHT_PREREQ
;
std
::
pair
<
bool
,
double
>
resCE
;
std
::
pair
<
bool
,
double
>
resCE
;
std
::
pair
<
bool
,
double
>
resCP
;
std
::
pair
<
bool
,
double
>
resCP
;
...
...
src/model/ea/evaluator.h
View file @
582f289c
...
@@ -17,6 +17,10 @@ public:
...
@@ -17,6 +17,10 @@ public:
void
operator
()(
Cursus
&
_cursus
);
void
operator
()(
Cursus
&
_cursus
);
static
double
WEIGHT_ECTS
;
static
double
WEIGHT_REPETION
;
static
double
WEIGHT_JOB
;
static
double
WEIGHT_PREREQ
;
private
:
private
:
ConstraintsPrerequisites
cpr
;
ConstraintsPrerequisites
cpr
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment