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
77fddbae
Commit
77fddbae
authored
Jun 04, 2020
by
Alexis Lebis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add display option -d
parent
79bdf0e8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
85 additions
and
77 deletions
+85
-77
main.cpp
application/main.cpp
+85
-77
No files found.
application/main.cpp
View file @
77fddbae
...
...
@@ -44,6 +44,7 @@ int main(int argc, char* argv[]){
unsigned
int
_seedParam
=
parser
.
createParam
((
unsigned
int
)(
0
),
"seed"
,
"Random number seed"
,
'S'
).
value
();
std
::
string
_outputFile
=
parser
.
createParam
(
std
::
string
(
"/scratch"
),
"outputfile"
,
""
,
'\0'
,
"Representation"
,
true
).
value
();
eo
::
rng
.
reseed
(
_seedParam
);
unsigned
int
localDisplay
=
parser
.
createParam
((
unsigned
int
)(
0
),
"localDisplay"
,
"whether or not display on local output"
,
'd'
,
"Param"
).
value
();
//PROBLEM PARAMETERS
unsigned
int
SEED
=
parser
.
createParam
((
unsigned
int
)(
7777
),
"csdvpSeed"
,
"Seed used for the CSDVP"
,
's'
,
"Param"
).
value
();
...
...
@@ -301,16 +302,21 @@ int main(int argc, char* argv[]){
filename
+=
oss
.
str
();
std
::
ofstream
outputfile4
(
filename
.
c_str
(),
std
::
ios
::
app
);
std
::
pair
<
bool
,
double
>
resECTS
;
std
::
pair
<
bool
,
double
>
resRep
;
std
::
pair
<
bool
,
double
>
resJob
;
std
::
pair
<
bool
,
double
>
resPrq
;
/*std::cout << "===== CURRENT POP =====" << std::endl;
if
(
localDisplay
)
{
std
::
cout
<<
"===== CURRENT POP ====="
<<
std
::
endl
;
pop
.
best_element
().
printOn
(
std
::
cout
);
std
::
cout
<<
" fitness:"
<<
pop
.
best_element
().
fitness
()
<<
std
::
endl
;
std
::
cout
<<
"Stats & metrics:
\n
"
<<
std
::
endl
;
std::pair<bool, double>
resECTS = ctrECTS.integrityCheck(pop.best_element());
std::pair<bool, double>
resRep = ctrRep.integrityCheck(pop.best_element());
std::pair<bool, double>
resJob = ctrJob.integrityCheck(pop.best_element());
std::pair<bool, double>
resPrq = ctrPrq.integrityCheck(pop.best_element());
resECTS
=
ctrECTS
.
integrityCheck
(
pop
.
best_element
());
resRep
=
ctrRep
.
integrityCheck
(
pop
.
best_element
());
resJob
=
ctrJob
.
integrityCheck
(
pop
.
best_element
());
resPrq
=
ctrPrq
.
integrityCheck
(
pop
.
best_element
());
std
::
cout
<<
"ECTS: "
;
if
(
resECTS
.
first
)
...
...
@@ -340,7 +346,8 @@ int main(int argc, char* argv[]){
std
::
cout
<<
"failed"
;
std
::
cout
<<
" | value: "
<<
resPrq
.
second
<<
std
::
endl
;
std
::
cout
<<
"
\n
=========="
<<
std
::
endl
;
*/
}
// ---------- ALGO HERE
eoEasyEA
<
QUEEN
>
algo
(
cont
,
eval
,
select
,
transform
,
replace
);
...
...
@@ -389,7 +396,8 @@ int main(int argc, char* argv[]){
// -------------------
/*
if
(
localDisplay
)
{
std
::
cout
<<
"
\n
===== BEST INDIVIDU ====="
<<
std
::
endl
;
pop
.
best_element
().
printOn
(
std
::
cout
);
std
::
cout
<<
" fitness:"
<<
pop
.
best_element
().
fitness
()
<<
std
::
endl
;
...
...
@@ -429,8 +437,8 @@ int main(int argc, char* argv[]){
std
::
cout
<<
" | value: "
<<
resPrq
.
second
<<
std
::
endl
;
std
::
cout
<<
"==============="
<<
std
::
endl
;
}
*/
// ================================= END RUN ZONE ===============================
return
EXIT_SUCCESS
;
...
...
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