Skip to content

Commit

Permalink
hri2 cpu limit
Browse files Browse the repository at this point in the history
  • Loading branch information
thiloklein committed Jun 6, 2018
1 parent 9f99493 commit 91432a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/params.cc
Expand Up @@ -82,8 +82,8 @@ void Params::readOptions() {
//Sven
algo = 1;
verbosity = 0;
cclim = -1 ;
rnd = false;
cclim = 1000;
rnd = true;
rndcclim = std::numeric_limits<int>::max();
kpr_cclim = -1;
}
Expand Down
6 changes: 5 additions & 1 deletion src/runMatch.cpp
Expand Up @@ -17,11 +17,15 @@ List runMatch(Rcpp::List students, Rcpp::List programs, Rcpp::List couples) {
Rcpp::Rcout << prob.getError();
}

//cpu limit -> 10 sec
rlimit rl;
rl.rlim_cur = 10;

dam = new RPmatcher {};
auto match = dam->match(prob);

return List::create(Named("matchings") = prob.returnMatch(match),
//instead of long description print short stats
//Named("summary") = prob.summaryMatch(match),
Named("stats") = prob.getStats(match));
}
}

0 comments on commit 91432a2

Please sign in to comment.