Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ocaml-mccs for openSUSE:Factory 
checked in at 2023-07-17 19:23:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ocaml-mccs (Old)
 and      /work/SRC/openSUSE:Factory/.ocaml-mccs.new.3193 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ocaml-mccs"

Mon Jul 17 19:23:18 2023 rev:8 rq:1098784 version:1.1+16

Changes:
--------
--- /work/SRC/openSUSE:Factory/ocaml-mccs/ocaml-mccs.changes    2022-06-21 
16:33:11.567879875 +0200
+++ /work/SRC/openSUSE:Factory/.ocaml-mccs.new.3193/ocaml-mccs.changes  
2023-07-17 19:23:39.237865175 +0200
@@ -1,0 +2,6 @@
+Fri Jul  7 07:07:07 UTC 2023 - oher...@suse.de
+
+- Update to version 1.1+16
+  * No changelog provided.
+
+-------------------------------------------------------------------

Old:
----
  ocaml-mccs-1.1+14.tar.xz

New:
----
  ocaml-mccs-1.1+16.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ocaml-mccs.spec ++++++
--- /var/tmp/diff_new_pack.E2COat/_old  2023-07-17 19:23:39.813868511 +0200
+++ /var/tmp/diff_new_pack.E2COat/_new  2023-07-17 19:23:39.817868535 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ocaml-mccs
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           ocaml-mccs
-Version:        1.1+14
+Version:        1.1+16
 Release:        0
 %{?ocaml_preserve_bytecode}
 Summary:        Stripped-down version of mccs with OCaml bindings
@@ -29,7 +29,7 @@
 BuildRequires:  gcc-c++
 BuildRequires:  ocaml
 BuildRequires:  ocaml-dune
-BuildRequires:  ocaml-rpm-macros >= 20220409
+BuildRequires:  ocaml-rpm-macros >= 20230101
 BuildRequires:  ocamlfind(cudf)
 
 %description

++++++ _service ++++++
--- /var/tmp/diff_new_pack.E2COat/_old  2023-07-17 19:23:39.845868696 +0200
+++ /var/tmp/diff_new_pack.E2COat/_new  2023-07-17 19:23:39.849868720 +0200
@@ -1,7 +1,7 @@
 <services>
   <service mode="disabled" name="tar_scm">
     <param name="filename">ocaml-mccs</param>
-    <param name="revision">8f8ff8df6a0cb4e463075145bf3eee326ff5d3ec</param>
+    <param name="revision">982194774c01e95cca1fa832bea5a69f76110d16</param>
     <param name="scm">git</param>
     <param name="submodules">disable</param>
     <param name="url">https://github.com/AltGr/ocaml-mccs.git</param>

++++++ ocaml-mccs-1.1+14.tar.xz -> ocaml-mccs-1.1+16.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/.github/workflows/main.yml 
new/ocaml-mccs-1.1+16/.github/workflows/main.yml
--- old/ocaml-mccs-1.1+14/.github/workflows/main.yml    1970-01-01 
01:00:00.000000000 +0100
+++ new/ocaml-mccs-1.1+16/.github/workflows/main.yml    2023-07-05 
11:17:53.000000000 +0200
@@ -0,0 +1,40 @@
+name: OCaml MCCS
+
+on:
+  pull_request:
+  push:
+
+jobs:
+  build:
+    strategy:
+      fail-fast: false
+      matrix:
+        os:
+          - ubuntu-latest
+          - macos-latest
+          - windows-latest
+        ocaml-compiler:
+          - 4.12.x
+          - 4.13.x
+          - 4.14.x
+          - 5.00.x
+        exclude:
+          - os: windows-latest
+            ocaml-compiler: 5.00.x
+          - os: macos-latest
+            ocaml-compiler: 4.08.x
+
+    runs-on: ${{ matrix.os }}
+
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@v3
+
+      - name: Use OCaml ${{ matrix.ocaml-compiler }}
+        uses: ocaml/setup-ocaml@v2
+        with:
+          ocaml-compiler: ${{ matrix.ocaml-compiler }}
+
+      - run: opam install . --deps-only --with-test
+      - run: opam exec -- dune build
+      - run: opam exec -- dune runtest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/mccs.opam 
new/ocaml-mccs-1.1+16/mccs.opam
--- old/ocaml-mccs-1.1+14/mccs.opam     2022-05-17 15:55:52.000000000 +0200
+++ new/ocaml-mccs-1.1+16/mccs.opam     2023-07-05 11:17:53.000000000 +0200
@@ -1,14 +1,14 @@
 opam-version: "2.0"
-version: "1.1+14"
+version: "1.1+16"
 maintainer: "Louis Gesbert <louis.gesb...@ocamlpro.com>"
 authors: [
   "Claude Michel <claude.mic...@unice.fr>"
   "Louis Gesbert <louis.gesb...@ocamlpro.com>"
 ]
