@@ -657,11 +657,11 @@ void restore_sigint_handler() {
657
657
#endif
658
658
659
659
// Allow C-c to interrupt the solver
660
- Solver_return call_mccs_protected(Solver solver, char *criteria, int timeout, CUDFproblem* cpb) {
660
+ Solver_return call_mccs_protected(Solver solver, char *criteria, int timeout, double mip_gap, CUDFproblem* cpb) {
661
661
Solver_return ret = { 0 , " " , cpb, NULL };
662
662
try {
663
663
install_sigint_handler ();
664
- ret = call_mccs (solver, criteria, timeout, cpb, &mccs_current_solver);
664
+ ret = call_mccs (solver, criteria, timeout, mip_gap, cpb, &mccs_current_solver);
665
665
mccs_current_solver = NULL ;
666
666
restore_sigint_handler ();
667
667
} catch (...) {
@@ -672,9 +672,9 @@ Solver_return call_mccs_protected(Solver solver, char *criteria, int timeout, CU
672
672
}
673
673
674
674
extern " C" value call_solver
675
- (value ml_solver_backend, value ml_criteria, value ml_timeout, value ml_problem)
675
+ (value ml_solver_backend, value ml_criteria, value ml_timeout, value mip_gap, value ml_problem)
676
676
{
677
- CAMLparam3 (ml_criteria, ml_timeout, ml_problem);
677
+ CAMLparam4 (ml_criteria, ml_timeout, mip_gap , ml_problem);
678
678
CAMLlocal2 (results, pkg);
679
679
problem * pb = Problem_pt (ml_problem);
680
680
CUDFproblem * cpb = pb->pb_cudf_problem ;
@@ -689,7 +689,7 @@ extern "C" value call_solver
689
689
strcat (criteria, " ]" );
690
690
691
691
// caml_release_runtime_system ();
692
- ret = call_mccs_protected (solver, criteria, Int_val (ml_timeout), cpb);
692
+ ret = call_mccs_protected (solver, criteria, Int_val (ml_timeout), Double_val (mip_gap), cpb);
693
693
// caml_acquire_runtime_system ();
694
694
delete[] criteria;
695
695
switch (ret.success ) {
0 commit comments