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
48b01b2e
Commit
48b01b2e
authored
May 15, 2020
by
Alexis Lebis
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ECTS metric revised. Solve
#7
issue
parent
766f62dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
main.cpp
application/main.cpp
+2
-1
ectsConstraints.cpp
src/model/constraints/ectsConstraints.cpp
+5
-1
No files found.
application/main.cpp
View file @
48b01b2e
...
...
@@ -134,7 +134,8 @@ int main(int argc, char* argv[]){
{
init
(
c1
);
eval
(
c1
);
//res = ctrECTS.integrityCheck(c1);
res
=
ctrECTS
.
integrityCheck
(
c1
);
std
::
cout
<<
"ECTS Metric"
<<
std
::
to_string
(
res
.
second
)
<<
std
::
endl
;
//res = ctrRep.integrityCheck(c1);
//res = ctrJob.integrityCheck(c1);
res
=
ctrPrq
.
integrityCheck
(
c1
);
...
...
src/model/constraints/ectsConstraints.cpp
View file @
48b01b2e
...
...
@@ -18,7 +18,11 @@ std::pair<bool, double> ConstraintsECTS::integrityCheck(Cursus indiv)
if
(
tmpECTS
>=
this
->
_job
.
requiredECTS
())
isCheckOK
=
true
;
//std::cout << "Required: " << std::to_string(this->_job.requiredECTS());
double
metric
=
(
double
)
tmpECTS
/
this
->
_job
.
requiredECTS
();
double
metric
;
if
(
tmpECTS
>
this
->
_job
.
requiredECTS
())
metric
=
1
;
else
metric
=
(
double
)
tmpECTS
/
this
->
_job
.
requiredECTS
();
return
std
::
pair
<
bool
,
double
>
(
isCheckOK
,
metric
);
}
\ No newline at end of file
Alexis Lebis
@alexis.lebis
mentioned in issue
#7 (closed)
·
May 15, 2020
mentioned in issue
#7 (closed)
mentioned in issue #7
Toggle commit list
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