-homepage: "http://www.i3s.unice.fr/~cpjm/misc/";
-bug-reports: "https://github.com/AltGr/ocaml-mccs/issues";
-license: "LGPL-2.1 with OCaml linking exception, BSD-3-clause, GPL-3.0"
-dev-repo: "git+https://github.com/AltGr/ocaml-mccs.git";
+homepage: "https://www.i3s.unice.fr/~cpjm/misc/";
+bug-reports: "https://github.com/ocaml-opam/ocaml-mccs/issues";
+license: ["LGPL-2.1-only WITH OCaml-LGPL-linking-exception" "BSD-3-clause" 
"GPL-3.0-only"]
+dev-repo: "git+https://github.com/ocaml-opam/ocaml-mccs.git";
 build: [
   ["dune" "build" "-p" name "-j" jobs]
   ["sh" "-c" "dune build @settests --auto-promote || true"] {with-test}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/abstract_combiner.h 
new/ocaml-mccs-1.1+16/src/abstract_combiner.h
--- old/ocaml-mccs-1.1+14/src/abstract_combiner.h       2022-05-17 
15:55:52.000000000 +0200
+++ new/ocaml-mccs-1.1+16/src/abstract_combiner.h       2023-07-05 
11:17:53.000000000 +0200
@@ -9,8 +9,8 @@
 #ifndef __ABSTRACT_COMBINER_H
 #define __ABSTRACT_COMBINER_H
 
-#include <cudf.h> 
-#include <abstract_criteria.h>
+#include "cudf.h" 
+#include "abstract_criteria.h"
 
 // An anstract combiner
 class abstract_combiner {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/abstract_criteria.h 
new/ocaml-mccs-1.1+16/src/abstract_criteria.h
--- old/ocaml-mccs-1.1+14/src/abstract_criteria.h       2022-05-17 
15:55:52.000000000 +0200
+++ new/ocaml-mccs-1.1+16/src/abstract_criteria.h       2023-07-05 
11:17:53.000000000 +0200
@@ -10,9 +10,9 @@
 #ifndef _ABSTRACT_CRITERIA_H_
 #define _ABSTRACT_CRITERIA_H_
 
-#include <cudf.h>
-#include <cudf_types.h>
-#include <abstract_solver.h>
+#include "cudf.h"
+#include "cudf_types.h"
+#include "abstract_solver.h"
 
 // Abstract criteria class
 class abstract_criteria {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/abstract_solver.h 
new/ocaml-mccs-1.1+16/src/abstract_solver.h
--- old/ocaml-mccs-1.1+14/src/abstract_solver.h 2022-05-17 15:55:52.000000000 
+0200
+++ new/ocaml-mccs-1.1+16/src/abstract_solver.h 2023-07-05 11:17:53.000000000 
+0200
@@ -11,8 +11,8 @@
 #ifndef _ABSTRACT_SOLVER_H
 #define _ABSTRACT_SOLVER_H
 
-#include <cudf.h>
-#include <cudf_types.h>
+#include "cudf.h"
+#include "cudf_types.h"
 
 
 // provide an abstraction of the underlying solvers
@@ -92,6 +92,8 @@
   virtual int solve() { return 0; }; 
   virtual int solve(int timeout) { return 0; };
 
+  virtual void set_mip_gap(double) = 0;
+
   // ******************************************************************
   // abort should, if possible, do something which causes solve to
   // terminate.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/changed_criteria.cpp 
new/ocaml-mccs-1.1+16/src/changed_criteria.cpp
--- old/ocaml-mccs-1.1+14/src/changed_criteria.cpp      2022-05-17 
15:55:52.000000000 +0200
+++ new/ocaml-mccs-1.1+16/src/changed_criteria.cpp      2023-07-05 
11:17:53.000000000 +0200
@@ -6,7 +6,7 @@
 /*******************************************************/
 
 
-#include <changed_criteria.h>
+#include "changed_criteria.h"
 
 // Criteria initialization
 void changed_criteria::initialize(CUDFproblem *problem, abstract_solver 
*solver) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/changed_criteria.h 
new/ocaml-mccs-1.1+16/src/changed_criteria.h
--- old/ocaml-mccs-1.1+14/src/changed_criteria.h        2022-05-17 
15:55:52.000000000 +0200
+++ new/ocaml-mccs-1.1+16/src/changed_criteria.h        2023-07-05 
11:17:53.000000000 +0200
@@ -9,7 +9,7 @@
 #ifndef _CHANGED_CRITERIA_H_
 #define _CHANGED_CRITERIA_H_
 
-#include <abstract_criteria.h>
+#include "abstract_criteria.h"
 
 // A concrete class for the changed criteria
 // i.e. number of virtual packages whose set of 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/combiner.h 
new/ocaml-mccs-1.1+16/src/combiner.h
--- old/ocaml-mccs-1.1+14/src/combiner.h        2022-05-17 15:55:52.000000000 
+0200
+++ new/ocaml-mccs-1.1+16/src/combiner.h        2023-07-05 11:17:53.000000000 
+0200
@@ -9,17 +9,17 @@
 #ifndef __COMBINER_H
 #define __COMBINER_H
 
-#include <cudf.h>
-#include <abstract_criteria.h>
-#include <abstract_combiner.h>
+#include "cudf.h"
+#include "abstract_criteria.h"
+#include "abstract_combiner.h"
 
-/* #include <lexicographic_combiner.h> */
-#include <lexagregate_combiner.h>
-/* #include <agregate_combiner.h>
- * #include <lexsemiagregate_combiner.h>
- * #include <leximin_combiner.h>
- * #include <leximax_combiner.h>
- * #include <lexleximin_combiner.h>
- * #include <lexleximax_combiner.h> */
+/* #include "lexicographic_combiner.h" */
+#include "lexagregate_combiner.h"
+/* #include "agregate_combiner.h"
+ * #include "lexsemiagregate_combiner.h"
+ * #include "leximin_combiner.h"
+ * #include "leximax_combiner.h"
+ * #include "lexleximin_combiner.h"
+ * #include "lexleximax_combiner.h" */
 
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/constraint_generation.cpp 
new/ocaml-mccs-1.1+16/src/constraint_generation.cpp
--- old/ocaml-mccs-1.1+14/src/constraint_generation.cpp 2022-05-17 
15:55:52.000000000 +0200
+++ new/ocaml-mccs-1.1+16/src/constraint_generation.cpp 2023-07-05 
11:17:53.000000000 +0200
@@ -7,7 +7,7 @@
 
 // translate a CUDF problem in a MILP problem
 
-#include <constraint_generation.h>
+#include "constraint_generation.h"
 
 bool generate_desagregate_constraints = false;
 bool generate_agregate_constraints = true;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/constraint_generation.h 
new/ocaml-mccs-1.1+16/src/constraint_generation.h
--- old/ocaml-mccs-1.1+14/src/constraint_generation.h   2022-05-17 
15:55:52.000000000 +0200
+++ new/ocaml-mccs-1.1+16/src/constraint_generation.h   2023-07-05 
11:17:53.000000000 +0200
@@ -10,11 +10,11 @@
 #ifndef _CONSTRAINT_GENERATION_H_
 #define _CONSTRAINT_GENERATION_H_
 
-#include <cudf.h>
-#include <abstract_solver.h>
-#include <criteria.h>
-#include <combiner.h>
-#include <cudf_reductions.h>
+#include "cudf.h"
+#include "abstract_solver.h"
+#include "criteria.h"
+#include "combiner.h"
+#include "cudf_reductions.h"
 
 extern bool generate_desagregate_constraints;
 extern bool generate_agregate_constraints;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/context_flags.ml 
new/ocaml-mccs-1.1+16/src/context_flags.ml
--- old/ocaml-mccs-1.1+14/src/context_flags.ml  2022-05-17 15:55:52.000000000 
+0200
+++ new/ocaml-mccs-1.1+16/src/context_flags.ml  2023-07-05 11:17:53.000000000 
+0200
@@ -24,8 +24,10 @@
 
 let cxxflags =
   let flags =
+    (if (Sys.win32 && Config.ccomp_type = "msvc")
+     then ["\"/EHsc\""]
+     else ["-Wall -Wextra -Wno-unused-parameter"]) @
     (ifc (Config.system = "macosx") ["-x"; "c++"]) @
-    (ifc (Sys.win32 && Config.ccomp_type = "msvc") ["\"/EHsc\""]) @
     (ifc useGLPK ["-DUSEGLPK"]) @
     (ifc useCOIN ["-DUSECOIN"]) @
     (ifc useCLP  ["-DUSECLP"]) @
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/count_criteria.cpp 
new/ocaml-mccs-1.1+16/src/count_criteria.cpp
--- old/ocaml-mccs-1.1+14/src/count_criteria.cpp        2022-05-17 
15:55:52.000000000 +0200
+++ new/ocaml-mccs-1.1+16/src/count_criteria.cpp        2023-07-05 
11:17:53.000000000 +0200
@@ -7,7 +7,7 @@
 
 // Count a property quantity
 
-#include <count_criteria.h>
+#include "count_criteria.h"
 
 // Check property availability
 void count_criteria::check_property(CUDFproblem *problem) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/count_criteria.h 
new/ocaml-mccs-1.1+16/src/count_criteria.h
--- old/ocaml-mccs-1.1+14/src/count_criteria.h  2022-05-17 15:55:52.000000000 
+0200
+++ new/ocaml-mccs-1.1+16/src/count_criteria.h  2023-07-05 11:17:53.000000000 
+0200
@@ -10,7 +10,7 @@
 #ifndef _COUNT_CRITERIA_H_
 #define _COUNT_CRITERIA_H_
 
-#include <abstract_criteria.h>
+#include "abstract_criteria.h"
 
 typedef enum {REQUEST,NEW,CHANGED,SOLUTION} Count_scope;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/criteria.h 
new/ocaml-mccs-1.1+16/src/criteria.h
--- old/ocaml-mccs-1.1+14/src/criteria.h        2022-05-17 15:55:52.000000000 
+0200
+++ new/ocaml-mccs-1.1+16/src/criteria.h        2023-07-05 11:17:53.000000000 
+0200
@@ -10,21 +10,21 @@
 #ifndef _CRITERIA_H_
 #define _CRITERIA_H_
 
-#include <cudf.h>
-#include <abstract_solver.h>
-#include <abstract_criteria.h>
-
-#include <removed_criteria.h>
-#include <changed_criteria.h>
-#include <notuptodate_criteria.h>
-#include <new_criteria.h>
-//#include <nunsat_criteria.h>
+#include "cudf.h"
+#include "abstract_solver.h"
+#include "abstract_criteria.h"
+
+#include "removed_criteria.h"
+#include "changed_criteria.h"
+#include "notuptodate_criteria.h"
+#include "new_criteria.h"
+//#include "nunsat_criteria.h"
 
-#include <count_criteria.h>
-//#include <unaligned_criteria.h>
+#include "count_criteria.h"
+//#include "unaligned_criteria.h"
 
-#include <lexagregate_combiner.h>
-//#include <agregate_combiner.h>
+#include "lexagregate_combiner.h"
+//#include "agregate_combiner.h"
 
 #endif
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/cudf.h 
new/ocaml-mccs-1.1+16/src/cudf.h
--- old/ocaml-mccs-1.1+14/src/cudf.h    2022-05-17 15:55:52.000000000 +0200
+++ new/ocaml-mccs-1.1+16/src/cudf.h    2023-07-05 11:17:53.000000000 +0200
@@ -18,9 +18,9 @@
 #define __USE_MINGW_ANSI_STDIO 1
 #endif
 
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
+#include <cstdio>
+#include <cstring>
+#include <cstdlib>
 #include <vector>
 #include <set>
 #include <map>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/cudf_reductions.cpp 
new/ocaml-mccs-1.1+16/src/cudf_reductions.cpp
--- old/ocaml-mccs-1.1+14/src/cudf_reductions.cpp       2022-05-17 
15:55:52.000000000 +0200
+++ new/ocaml-mccs-1.1+16/src/cudf_reductions.cpp       2023-07-05 
11:17:53.000000000 +0200
@@ -6,7 +6,7 @@
 /*******************************************************/
 
 
-#include <cudf_reductions.h>
+#include "cudf_reductions.h"
 #include <list>
 
 vector<CUDFPropertiesIterator> process_properties; // set of property to 
process
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/cudf_reductions.h 
new/ocaml-mccs-1.1+16/src/cudf_reductions.h
--- old/ocaml-mccs-1.1+14/src/cudf_reductions.h 2022-05-17 15:55:52.000000000 
+0200
+++ new/ocaml-mccs-1.1+16/src/cudf_reductions.h 2023-07-05 11:17:53.000000000 
+0200
@@ -15,8 +15,8 @@
 #ifndef __CUDF_REDUCTIONS
 #define __CUDF_REDUCTIONS
 
-#include <cudf.h>
-#include <cudf_types.h>
+#include "cudf.h"
+#include "cudf_types.h"
 
 extern vector<CUDFPropertiesIterator> process_properties; // set of property 
to process
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/cudf_tools.cpp 
new/ocaml-mccs-1.1+16/src/cudf_tools.cpp
--- old/ocaml-mccs-1.1+14/src/cudf_tools.cpp    2022-05-17 15:55:52.000000000 
+0200
+++ new/ocaml-mccs-1.1+16/src/cudf_tools.cpp    2023-07-05 11:17:53.000000000 
+0200
@@ -6,8 +6,8 @@
 /*******************************************************/
 
 
-#include <cudf.h>
-#include <cudf_types.h>
+#include "cudf.h"
+#include "cudf_types.h"
 
 // Handling verbosity level
 int verbosity = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/dune 
new/ocaml-mccs-1.1+16/src/dune
--- old/ocaml-mccs-1.1+14/src/dune      2022-05-17 15:55:52.000000000 +0200
+++ new/ocaml-mccs-1.1+16/src/dune      2023-07-05 11:17:53.000000000 +0200
@@ -7,8 +7,6 @@
  (modules :standard \ context_flags)
  (cxx_flags
   :standard
-  -I
-  .
   (:include cxxflags.sexp))
  (c_library_flags
   :standard
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/glpk_solver.cpp 
new/ocaml-mccs-1.1+16/src/glpk_solver.cpp
--- old/ocaml-mccs-1.1+14/src/glpk_solver.cpp   2022-05-17 15:55:52.000000000 
+0200
+++ new/ocaml-mccs-1.1+16/src/glpk_solver.cpp   2023-07-05 11:17:53.000000000 
+0200
@@ -12,9 +12,9 @@
 #else
 #include <unistd.h>
 #endif
-#include <math.h>
-#include <glpk_solver.h>
-#include <limits.h>
+#include <cmath>
+#include "glpk_solver.h"
+#include <climits>
 
 #define OUTPUT_MODEL 0
 
@@ -67,6 +67,10 @@
   return;
 }
 
+void glpk_solver::set_mip_gap(double mip_gap) {
+  this->mip_gap = mip_gap;
+}
+
 // solve the current lp problem
 int glpk_solver::solve(int timeout) {
   int status = 0, nb_objectives = objectives.size();
@@ -85,6 +89,7 @@
   this->mip_params.presolve = GLP_ON;
   this->mip_params.binarize = GLP_ON;
   this->mip_params.tm_lim = timeout;
+  this->mip_params.mip_gap = this->mip_gap;
   this->mip_params.msg_lev = (verbosity > 1) ? GLP_MSG_ON : GLP_MSG_OFF;
   // one of GLP_MSG_OFF GLP_MSG_ERR GLP_MSG_ON GLP_MSG_ALL
 
@@ -129,8 +134,10 @@
     close(save_stdout);
   }
   switch (status) {
+  case GLP_EMIPGAP:
   case 0: {
     switch (glp_mip_status(lp)) {
+    case GLP_FEAS:
     case GLP_OPT: return 1;
     case GLP_NOFEAS: return 0;
     default: return -1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/glpk_solver.h 
new/ocaml-mccs-1.1+16/src/glpk_solver.h
--- old/ocaml-mccs-1.1+14/src/glpk_solver.h     2022-05-17 15:55:52.000000000 
+0200
+++ new/ocaml-mccs-1.1+16/src/glpk_solver.h     2023-07-05 11:17:53.000000000 
+0200
@@ -10,8 +10,8 @@
 #ifndef _GLPK_SOLVER_H
 #define _GLPK_SOLVER_H
 
-#include <abstract_solver.h>
-#include <scoeff_solver.h>
+#include "abstract_solver.h"
+#include "scoeff_solver.h"
 #include "config.h"
 
 class glpk_solver: public abstract_solver, public scoeff_solver<double, 1, 1>  
{
@@ -24,6 +24,8 @@
   // Allocate some columns for integer variables
   int set_intvar_range(int rank, CUDFcoefficient lower, CUDFcoefficient upper);
 
+  void set_mip_gap(double);
+
   // Write the lp on a file
   // int writelp(const char *filename);
 
@@ -97,6 +99,7 @@
  private:
   glp_iocp mip_params;
   bool aborted;
+  double mip_gap;
 
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/lexagregate_combiner.cpp 
new/ocaml-mccs-1.1+16/src/lexagregate_combiner.cpp
--- old/ocaml-mccs-1.1+14/src/lexagregate_combiner.cpp  2022-05-17 
15:55:52.000000000 +0200
+++ new/ocaml-mccs-1.1+16/src/lexagregate_combiner.cpp  2023-07-05 
11:17:53.000000000 +0200
@@ -6,8 +6,8 @@
 /*******************************************************/
 
 
-#include <stdio.h>
-#include <lexagregate_combiner.h>
+#include <cstdio>
+#include "lexagregate_combiner.h"
 
 // Compute the number of columns required to handle the combiner
 int lexagregate_combiner::column_allocation(int first_rank) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/lexagregate_combiner.h 
new/ocaml-mccs-1.1+16/src/lexagregate_combiner.h
--- old/ocaml-mccs-1.1+14/src/lexagregate_combiner.h    2022-05-17 
15:55:52.000000000 +0200
+++ new/ocaml-mccs-1.1+16/src/lexagregate_combiner.h    2023-07-05 
11:17:53.000000000 +0200
@@ -10,7 +10,7 @@
 #ifndef __LEXAGREGATE_COMBINER_H
 #define __LEXAGREGATE_COMBINER_H
 
-#include <abstract_combiner.h>
+#include "abstract_combiner.h"
 
 // Concrete class to agregate a set of criteria i.e. handle it as sum 
\lambda_i c_i
 // Note: such an agregate could be seen either as a combiner or a criteria
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/lp_solver.cpp 
new/ocaml-mccs-1.1+16/src/lp_solver.cpp
--- old/ocaml-mccs-1.1+14/src/lp_solver.cpp     2022-05-17 15:55:52.000000000 
+0200
+++ new/ocaml-mccs-1.1+16/src/lp_solver.cpp     2023-07-05 11:17:53.000000000 
+0200
@@ -5,8 +5,8 @@
 /*******************************************************/
 
 
-#include <stdio.h>
-#include <stdlib.h>
+#include <cstdio>
+#include <cstdlib>
 #include <sys/types.h>
 #ifdef _WIN32
 #include <windows.h>
@@ -14,7 +14,7 @@
 #include <unistd.h>
 #endif
 
-#include <lp_solver.h>
+#include "lp_solver.h"
 
 #define CLEAN_FILES 1
 #ifdef _WIN32
@@ -88,11 +88,13 @@
 // write the problem into a file
 int lp_solver::writelp(const char *filename) { return 0; }
 
+void lp_solver::set_mip_gap(double mip_gap) {} // TODO ?
+
 // solve the current problem
 int lp_solver::solve() {
   int status = 0;
   int rank, iobjval;
-  char command[1024];
+  char command[2048];
   FILE *fsol = (FILE *)NULL;
   CUDFcoefficient objvals[20];
   unsigned int nb_objectives = objectives.size();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/lp_solver.h 
new/ocaml-mccs-1.1+16/src/lp_solver.h
--- old/ocaml-mccs-1.1+14/src/lp_solver.h       2022-05-17 15:55:52.000000000 
+0200
+++ new/ocaml-mccs-1.1+16/src/lp_solver.h       2023-07-05 11:17:53.000000000 
+0200
@@ -10,8 +10,8 @@
 #ifndef _LP_SOLVER_H
 #define _LP_SOLVER_H
 
-#include <abstract_solver.h>
-#include <scoeff_solver.h>
+#include "abstract_solver.h"
+#include "scoeff_solver.h"
 
 class lp_solver: public abstract_solver, public scoeff_solver<CUDFcoefficient, 
0, 0> {
  public:
@@ -20,6 +20,8 @@
   // Write the lp on a file
   int writelp(const char *filename);
 
+  void set_mip_gap(double);
+
   // Solve the problem
   int solve();
   int solve(int timeout);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/mccs.ml 
new/ocaml-mccs-1.1+16/src/mccs.ml
--- old/ocaml-mccs-1.1+14/src/mccs.ml   2022-05-17 15:55:52.000000000 +0200
+++ new/ocaml-mccs-1.1+16/src/mccs.ml   2023-07-05 11:17:53.000000000 +0200
@@ -60,7 +60,7 @@
   = "set_problem_request"
 
 external call_solver:
-  solver_backend -> string -> int -> problem -> Cudf.package list option
+  solver_backend -> string -> int -> float -> problem -> Cudf.package list 
option
   = "call_solver"
 
 external backends_list:
@@ -75,15 +75,16 @@
   pb
 
 let resolve_cudf
-    ?(verbose=false) ?timeout ?(solver=default_solver)
+    ?(verbose=false) ?(verbosity=0) ?timeout ?(mip_gap=0.0)
+    ?(solver=default_solver)
     criteria (preamble, _, _ as cudf) =
   let timeout = match timeout with
     | None -> 0
     | Some f -> int_of_float (1000. *. f)
   in
-  set_verbosity (if verbose then 1 else 0);
+  set_verbosity (max (if verbose then 1 else 0) verbosity);
   let pb = problem_of_cudf cudf in
-  match call_solver solver criteria timeout pb with
+  match call_solver solver criteria timeout mip_gap pb with
   | None -> None
   | Some sol ->
     let univ = Cudf.load_universe sol in
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/mccs.mli 
new/ocaml-mccs-1.1+16/src/mccs.mli
--- old/ocaml-mccs-1.1+14/src/mccs.mli  2022-05-17 15:55:52.000000000 +0200
+++ new/ocaml-mccs-1.1+16/src/mccs.mli  2023-07-05 11:17:53.000000000 +0200
@@ -19,7 +19,8 @@
 (** Resolve the given problem. The timeout is in seconds, default is to never
     time out. *)
 val resolve_cudf:
-  ?verbose:bool -> ?timeout:float -> ?solver:solver_backend ->
+  ?verbose:bool -> ?verbosity:int -> ?timeout:float -> ?mip_gap:float ->
+  ?solver:solver_backend ->
   string -> Cudf.cudf -> Cudf.solution option
 
 (** Deprecated, corresponds to the default solver backend selection only *)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/mccs_stubs.cpp 
new/ocaml-mccs-1.1+16/src/mccs_stubs.cpp
--- old/ocaml-mccs-1.1+14/src/mccs_stubs.cpp    2022-05-17 15:55:52.000000000 
+0200
+++ new/ocaml-mccs-1.1+16/src/mccs_stubs.cpp    2023-07-05 11:17:53.000000000 
+0200
@@ -3,6 +3,7 @@
 #endif
 
 #define CAML_NAME_SPACE
+#include <caml/version.h>
 #include <caml/mlvalues.h>
 #include <caml/memory.h>
 #include <caml/custom.h>
@@ -12,15 +13,15 @@
 #include <caml/callback.h>
 #include <signal.h>
 #include <map>
-#include <cudf.h>
-#include <abstract_solver.h>
-#include <cudf_reductions.h>
-#include <mccscudf.h>
+#include "cudf.h"
+#include "abstract_solver.h"
+#include "cudf_reductions.h"
+#include "mccscudf.h"
 #ifdef USEGLPK
-#include <glpk_solver.h>
+#include "glpk_solver.h"
 #endif
 #ifdef USECOIN
-#include <osi_solver.h>
+#include "osi_solver.h"
 #endif
 
 #if OCAML_VERSION < 41200
@@ -499,7 +500,10 @@
   custom_hash_default,
   custom_serialize_default,
   custom_deserialize_default,
-  custom_compare_ext_default
+  custom_compare_ext_default,
+#if OCAML_VERSION >= 40800
+  0,
+#endif
 };
 
 extern "C" value set_verbosity(value v)
@@ -653,11 +657,11 @@
 #endif
 
 // Allow C-c to interrupt the solver
-Solver_return call_mccs_protected(Solver solver, char *criteria, int timeout, 
CUDFproblem* cpb) {
+Solver_return call_mccs_protected(Solver solver, char *criteria, int timeout, 
double mip_gap, CUDFproblem* cpb) {
   Solver_return ret = { 0, "", cpb, NULL };
   try {
     install_sigint_handler();
-    ret = call_mccs(solver, criteria, timeout, cpb, &mccs_current_solver);
+    ret = call_mccs(solver, criteria, timeout, mip_gap, cpb, 
&mccs_current_solver);
     mccs_current_solver = NULL;
     restore_sigint_handler();
   } catch (...) {
@@ -668,9 +672,9 @@
 }
 
 extern "C" value call_solver
-(value ml_solver_backend, value ml_criteria, value ml_timeout, value 
ml_problem)
+(value ml_solver_backend, value ml_criteria, value ml_timeout, value mip_gap, 
value ml_problem)
 {
-  CAMLparam3(ml_criteria, ml_timeout, ml_problem);
+  CAMLparam4(ml_criteria, ml_timeout, mip_gap, ml_problem);
   CAMLlocal2(results, pkg);
   problem * pb = Problem_pt(ml_problem);
   CUDFproblem * cpb = pb->pb_cudf_problem;
@@ -685,7 +689,7 @@
   strcat(criteria, "]");
 
   // caml_release_runtime_system ();
-  ret = call_mccs_protected(solver, criteria, Int_val(ml_timeout), cpb);
+  ret = call_mccs_protected(solver, criteria, Int_val(ml_timeout), 
Double_val(mip_gap), cpb);
   // caml_acquire_runtime_system ();
   delete[] criteria;
   switch (ret.success) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/mccscudf.cpp 
new/ocaml-mccs-1.1+16/src/mccscudf.cpp
--- old/ocaml-mccs-1.1+14/src/mccscudf.cpp      2022-05-17 15:55:52.000000000 
+0200
+++ new/ocaml-mccs-1.1+16/src/mccscudf.cpp      2023-07-05 11:17:53.000000000 
+0200
@@ -5,16 +5,16 @@
 /*******************************************************/
 
 
-#include <cudf.h>
-#include <abstract_solver.h>
-#include <constraint_generation.h>
-#include <criteria.h>
-#include <combiner.h>
-#include <cudf_reductions.h>
+#include "cudf.h"
+#include "abstract_solver.h"
+#include "constraint_generation.h"
+#include "criteria.h"
+#include "combiner.h"
+#include "cudf_reductions.h"
 #include <sys/stat.h>
-#include <errno.h>
+#include <cerrno>
 #include <sstream>
-#include <mccscudf.h>
+#include "mccscudf.h"
 
 // underlying solver declaration
 // allows using solvers withour having to include the whole solver classes
@@ -35,7 +35,7 @@
 #endif
 
 #ifdef USECOIN
-  #include <osi_solver.h>
+  #include "osi_solver.h"
   #ifdef USECLP
     #include <coin/OsiClpSolverInterface.hpp>
   #endif
@@ -285,12 +285,12 @@
   return process_criteria(crit_descr, pos, first_level, 
criteria_with_property);
 }
 
-Solver_return call_mccs(Solver solver_arg, char *criteria_arg, int timeout, 
CUDFproblem* the_problem) {
+Solver_return call_mccs(Solver solver_arg, char *criteria_arg, int timeout, 
double mip_gap, CUDFproblem* the_problem) {
   abstract_solver *solver;
-  return call_mccs(solver_arg, criteria_arg, timeout, the_problem, &solver);
+  return call_mccs(solver_arg, criteria_arg, timeout, mip_gap, the_problem, 
&solver);
 }
 
-Solver_return call_mccs(Solver solver_arg, char *criteria_arg, int timeout, 
CUDFproblem* the_problem, abstract_solver **solver_ptr) {
+Solver_return call_mccs(Solver solver_arg, char *criteria_arg, int timeout, 
double mip_gap, CUDFproblem* the_problem, abstract_solver **solver_ptr) {
   CUDFproblem *problem = the_problem;
   vector<abstract_criteria *> criteria_with_property;
   CriteriaList *criteria = get_criteria(criteria_arg, false, 
&criteria_with_property);
@@ -377,6 +377,7 @@
     if (verbosity > 0) PRINT_OUT("========\nConstraint generation error.\n");
     no_solution = true;
   }
+  solver->set_mip_gap(mip_gap);
   if (! no_solution) {
     int s = (timeout > 0) ? solver->solve(timeout) : solver->solve();
     if (s <= 0) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/mccscudf.h 
new/ocaml-mccs-1.1+16/src/mccscudf.h
--- old/ocaml-mccs-1.1+14/src/mccscudf.h        2022-05-17 15:55:52.000000000 
+0200
+++ new/ocaml-mccs-1.1+16/src/mccscudf.h        2023-07-05 11:17:53.000000000 
+0200
@@ -16,8 +16,8 @@
   abstract_solver * solution; // May be NULL with success == 1 for 
unsatisfiable problems
 } Solver_return;
 
-Solver_return call_mccs(Solver solver_arg, char *criteria_arg, int timeout, 
CUDFproblem* the_problem);
-Solver_return call_mccs(Solver solver_arg, char *criteria_arg, int timeout, 
CUDFproblem* the_problem, abstract_solver **solver);
+Solver_return call_mccs(Solver solver_arg, char *criteria_arg, int timeout, 
double mip_gap, CUDFproblem* the_problem);
+Solver_return call_mccs(Solver solver_arg, char *criteria_arg, int timeout, 
double mip_gap, CUDFproblem* the_problem, abstract_solver **solver);
 
 int has_backend(Solver_backend backend);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/new_criteria.cpp 
new/ocaml-mccs-1.1+16/src/new_criteria.cpp
--- old/ocaml-mccs-1.1+14/src/new_criteria.cpp  2022-05-17 15:55:52.000000000 
+0200
+++ new/ocaml-mccs-1.1+16/src/new_criteria.cpp  2023-07-05 11:17:53.000000000 
+0200
@@ -6,7 +6,7 @@
 /*******************************************************/
 
 
-#include <new_criteria.h>
+#include "new_criteria.h"
 
 // Criteria initialization
 void new_criteria::initialize(CUDFproblem *problem, abstract_solver *solver) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/new_criteria.h 
new/ocaml-mccs-1.1+16/src/new_criteria.h
--- old/ocaml-mccs-1.1+14/src/new_criteria.h    2022-05-17 15:55:52.000000000 
+0200
+++ new/ocaml-mccs-1.1+16/src/new_criteria.h    2023-07-05 11:17:53.000000000 
+0200
@@ -9,7 +9,7 @@
 #ifndef _NEW_CRITERIA_H_
 #define _NEW_CRITERIA_H_
 
-#include <abstract_criteria.h>
+#include "abstract_criteria.h"
 
 // A concrete class for the new criteria
 // i.e. number of virtual packages that were
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/notuptodate_criteria.cpp 
new/ocaml-mccs-1.1+16/src/notuptodate_criteria.cpp
--- old/ocaml-mccs-1.1+14/src/notuptodate_criteria.cpp  2022-05-17 
15:55:52.000000000 +0200
+++ new/ocaml-mccs-1.1+16/src/notuptodate_criteria.cpp  2023-07-05 
11:17:53.000000000 +0200
@@ -6,7 +6,7 @@
 /*******************************************************/
 
 
-#include <notuptodate_criteria.h>
+#include "notuptodate_criteria.h"
 
 
 // Implementation of the not up to date criteria
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/notuptodate_criteria.h 
new/ocaml-mccs-1.1+16/src/notuptodate_criteria.h
--- old/ocaml-mccs-1.1+14/src/notuptodate_criteria.h    2022-05-17 
15:55:52.000000000 +0200
+++ new/ocaml-mccs-1.1+16/src/notuptodate_criteria.h    2023-07-05 
11:17:53.000000000 +0200
@@ -9,7 +9,7 @@
 #ifndef _NOTUPTODATE_CRITERIA_H_
 #define _NOTUPTODATE_CRITERIA_H_
 
-#include <abstract_criteria.h>
+#include "abstract_criteria.h"
 
 // A concrete class for the notuptodate criteria
 // i.e. number of virtual packages that are not installed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/osi_solver.h 
new/ocaml-mccs-1.1+16/src/osi_solver.h
--- old/ocaml-mccs-1.1+14/src/osi_solver.h      2022-05-17 15:55:52.000000000 
+0200
+++ new/ocaml-mccs-1.1+16/src/osi_solver.h      2023-07-05 11:17:53.000000000 
+0200
@@ -12,7 +12,7 @@
 #ifndef _OSI_SOLVER_H
 #define _OSI_SOLVER_H
 
-#include <abstract_solver.h>
+#include "abstract_solver.h"
 #include <coin/OsiSolverInterface.hpp>
 #include <coin/CoinPackedVector.hpp>
 
@@ -21,8 +21,8 @@
 #else
 #include <unistd.h>
 #endif
-#include <math.h>
-#include <limits.h>
+#include <cmath>
+#include <climits>
 
 template<class OsiSolver>
 class osi_solver: public abstract_solver  {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/removed_criteria.cpp 
new/ocaml-mccs-1.1+16/src/removed_criteria.cpp
--- old/ocaml-mccs-1.1+14/src/removed_criteria.cpp      2022-05-17 
15:55:52.000000000 +0200
+++ new/ocaml-mccs-1.1+16/src/removed_criteria.cpp      2023-07-05 
11:17:53.000000000 +0200
@@ -6,8 +6,8 @@
 /*******************************************************/
 
 
-#include <removed_criteria.h>
-#include <constraint_generation.h>
+#include "removed_criteria.h"
+#include "constraint_generation.h"
 
 // Criteria initialization
 void removed_criteria::initialize(CUDFproblem *problem, abstract_solver 
*solver) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/removed_criteria.h 
new/ocaml-mccs-1.1+16/src/removed_criteria.h
--- old/ocaml-mccs-1.1+14/src/removed_criteria.h        2022-05-17 
15:55:52.000000000 +0200
+++ new/ocaml-mccs-1.1+16/src/removed_criteria.h        2023-07-05 
11:17:53.000000000 +0200
@@ -9,7 +9,7 @@
 #ifndef _REMOVED_CRITERIA_H_
 #define _REMOVED_CRITERIA_H_
 
-#include <abstract_criteria.h>
+#include "abstract_criteria.h"
 
 // A concrete criteria class for the removed criteria
 // i.e. number of virtual packages that were installed in the initial
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-mccs-1.1+14/src/scoeff_solver.h 
new/ocaml-mccs-1.1+16/src/scoeff_solver.h
--- old/ocaml-mccs-1.1+14/src/scoeff_solver.h   2022-05-17 15:55:52.000000000 
+0200
+++ new/ocaml-mccs-1.1+16/src/scoeff_solver.h   2023-07-05 11:17:53.000000000 
+0200
@@ -10,7 +10,7 @@
 #ifndef _SCOEFF_SOLVER_H
 #define _SCOEFF_SOLVER_H
 
-#include <cudf.h>
+#include "cudf.h"
 
 // Template to allow coefficient saving
 // mainly used to save objective coefficients

Reply via email to