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
b4032fe0
Commit
b4032fe0
authored
4 years ago
by
Alexis Lebis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new param for deactivating decay
parent
582f289c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
0 deletions
+9
-0
main.cpp
application/main.cpp
+1
-0
CMakeLists.txt
src/model/CMakeLists.txt
+1
-0
decay.cpp
src/model/decay.cpp
+3
-0
decay.h
src/model/decay.h
+4
-0
No files found.
application/main.cpp
View file @
b4032fe0
...
@@ -66,6 +66,7 @@ int main(int argc, char* argv[]){
...
@@ -66,6 +66,7 @@ int main(int argc, char* argv[]){
CursusEval
::
WEIGHT_REPETION
=
parser
.
createParam
((
double
)(
1.0
),
"wREP"
,
"Weight of Repetition 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_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
();
CursusEval
::
WEIGHT_PREREQ
=
parser
.
createParam
((
double
)(
1.0
),
"wPrereq"
,
"Weight of prerequisites in the fitness value"
,
'W'
,
"Param"
).
value
();
DecayEngine
::
IS_DECAY_DEACTIVATED
=
parser
.
createParam
((
int
)(
0
),
"decayDeactivated"
,
"Wether or not the decay is deactivated"
,
'D'
,
"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
();
...
...
This diff is collapsed.
Click to expand it.
src/model/CMakeLists.txt
View file @
b4032fe0
...
@@ -9,6 +9,7 @@ SET (EXERCICE_SOURCES
...
@@ -9,6 +9,7 @@ SET (EXERCICE_SOURCES
course.cpp
course.cpp
profession.cpp
profession.cpp
problem.cpp
problem.cpp
decay.cpp
)
)
ADD_LIBRARY
(
lModel STATIC
${
EXERCICE_SOURCES
}
)
ADD_LIBRARY
(
lModel STATIC
${
EXERCICE_SOURCES
}
)
...
...
This diff is collapsed.
Click to expand it.
src/model/decay.cpp
0 → 100644
View file @
b4032fe0
#include "decay.h"
int
DecayEngine
::
IS_DECAY_DEACTIVATED
=
0
;
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/model/decay.h
View file @
b4032fe0
...
@@ -2,16 +2,20 @@
...
@@ -2,16 +2,20 @@
#define SRC_MODEL_DECAY_H_
#define SRC_MODEL_DECAY_H_
#include <cmath>
#include <cmath>
#include <iostream>
class
DecayEngine
class
DecayEngine
{
{
private
:
private
:
public
:
public
:
static
int
IS_DECAY_DEACTIVATED
;
/** Expresses the decay over the time x.
/** Expresses the decay over the time x.
*/
*/
static
double
defaultDecay
(
int
t
)
static
double
defaultDecay
(
int
t
)
{
{
if
(
IS_DECAY_DEACTIVATED
)
return
0
;
if
(
t
==
0
)
if
(
t
==
0
)
return
0
;
return
0
;
return
(
exp
(
t
/
1
.
25
)
+
5
)
/
100
;
return
(
exp
(
t
/
1
.
25
)
+
5
)
/
100
;
...
...
This diff is collapsed.
Click to expand it.
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