Commit 48b01b2e authored by Alexis Lebis's avatar Alexis Lebis

ECTS metric revised. Solve #7 issue

parent 766f62dd
......@@ -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);
......
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment