├── AUTHORS.md ├── .travis.yml ├── orloge ├── constants.py ├── __init__.py ├── cbc.py ├── cpsat.py ├── gurobi.py ├── cplex.py └── base.py ├── .github └── workflows │ ├── pythonpackage.yml │ └── publish-to-test-pypi.yml ├── pyproject.toml ├── LICENSE.txt ├── tests ├── test_sublclass.py └── data │ ├── gurobi800-enlight14.out │ ├── gurobi700-enlight14.out │ ├── gurobi912-issue7.out │ ├── gurobi800-enlight13.out │ ├── cplex1280-fmpFP3.out │ ├── cplex1280-enlight14.out │ ├── cplex1271-enlight14.out │ ├── cplex1280-enlight13.out │ ├── cbc_0_objective.out │ ├── gurobi700-app1-2.out │ ├── gurobi800-tanglegram2.out │ ├── gurobi700-satellites1-25.out │ ├── gurobi800-satellites1-25.out │ ├── cplex1280-fmp-cutoff.out │ ├── cplex1280-fmpFP4.out │ ├── 93_01.txt │ ├── gurobi700-bab5.out │ ├── gurobi901-noCuts.out │ ├── cplex1271-app1-2.out │ ├── cplex1280-fmp_double_log.out │ ├── gurobi700-dfn-gwin-UUM.out │ ├── gurobi800-bab5.out │ ├── cplex1271-dfn-gwin-UUM.out │ ├── cplex1280-tanglegram2.out │ ├── cbc298-ash608gpia-3col.out │ └── trivial_cplex_300.out ├── .gitignore └── README.md /AUTHORS.md: -------------------------------------------------------------------------------- 1 | ### Authors ### 2 | 3 | Franco Peschiera, pchtsp@gmail.com 4 | 5 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | python: 3 | - "3.4" 4 | - "3.5" 5 | - "3.6" 6 | install: 7 | - pip install -r requirements.txt 8 | - python setup.py install 9 | # command to run tests 10 | script: python -m unittest tests.SolverTest 11 | -------------------------------------------------------------------------------- /orloge/constants.py: -------------------------------------------------------------------------------- 1 | LpStatusNotSolved = 0 2 | LpStatusSolved = 1 3 | LpStatusInfeasible = -1 4 | LpStatusUnbounded = -2 5 | LpStatusUndefined = -3 6 | LpStatusTimeLimit = -4 7 | LpStatusMemoryLimit = -5 8 | 9 | LpSolutionNoSolutionFound = 0 10 | LpSolutionOptimal = 1 11 | LpSolutionIntegerFeasible = 2 12 | LpSolutionInfeasible = -1 13 | LpSolutionUnbounded = -2 14 | 15 | solver_to_solution = { 16 | LpStatusNotSolved: LpSolutionNoSolutionFound, 17 | LpStatusSolved: LpSolutionOptimal, 18 | LpStatusInfeasible: LpSolutionInfeasible, 19 | LpStatusUnbounded: LpSolutionUnbounded, 20 | LpStatusUndefined: LpSolutionNoSolutionFound, 21 | LpStatusTimeLimit: LpSolutionNoSolutionFound, 22 | LpStatusMemoryLimit: LpSolutionNoSolutionFound, 23 | } 24 | -------------------------------------------------------------------------------- /orloge/__init__.py: -------------------------------------------------------------------------------- 1 | __all__ = ["LogFile", "CPLEX", "GUROBI", "CBC", "CPSAT"] 2 | 3 | from .cplex import CPLEX 4 | from .gurobi import GUROBI 5 | from .cbc import CBC 6 | from .cpsat import CPSAT 7 | from .base import LogFile 8 | 9 | __map = dict(CPLEX=CPLEX, GUROBI=GUROBI, CBC=CBC, CPSAT=CPSAT) 10 | 11 | 12 | def get_info_solver(path, solver, **options): 13 | my_solver = get_solver(solver) 14 | if my_solver is None: 15 | raise ValueError(f"solver {solver} is not recognized") 16 | log = my_solver(path, **options) 17 | return log.get_log_info() 18 | 19 | 20 | def get_solver(solver): 21 | my_solver = __map.get(solver) 22 | if my_solver is None: 23 | raise ValueError(f"solver {solver} is not recognized") 24 | return my_solver 25 | -------------------------------------------------------------------------------- /.github/workflows/pythonpackage.yml: -------------------------------------------------------------------------------- 1 | name: Python package 2 | 3 | on: [push] 4 | 5 | jobs: 6 | build: 7 | 8 | runs-on: ${{ matrix.os }} 9 | strategy: 10 | max-parallel: 21 11 | matrix: 12 | python-version: ["3.10", "3.11", "3.12"] 13 | os: [ubuntu-latest, windows-latest] 14 | 15 | steps: 16 | - uses: actions/checkout@v1 17 | - name: Set up Python ${{ matrix.python-version }} 18 | uses: actions/setup-python@v1 19 | with: 20 | python-version: ${{ matrix.python-version }} 21 | - name: Install uv and set the python version 22 | uses: astral-sh/setup-uv@v5 23 | with: 24 | python-version: ${{ matrix.python-version }} 25 | - name: Test 26 | run: uv run python -m unittest discover -s tests 27 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "orloge" 3 | version = "0.18.3" 4 | description = "OR log extractor" 5 | requires-python = ">=3.10" 6 | dependencies = ["pandas", "cpsat-logutils"] 7 | authors= [{name= "Franco Peschiera", email= "pchtsp@gmail.com"}] 8 | maintainers= [{name= "Franco Peschiera", email= "pchtsp@gmail.com"}] 9 | readme='README.md' 10 | keywords= ["Mathematical", "Optimization", "solver", "log", "parser"] 11 | classifiers= [ 12 | "Programming Language :: Python", 13 | "Topic :: Software Development", 14 | "Topic :: Software Development :: Libraries", 15 | "Topic :: Software Development :: Libraries :: Python Modules", 16 | ] 17 | urls= {source= "https://github.com/pchtsp/orloge", download="https://github.com/pchtsp/orloge/archive/master.zip"} 18 | 19 | [build-system] 20 | requires = ["setuptools"] 21 | build-backend = "setuptools.build_meta" 22 | 23 | [tool.setuptools] 24 | # This is a workaround for https://github.com/astral-sh/uv/issues/9513 25 | license-files = [] 26 | 27 | [dependency-groups] 28 | dev = ["black"] -------------------------------------------------------------------------------- /.github/workflows/publish-to-test-pypi.yml: -------------------------------------------------------------------------------- 1 | name: Publish Python 🐍 distributions 📦 to PyPI 2 | 3 | on: push 4 | 5 | jobs: 6 | build-n-publish: 7 | name: Build and publish Python 🐍 distributions 📦 to PyPI 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@master 11 | - name: Set up Python 3.12 12 | uses: actions/setup-python@v1 13 | with: 14 | python-version: 3.12 15 | - name: Install uv and set the python version 16 | uses: astral-sh/setup-uv@v5 17 | with: 18 | python-version: 3.12 19 | - name: Build a distribution 20 | run: uv build 21 | - name: Publish distribution 📦 to Test PyPI 22 | if: startsWith(github.event.ref, 'refs/tags') 23 | uses: pypa/gh-action-pypi-publish@master 24 | with: 25 | password: ${{ secrets.test_pypi_password }} 26 | repository_url: https://test.pypi.org/legacy/ 27 | - name: Publish distribution 📦 to PyPI 28 | if: startsWith(github.event.ref, 'refs/tags') 29 | uses: pypa/gh-action-pypi-publish@master 30 | with: 31 | password: ${{ secrets.pypi_password }} 32 | 33 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2019 Franco Peschiera 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /tests/test_sublclass.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | import os 3 | import sys 4 | 5 | sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) 6 | 7 | import orloge as ol 8 | 9 | DATADIR = os.path.join(os.path.dirname(__file__), "data") 10 | ALMOST_KEYS = ["best_solution", "best_bound"] 11 | 12 | 13 | class SolverTest(unittest.TestCase): 14 | def test_new_log(self): 15 | class MyLog(ol.LogFile): 16 | def __init__(self, path, **options): 17 | super().__init__(path, **options) 18 | self.name = "my_solver" 19 | 20 | def get_stats(self): 21 | # get status, objective, bound, gap_rel 22 | return None, None, None, None 23 | 24 | def get_status_codes(self, status, objective): 25 | # get status codes of the solver and solution 26 | return None, None 27 | 28 | def get_version(self): 29 | # implement some logic to parse the version 30 | return "" 31 | 32 | def get_progress(self): 33 | # implement some logic to parse the progress and return a pandas DataFrame 34 | import pandas as pd 35 | 36 | return pd.DataFrame() 37 | 38 | my_log = MyLog(path=None, content="PATH_TO_MY_LOG_FILE") 39 | my_log.get_log_info() 40 | 41 | 42 | if __name__ == "__main__": 43 | unittest.main() 44 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | .idea/ 6 | 7 | # C extensions 8 | *.so 9 | 10 | # Distribution / packaging 11 | .Python 12 | env/ 13 | build/ 14 | develop-eggs/ 15 | dist/ 16 | downloads/ 17 | eggs/ 18 | .eggs/ 19 | lib/ 20 | lib64/ 21 | parts/ 22 | sdist/ 23 | var/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | 28 | # Eclipse 29 | .project 30 | .settings/ 31 | 32 | # PyInstaller 33 | # Usually these files are written by a python script from a template 34 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 35 | *.manifest 36 | *.spec 37 | 38 | # Installer logs 39 | pip-log.txt 40 | pip-delete-this-directory.txt 41 | 42 | # Unit test / coverage reports 43 | htmlcov/ 44 | .tox/ 45 | .coverage 46 | .coverage.* 47 | .cache 48 | nosetests.xml 49 | coverage.xml 50 | *,cover 51 | .hypothesis/ 52 | 53 | # Translations 54 | *.mo 55 | *.pot 56 | 57 | # Django stuff: 58 | *.log 59 | local_settings.py 60 | 61 | # Flask stuff: 62 | instance/ 63 | .webassets-cache 64 | 65 | # Scrapy stuff: 66 | .scrapy 67 | 68 | # Sphinx documentation 69 | docs/_build/ 70 | 71 | # PyBuilder 72 | target/ 73 | 74 | # IPython Notebook 75 | .ipynb_checkpoints 76 | 77 | # pyenv 78 | .python-version 79 | 80 | # celery beat schedule file 81 | celerybeat-schedule 82 | 83 | # dotenv 84 | .env 85 | 86 | # virtualenv 87 | *venv*/ 88 | ENV/ 89 | 90 | # Spyder project settings 91 | .spyderproject 92 | 93 | # Rope project settings 94 | .ropeproject 95 | 96 | .pydevproject 97 | -------------------------------------------------------------------------------- /tests/data/gurobi800-enlight14.out: -------------------------------------------------------------------------------- 1 | @01 instances/benchmark/enlight14.mps =========== 2 | ----------------------------- 3 | Wed Apr 25 14:31:39 MST 2018 4 | ----------------------------- 5 | @03 1524691899 6 | /home/beck/miplib2010-1.1.0/results/solutions/benchmark.gurobi.enlight14.mps.sol 7 | Set parameter TimeLimit to value 7200 8 | Set parameter MIPGap to value 0.0 9 | Set parameter Threads to value 1 10 | 11 | Gurobi Optimizer version 8.0.0 build v8.0.0rc0 (linux64) 12 | Copyright (c) 2018, Gurobi Optimization, LLC 13 | 14 | Read MPS format model from file instances/benchmark/enlight14.mps 15 | Reading time = 0.00 seconds 16 | enlight14: 196 rows, 392 columns, 1120 nonzeros 17 | Optimize a model with 196 rows, 392 columns and 1120 nonzeros 18 | Variable types: 0 continuous, 392 integer (0 binary) 19 | Coefficient statistics: 20 | Matrix range [1e+00, 2e+00] 21 | Objective range [1e+00, 1e+00] 22 | Bounds range [1e+00, 1e+00] 23 | RHS range [1e+00, 1e+00] 24 | Presolve removed 0 rows and 1 columns 25 | Presolve time: 0.00s 26 | 27 | Explored 0 nodes (0 simplex iterations) in 0.00 seconds 28 | Thread count was 1 (of 8 available processors) 29 | 30 | Solution count 0 31 | 32 | Model is infeasible 33 | Best objective -, best bound -, gap - 34 | 35 | Unable to retrieve attribute 'X' 36 | 37 | 38 | @04 1524691899 39 | @05 7200 40 | 41 | Read MPS: 1 42 | MIP has 392 vars and 196 constraints 43 | Read SOL: 0 44 | 45 | ----------------------------- 46 | Wed Apr 25 14:31:39 MST 2018 47 | ----------------------------- 48 | 49 | =ready= 50 | -------------------------------------------------------------------------------- /tests/data/gurobi700-enlight14.out: -------------------------------------------------------------------------------- 1 | @01 instances/miplib2010/enlight14.mps.gz =========== 2 | ----------------------------- 3 | Tue Oct 25 17:39:45 MST 2016 4 | ----------------------------- 5 | @03 1477442385 6 | /home/beck/miplib2010-1.1.0/results/solutions/benchmark.gurobi.enlight14.mps.sol 7 | Set parameter TimeLimit to value 7200 8 | Set parameter MIPGap to value 0.0 9 | Set parameter Threads to value 1 10 | 11 | Gurobi Optimizer version 7.0.0 build v7.0.0rc3 (linux64) 12 | Copyright (c) 2016, Gurobi Optimization, Inc. 13 | 14 | Read MPS format model from file instances/miplib2010/enlight14.mps.gz 15 | Reading time = 0.00 seconds 16 | enlight14: 196 rows, 392 columns, 1120 nonzeros 17 | Optimize a model with 196 rows, 392 columns and 1120 nonzeros 18 | Variable types: 0 continuous, 392 integer (0 binary) 19 | Coefficient statistics: 20 | Matrix range [1e+00, 2e+00] 21 | Objective range [1e+00, 1e+00] 22 | Bounds range [1e+00, 1e+00] 23 | RHS range [1e+00, 1e+00] 24 | Presolve removed 0 rows and 1 columns 25 | Presolve time: 0.00s 26 | 27 | Explored 0 nodes (0 simplex iterations) in 0.00 seconds 28 | Thread count was 1 (of 8 available processors) 29 | 30 | Solution count 0 31 | Pool objective bound 1e+100 32 | 33 | Model is infeasible 34 | Best objective -, best bound -, gap - 35 | 36 | Unable to retrieve attribute 'X' 37 | 38 | 39 | @04 1477442385 40 | @05 7200 41 | 42 | Read MPS: 1 43 | MIP has 392 vars and 196 constraints 44 | Read SOL: 0 45 | 46 | ----------------------------- 47 | Tue Oct 25 17:39:45 MST 2016 48 | ----------------------------- 49 | 50 | =ready= 51 | -------------------------------------------------------------------------------- /tests/data/gurobi912-issue7.out: -------------------------------------------------------------------------------- 1 | Gurobi 9.1.2 (linux64, gurobi_cl) logging started Tue Sep 7 13:55:23 2021 2 | 3 | Academic license - for non-commercial use only - expires 2021-11-05 4 | Using license file /home/vepain/gurobi.lic 5 | Set parameter LogFile to value tests/longest_path/solver_gurobi_gat.log 6 | 7 | Gurobi Optimizer version 9.1.2 build v9.1.2rc0 (linux64) 8 | Copyright (c) 2021, Gurobi Optimization, LLC 9 | 10 | Read LP format model from file /tmp/037e4e7ce19f41e68947cd514fd009ba-pulp.lp 11 | Reading time = 0.01 seconds 12 | OBJ: 3939 rows, 2656 columns, 9894 nonzeros 13 | Thread count: 4 physical cores, 8 logical processors, using up to 8 threads 14 | Optimize a model with 3939 rows, 2656 columns and 9894 nonzeros 15 | Model fingerprint: 0xa3b7c9e3 16 | Variable types: 816 continuous, 1840 integer (1326 binary) 17 | Coefficient statistics: 18 | Matrix range [1e+00, 2e+06] 19 | Objective range [1e+00, 1e+00] 20 | Bounds range [1e+00, 2e+06] 21 | RHS range [1e+00, 5e+03] 22 | Presolve removed 1741 rows and 1255 columns 23 | Presolve time: 0.05s 24 | Presolved: 2198 rows, 1401 columns, 6851 nonzeros 25 | Variable types: 519 continuous, 882 integer (492 binary) 26 | Found heuristic solution: objective 858381.00000 27 | 28 | Root relaxation: cutoff, 1702 iterations, 0.06 seconds 29 | 30 | Nodes | Current Node | Objective Bounds | Work 31 | Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time 32 | 33 | 0 0 cutoff 0 858381.000 858381.000 0.00% - 0s 34 | 35 | Explored 0 nodes (1702 simplex iterations) in 0.12 seconds 36 | Thread count was 8 (of 8 available processors) 37 | 38 | Solution count 1: 858381 39 | 40 | Optimal solution found (tolerance 1.00e-04) 41 | Warning: max constraint violation (1.1887e-06) exceeds tolerance 42 | Best objective 8.583810000000e+05, best bound 8.583810000000e+05, gap 0.0000% 43 | 44 | Wrote result file '/tmp/037e4e7ce19f41e68947cd514fd009ba-pulp.sol' -------------------------------------------------------------------------------- /tests/data/gurobi800-enlight13.out: -------------------------------------------------------------------------------- 1 | @01 instances/benchmark/enlight13.mps =========== 2 | ----------------------------- 3 | Wed Apr 25 14:31:39 MST 2018 4 | ----------------------------- 5 | @03 1524691899 6 | /home/beck/miplib2010-1.1.0/results/solutions/benchmark.gurobi.enlight13.mps.sol 7 | Set parameter TimeLimit to value 7200 8 | Set parameter MIPGap to value 0.0 9 | Set parameter Threads to value 1 10 | 11 | Gurobi Optimizer version 8.0.0 build v8.0.0rc0 (linux64) 12 | Copyright (c) 2018, Gurobi Optimization, LLC 13 | 14 | Read MPS format model from file instances/benchmark/enlight13.mps 15 | Reading time = 0.00 seconds 16 | enlight13: 169 rows, 338 columns, 962 nonzeros 17 | Optimize a model with 169 rows, 338 columns and 962 nonzeros 18 | Variable types: 0 continuous, 338 integer (0 binary) 19 | Coefficient statistics: 20 | Matrix range [1e+00, 2e+00] 21 | Objective range [1e+00, 1e+00] 22 | Bounds range [1e+00, 1e+00] 23 | RHS range [1e+00, 1e+00] 24 | Presolve removed 169 rows and 338 columns 25 | Presolve time: 0.00s 26 | Presolve: All rows and columns removed 27 | 28 | Explored 0 nodes (0 simplex iterations) in 0.00 seconds 29 | Thread count was 1 (of 8 available processors) 30 | 31 | Solution count 1: 71 32 | 33 | Optimal solution found (tolerance 0.00e+00) 34 | Best objective 7.100000000000e+01, best bound 7.100000000000e+01, gap 0.0000% 35 | 36 | Wrote result file '/home/beck/miplib2010-1.1.0/results/solutions/benchmark.gurobi.enlight13.mps.sol' 37 | 38 | 39 | @04 1524691899 40 | @05 7200 41 | 42 | Read MPS: 1 43 | MIP has 338 vars and 169 constraints 44 | Read SOL: 1 45 | Objective value computed by solver: 71 46 | 47 | Integrality tolerance: 1/10000 48 | Linear tolerance: 1/10000 49 | Objective tolerance: 1/10000 50 | 51 | Check SOL: Integrality 1 Constraints 1 Objective 1 52 | Maximum violations: Integrality 0 Constraints 0 Objective 0 53 | 54 | ----------------------------- 55 | Wed Apr 25 14:31:39 MST 2018 56 | ----------------------------- 57 | 58 | =ready= 59 | -------------------------------------------------------------------------------- /tests/data/cplex1280-fmpFP3.out: -------------------------------------------------------------------------------- 1 | 2 | Log started (V12.8.0.0) Sun Nov 25 22:00:03 2018 3 | 4 | New value for time limit in seconds: 3600 5 | New value for mixed integer optimality gap tolerance: 0 6 | New value for upper limit on size of tree in megabytes: 64413.2 7 | CPXPARAM_TimeLimit 3600 8 | CPXPARAM_MIP_Tolerances_MIPGap 0 9 | CPXPARAM_MIP_Limits_TreeMemory 64413.1875 10 | Row '_C41516' implies binary variable 'start_M_('6',_'2018_01')' is negative. 11 | Presolve time = 0.16 sec. (147.80 ticks) 12 | 13 | Root node processing (before b&c): 14 | Real time = 0.17 sec. (152.97 ticks) 15 | Parallel b&c, 12 threads: 16 | Real time = 0.00 sec. (0.00 ticks) 17 | Sync time (average) = 0.00 sec. 18 | Wait time (average) = 0.00 sec. 19 | ------------ 20 | Total (root+branch&cut) = 0.17 sec. (152.97 ticks) 21 | 22 | 23 | MIP - Integer infeasible. 24 | Current MIP best bound = 0.0000000000e+00 (gap is infinite) 25 | Solution time = 0.17 sec. Iterations = 0 Nodes = 0 26 | Deterministic time = 152.99 ticks (887.62 ticks/sec) 27 | 28 | CPLEX Error 1217: No solution exists. 29 | No changes made. 30 | CPXPARAM_TimeLimit 3600 31 | CPXPARAM_MIP_Tolerances_MIPGap 0 32 | CPXPARAM_MIP_Limits_TreeMemory 64413.1875 33 | 34 | Root node processing (before b&c): 35 | Real time = 0.00 sec. (0.00 ticks) 36 | Parallel b&c, 12 threads: 37 | Real time = 0.00 sec. (0.00 ticks) 38 | Sync time (average) = 0.00 sec. 39 | Wait time (average) = 0.00 sec. 40 | ------------ 41 | Total (root+branch&cut) = 0.00 sec. (0.00 ticks) 42 | 43 | 44 | MIP - Integer infeasible. 45 | Current MIP best bound = 0.0000000000e+00 (gap is infinite) 46 | Solution time = 0.00 sec. Iterations = 0 Nodes = 0 47 | Deterministic time = 0.00 ticks (0.53 ticks/sec) 48 | 49 | 50 | CPLEX Error 1217: No solution exists. 51 | No file written. 52 | -------------------------------------------------------------------------------- /tests/data/cplex1280-enlight14.out: -------------------------------------------------------------------------------- 1 | @01 instances/miplib2010/enlight14.mps.gz =========== 2 | ----------------------------- 3 | Mon Nov 13 10:29:11 MST 2017 4 | ----------------------------- 5 | @03 1510594151 6 | 7 | Welcome to IBM(R) ILOG(R) CPLEX(R) Interactive Optimizer 12.8.0.0 8 | with Simplex, Mixed Integer & Barrier Optimizers 9 | 5725-A06 5725-A29 5724-Y48 5724-Y49 5724-Y54 5724-Y55 5655-Y21 10 | Copyright IBM Corp. 1988, 2017. All Rights Reserved. 11 | 12 | Type 'help' for a list of available commands. 13 | Type 'help' followed by a command name for more 14 | information on commands. 15 | 16 | CPLEX> CPLEX> Logfile 'cplex.log' closed. 17 | CPLEX> New value for default parallel thread count: 1 18 | CPLEX> New value for mixed integer optimality gap tolerance: 0 19 | CPLEX> New value for type of clock used to measure time: 2 20 | CPLEX> New value for time limit in seconds: 7200 21 | CPLEX> New value for parallel optimization mode: 1 22 | CPLEX> Selected objective sense: MINIMIZE 23 | Selected objective name: moves 24 | Selected RHS name: rhs 25 | Selected bound name: bnd 26 | Problem 'instances/miplib2010/enlight14.mps.gz' read. 27 | Read time = 0.00 sec. (0.14 ticks) 28 | CPLEX> Problem is a minimization problem. 29 | New sense ['max' or 'min']: No changes made. 30 | CPLEX> CPXPARAM_TimeLimit 7200 31 | CPXPARAM_Threads 1 32 | CPXPARAM_Parallel 1 33 | CPXPARAM_MIP_Tolerances_MIPGap 0 34 | Tried aggregator 1 time. 35 | Reduced MIP has 196 rows, 392 columns, and 1120 nonzeros. 36 | Reduced MIP has 199 binaries, 193 generals, 0 SOSs, and 0 indicators. 37 | Presolve time = 0.00 sec. (0.57 ticks) 38 | Probing time = 0.00 sec. (0.18 ticks) 39 | Tried aggregator 1 time. 40 | Reduced MIP has 196 rows, 392 columns, and 1120 nonzeros. 41 | Reduced MIP has 199 binaries, 193 generals, 0 SOSs, and 0 indicators. 42 | Presolve time = 0.00 sec. (0.83 ticks) 43 | 44 | Nodes Cuts/ 45 | Node Left Objective IInf Best Integer Best Bound ItCnt Gap 46 | 47 | 0 1 -1.00000e+37 0 0.0000 0 48 | 49 | Root node processing (before b&c): 50 | Real time = 0.00 sec. (3.44 ticks) 51 | Sequential b&c: 52 | Real time = 0.00 sec. (0.00 ticks) 53 | ------------ 54 | Total (root+branch&cut) = 0.00 sec. (3.44 ticks) 55 | 56 | 57 | MIP - Integer infeasible. 58 | Current MIP best bound is infinite. 59 | Solution time = 0.00 sec. Iterations = 0 Nodes = 0 (1) 60 | Deterministic time = 3.44 ticks (726.40 ticks/sec) 61 | 62 | CPLEX> CPLEX Error 1217: No solution exists. 63 | No file written. 64 | CPLEX> Logfile '/home/beck/miplib2010-1.1.0/results/solutions/benchmark.cplex.enlight14.mps.sol' open. 65 | CPLEX> MIP - Integer infeasible. 66 | CPLEX> Logfile '/home/beck/miplib2010-1.1.0/results/solutions/benchmark.cplex.enlight14.mps.sol' closed. 67 | CPLEX> 68 | @04 1510594151 69 | @05 7200 70 | 71 | Read MPS: 1 72 | MIP has 392 vars and 196 constraints 73 | Read SOL: 0 74 | 75 | ----------------------------- 76 | Mon Nov 13 10:29:11 MST 2017 77 | ----------------------------- 78 | 79 | =ready= 80 | -------------------------------------------------------------------------------- /tests/data/cplex1271-enlight14.out: -------------------------------------------------------------------------------- 1 | @01 instances/miplib2010/enlight14.mps.gz =========== 2 | ----------------------------- 3 | Mon Apr 3 18:22:08 MST 2017 4 | ----------------------------- 5 | @03 1491268928 6 | 7 | Welcome to IBM(R) ILOG(R) CPLEX(R) Interactive Optimizer 12.7.1.0 8 | with Simplex, Mixed Integer & Barrier Optimizers 9 | 5725-A06 5725-A29 5724-Y48 5724-Y49 5724-Y54 5724-Y55 5655-Y21 10 | Copyright IBM Corp. 1988, 2017. All Rights Reserved. 11 | 12 | Type 'help' for a list of available commands. 13 | Type 'help' followed by a command name for more 14 | information on commands. 15 | 16 | CPLEX> CPLEX> Logfile 'cplex.log' closed. 17 | CPLEX> New value for default parallel thread count: 1 18 | CPLEX> New value for mixed integer optimality gap tolerance: 0 19 | CPLEX> New value for type of clock used to measure time: 2 20 | CPLEX> New value for time limit in seconds: 7200 21 | CPLEX> New value for parallel optimization mode: 1 22 | CPLEX> Selected objective sense: MINIMIZE 23 | Selected objective name: moves 24 | Selected RHS name: rhs 25 | Selected bound name: bnd 26 | Problem 'instances/miplib2010/enlight14.mps.gz' read. 27 | Read time = 0.02 sec. (0.14 ticks) 28 | CPLEX> Problem is a minimization problem. 29 | New sense ['max' or 'min']: No changes made. 30 | CPLEX> CPXPARAM_TimeLimit 7200 31 | CPXPARAM_Threads 1 32 | CPXPARAM_Parallel 1 33 | CPXPARAM_Read_APIEncoding "UTF-8" 34 | CPXPARAM_MIP_Tolerances_MIPGap 0 35 | Tried aggregator 1 time. 36 | Reduced MIP has 196 rows, 392 columns, and 1120 nonzeros. 37 | Reduced MIP has 199 binaries, 193 generals, 0 SOSs, and 0 indicators. 38 | Presolve time = 0.00 sec. (0.54 ticks) 39 | Probing time = 0.00 sec. (0.18 ticks) 40 | Tried aggregator 1 time. 41 | Reduced MIP has 196 rows, 392 columns, and 1120 nonzeros. 42 | Reduced MIP has 199 binaries, 193 generals, 0 SOSs, and 0 indicators. 43 | Presolve time = 0.00 sec. (0.81 ticks) 44 | 45 | Nodes Cuts/ 46 | Node Left Objective IInf Best Integer Best Bound ItCnt Gap 47 | 48 | 0 1 -1.00000e+37 0 0.0000 0 49 | 50 | Root node processing (before b&c): 51 | Real time = 0.00 sec. (3.33 ticks) 52 | Sequential b&c: 53 | Real time = 0.00 sec. (0.00 ticks) 54 | ------------ 55 | Total (root+branch&cut) = 0.00 sec. (3.33 ticks) 56 | 57 | 58 | MIP - Integer infeasible. 59 | Current MIP best bound is infinite. 60 | Solution time = 0.00 sec. Iterations = 0 Nodes = 0 (1) 61 | Deterministic time = 3.33 ticks (738.34 ticks/sec) 62 | 63 | CPLEX> CPLEX Error 1217: No solution exists. 64 | No file written. 65 | CPLEX> Logfile '/home/beck/miplib2010-1.1.0/results/solutions/benchmark.cplex.enlight14.mps.sol' open. 66 | CPLEX> MIP - Integer infeasible. 67 | CPLEX> Logfile '/home/beck/miplib2010-1.1.0/results/solutions/benchmark.cplex.enlight14.mps.sol' closed. 68 | CPLEX> 69 | @04 1491268928 70 | @05 7200 71 | 72 | Read MPS: 1 73 | MIP has 392 vars and 196 constraints 74 | Read SOL: 0 75 | 76 | ----------------------------- 77 | Mon Apr 3 18:22:08 MST 2017 78 | ----------------------------- 79 | 80 | =ready= 81 | -------------------------------------------------------------------------------- /tests/data/cplex1280-enlight13.out: -------------------------------------------------------------------------------- 1 | /01 instances/miplib2010/enlight13.mps.gz =========== 2 | ----------------------------- 3 | Mon Nov 13 10:29:11 MST 2017 4 | ----------------------------- 5 | @03 1510594151 6 | 7 | Welcome to IBM(R) ILOG(R) CPLEX(R) Interactive Optimizer 12.8.0.0 8 | with Simplex, Mixed Integer & Barrier Optimizers 9 | 5725-A06 5725-A29 5724-Y48 5724-Y49 5724-Y54 5724-Y55 5655-Y21 10 | Copyright IBM Corp. 1988, 2017. All Rights Reserved. 11 | 12 | Type 'help' for a list of available commands. 13 | Type 'help' followed by a command name for more 14 | information on commands. 15 | 16 | CPLEX> CPLEX> Logfile 'cplex.log' closed. 17 | CPLEX> New value for default parallel thread count: 1 18 | CPLEX> New value for mixed integer optimality gap tolerance: 0 19 | CPLEX> New value for type of clock used to measure time: 2 20 | CPLEX> New value for time limit in seconds: 7200 21 | CPLEX> New value for parallel optimization mode: 1 22 | CPLEX> Selected objective sense: MINIMIZE 23 | Selected objective name: moves 24 | Selected RHS name: rhs 25 | Selected bound name: bnd 26 | Problem 'instances/miplib2010/enlight13.mps.gz' read. 27 | Read time = 0.00 sec. (0.12 ticks) 28 | CPLEX> Problem is a minimization problem. 29 | New sense ['max' or 'min']: No changes made. 30 | CPLEX> CPXPARAM_TimeLimit 7200 31 | CPXPARAM_Threads 1 32 | CPXPARAM_Parallel 1 33 | CPXPARAM_MIP_Tolerances_MIPGap 0 34 | Tried aggregator 1 time. 35 | Reduced MIP has 169 rows, 338 columns, and 962 nonzeros. 36 | Reduced MIP has 172 binaries, 166 generals, 0 SOSs, and 0 indicators. 37 | Presolve time = 0.00 sec. (0.49 ticks) 38 | Probing time = 0.00 sec. (0.16 ticks) 39 | Tried aggregator 1 time. 40 | Reduced MIP has 169 rows, 338 columns, and 962 nonzeros. 41 | Reduced MIP has 172 binaries, 166 generals, 0 SOSs, and 0 indicators. 42 | Presolve time = 0.00 sec. (0.73 ticks) 43 | Probing fixed 3 vars, tightened 0 bounds. 44 | Probing time = 0.00 sec. (0.01 ticks) 45 | Clique table members: 6. 46 | MIP emphasis: balance optimality and feasibility. 47 | MIP search method: dynamic search. 48 | Parallel mode: none, using 1 thread. 49 | Root relaxation solution time = 0.00 sec. (0.13 ticks) 50 | 51 | Nodes Cuts/ 52 | Node Left Objective IInf Best Integer Best Bound ItCnt Gap 53 | 54 | * 0 0 integral 0 71.0000 71.0000 0 0.00% 55 | Elapsed time = 0.00 sec. (3.24 ticks, tree = 0.00 MB, solutions = 1) 56 | 57 | Root node processing (before b&c): 58 | Real time = 0.00 sec. (3.25 ticks) 59 | Sequential b&c: 60 | Real time = 0.00 sec. (0.00 ticks) 61 | ------------ 62 | Total (root+branch&cut) = 0.00 sec. (3.25 ticks) 63 | 64 | Solution pool: 1 solution saved. 65 | 66 | MIP - Integer optimal solution: Objective = 7.1000000000e+01 67 | Solution time = 0.00 sec. Iterations = 0 Nodes = 0 68 | Deterministic time = 3.25 ticks (715.16 ticks/sec) 69 | 70 | CPLEX> Incumbent solution written to file '/home/beck/miplib2010-1.1.0/results/solutions/benchmark.cplex.enlight13.mps.sol.sol'. 71 | CPLEX> Logfile '/home/beck/miplib2010-1.1.0/results/solutions/benchmark.cplex.enlight13.mps.sol' open. 72 | CPLEX> MIP - Integer optimal solution: Objective = 7.1000000000e+01 73 | CPLEX> Logfile '/home/beck/miplib2010-1.1.0/results/solutions/benchmark.cplex.enlight13.mps.sol' closed. 74 | CPLEX> 75 | @04 1510594151 76 | @05 7200 77 | 78 | Read MPS: 1 79 | MIP has 338 vars and 169 constraints 80 | Read SOL: 1 81 | Objective value computed by solver: 71 82 | 83 | Integrality tolerance: 1/10000 84 | Linear tolerance: 1/10000 85 | Objective tolerance: 1/10000 86 | 87 | Check SOL: Integrality 1 Constraints 1 Objective 1 88 | Maximum violations: Integrality 0 Constraints 0 Objective 0 89 | 90 | ----------------------------- 91 | Mon Nov 13 10:29:11 MST 2017 92 | ----------------------------- 93 | 94 | =ready= 95 | -------------------------------------------------------------------------------- /orloge/cbc.py: -------------------------------------------------------------------------------- 1 | from .base import LogFile 2 | from .constants import ( 3 | LpStatusMemoryLimit, 4 | LpStatusSolved, 5 | LpStatusInfeasible, 6 | LpStatusTimeLimit, 7 | LpStatusUnbounded, 8 | LpStatusNotSolved, 9 | ) 10 | import re 11 | 12 | 13 | class CBC(LogFile): 14 | def __init__(self, path, **options): 15 | super().__init__(path, **options) 16 | self.name = "CBC" 17 | self.solver_status_map = { 18 | "Optimal solution found": LpStatusSolved, 19 | "Problem is infeasible": LpStatusInfeasible, 20 | "Stopped on time limit": LpStatusTimeLimit, 21 | "Problem proven infeasible": LpStatusInfeasible, 22 | "Problem is unbounded": LpStatusUnbounded, 23 | "Pre-processing says infeasible or unbounded": LpStatusInfeasible, 24 | "** Current model not valid": LpStatusNotSolved, 25 | } 26 | self.version_regex = r"Version: (\S+)" 27 | self.progress_names = [ 28 | "Node", 29 | "NodesLeft", 30 | "BestInteger", 31 | "CutsBestBound", 32 | "Time", 33 | ] 34 | self.progress_filter = r"(^Cbc0010I.*$)" 35 | 36 | def get_cuts(self): 37 | # TODO 38 | pass 39 | 40 | def get_matrix(self): 41 | regex = r"Problem .+ has {0} rows, {0} columns and {0} elements".format( 42 | self.numberSearch 43 | ) 44 | return self.apply_regex(regex, content_type="int") 45 | 46 | def get_matrix_post(self): 47 | regex = ( 48 | r"Cgl0004I processed model has {0} rows, {0} columns \(\d+ integer " 49 | r"\(\d+ of which binary\)\) and {0} elements".format(self.numberSearch) 50 | ) 51 | return self.apply_regex(regex, content_type="int") 52 | 53 | def get_stats(self): 54 | 55 | regex = "Result - {}".format(self.wordSearch) 56 | status = self.apply_regex(regex, pos=0) 57 | if status is None: 58 | # no solution found, I still want the status 59 | for k in self.solver_status_map.keys(): 60 | if self.apply_regex(re.escape(k)): 61 | return k, None, None, None 62 | else: 63 | status = status.strip() 64 | regex = r"best objective {0}( \(best possible {0}\))?, took {1} iterations and {1} nodes \({1} seconds\)".format( 65 | self.numberSearch, self.number 66 | ) 67 | solution = self.apply_regex(regex) 68 | 69 | if solution is None: 70 | return None, None, None, None 71 | 72 | # if solution[0] == '1e+050': 73 | if self.apply_regex("No feasible solution found"): 74 | objective = None 75 | else: 76 | objective = float(solution[0]) 77 | 78 | if solution[2] is None or solution[2] == "": 79 | bound = objective 80 | else: 81 | bound = float(solution[2]) 82 | 83 | gap_rel = None 84 | if objective is not None and objective != 0: 85 | gap_rel = abs(objective - bound) / abs(objective) * 100 86 | 87 | return status, objective, bound, gap_rel 88 | 89 | def get_cuts_time(self): 90 | # TODO 91 | return None 92 | 93 | def get_lp_presolve(self): 94 | # TODO 95 | return None 96 | 97 | def get_time(self): 98 | regex = r"Total time \(CPU seconds\):\s*{}".format(self.numberSearch) 99 | stats = self.apply_regex(regex, content_type="float", pos=0) 100 | return stats 101 | 102 | def get_nodes(self): 103 | regex = r"Enumerated nodes:\s*{}".format(self.numberSearch) 104 | return self.apply_regex(regex, content_type="int", pos=0) 105 | 106 | def get_root_time(self): 107 | # TODO 108 | return None 109 | 110 | def process_line(self, line): 111 | 112 | keys = ["n", "n_left", "b_int", "b_bound", "time"] 113 | args = {k: self.numberSearch for k in keys} 114 | find = re.search( 115 | r"Cbc0010I After {n} nodes, {n_left} on tree, {b_int} best solution, " 116 | r"best possible {b_bound} \({time} seconds\)".format(**args), 117 | line, 118 | ) 119 | if not find: 120 | return None 121 | return find.groups() 122 | -------------------------------------------------------------------------------- /tests/data/cbc_0_objective.out: -------------------------------------------------------------------------------- 1 | Welcome to the CBC MILP Solver 2 | Version: 2.9.0 3 | Build Date: Feb 12 2015 4 | 5 | command line - C:\Users\ebongo\AppData\Local\Programs\Python\Python38\lib\site-packages\pulp\apis\..\solverdir\cbc\win\64\cbc.exe C:\Users\ebongo\AppData\Local\Temp\79eea847f35942099a1e9be8e0ef60e9-pulp.mps sec 60 ratio 0.01 allow None threads None presolve on strong None gomory on knapsack on probing on branch printingOptions all solution C:\Users\ebongo\AppData\Local\Temp\79eea847f35942099a1e9be8e0ef60e9-pulp.sol (default strategy 1) 6 | At line 2 NAME MODEL 7 | At line 3 ROWS 8 | At line 991 COLUMNS 9 | At line 7820 RHS 10 | At line 8807 BOUNDS 11 | At line 9602 ENDATA 12 | Problem MODEL has 986 rows, 963 columns and 4553 elements 13 | Coin0008I MODEL read with 0 errors 14 | seconds was changed from 1e+100 to 60 15 | ratioGap was changed from 0 to 0.01 16 | String of None is illegal for double parameter allowableGap value remains 0 17 | String of None is illegal for integer parameter threads value remains 0 18 | String of None is illegal for integer parameter strongBranching value remains 5 19 | Option for gomoryCuts changed from ifmove to on 20 | Option for knapsackCuts changed from ifmove to on 21 | Continuous objective value is 0 - 0.00 seconds 22 | Cgl0002I 33 variables fixed 23 | Cgl0003I 10 fixed, 143 tightened bounds, 165 strengthened rows, 0 substitutions 24 | Cgl0003I 0 fixed, 36 tightened bounds, 154 strengthened rows, 0 substitutions 25 | Cgl0003I 0 fixed, 8 tightened bounds, 96 strengthened rows, 0 substitutions 26 | Cgl0003I 0 fixed, 2 tightened bounds, 61 strengthened rows, 0 substitutions 27 | Cgl0003I 0 fixed, 0 tightened bounds, 30 strengthened rows, 0 substitutions 28 | Cgl0003I 9 fixed, 0 tightened bounds, 34 strengthened rows, 0 substitutions 29 | Cgl0003I 7 fixed, 16 tightened bounds, 19 strengthened rows, 0 substitutions 30 | Cgl0003I 4 fixed, 3 tightened bounds, 5 strengthened rows, 0 substitutions 31 | Cgl0003I 0 fixed, 13 tightened bounds, 3 strengthened rows, 0 substitutions 32 | Cgl0003I 0 fixed, 0 tightened bounds, 17 strengthened rows, 0 substitutions 33 | Cgl0003I 0 fixed, 0 tightened bounds, 8 strengthened rows, 0 substitutions 34 | Cgl0004I processed model has 420 rows, 365 columns (337 integer (145 of which binary)) and 2273 elements 35 | Cutoff increment increased from 1e-005 to 0.9999 36 | Cbc0038I Initial state - 0 integers unsatisfied sum - 2.77556e-015 37 | Cbc0038I Solution found of 0 38 | Cbc0038I Relaxing continuous gives 0 39 | Cbc0038I Cleaned solution of 0 40 | Cbc0038I Before mini branch and bound, 337 integers at bound fixed and 11 continuous of which 2 were internal integer and 0 internal continuous 41 | Cbc0038I Mini branch and bound did not improve solution (0.00 seconds) 42 | Cbc0038I After 0.00 seconds - Feasibility pump exiting with objective of 0 - took 0.00 seconds 43 | Cbc0012I Integer solution of 0 found by feasibility pump after 0 iterations and 0 nodes (0.00 seconds) 44 | Cbc0001I Search completed - best objective 0, took 0 iterations and 0 nodes (0.00 seconds) 45 | Cbc0035I Maximum depth 0, 0 variables fixed on reduced cost 46 | Cuts at root node changed objective from 0 to 0 47 | Probing was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds) 48 | Gomory was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds) 49 | Knapsack was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds) 50 | Clique was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds) 51 | MixedIntegerRounding2 was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds) 52 | FlowCover was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds) 53 | TwoMirCuts was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds) 54 | 55 | Result - Optimal solution found 56 | 57 | Objective value: 0.00000000 58 | Enumerated nodes: 0 59 | Total iterations: 0 60 | Time (CPU seconds): 0.10 61 | Time (Wallclock seconds): 0.10 62 | 63 | Option for printingOptions changed from normal to all 64 | Total time (CPU seconds): 0.10 (Wallclock seconds): 0.10 65 | 66 | -------------------------------------------------------------------------------- /tests/data/gurobi700-app1-2.out: -------------------------------------------------------------------------------- 1 | @01 instances/miplib2010/app1-2.mps.gz =========== 2 | ----------------------------- 3 | Tue Oct 25 15:54:10 MST 2016 4 | ----------------------------- 5 | @03 1477436050 6 | /home/beck/miplib2010-1.1.0/results/solutions/benchmark.gurobi.app1-2.mps.sol 7 | Set parameter TimeLimit to value 7200 8 | Set parameter MIPGap to value 0.0 9 | Set parameter Threads to value 1 10 | 11 | Gurobi Optimizer version 7.0.0 build v7.0.0rc3 (linux64) 12 | Copyright (c) 2016, Gurobi Optimization, Inc. 13 | 14 | Read MPS format model from file instances/miplib2010/app1-2.mps.gz 15 | Reading time = 0.06 seconds 16 | app1-2: 53467 rows, 26871 columns, 199175 nonzeros 17 | Optimize a model with 53467 rows, 26871 columns and 199175 nonzeros 18 | Variable types: 13571 continuous, 13300 integer (13300 binary) 19 | Coefficient statistics: 20 | Matrix range [1e-05, 1e+00] 21 | Objective range [1e+00, 1e+00] 22 | Bounds range [1e+00, 1e+00] 23 | RHS range [1e-05, 1e+00] 24 | Found heuristic solution: objective -41 25 | Presolve removed 17851 rows and 4861 columns 26 | Presolve time: 3.40s 27 | Presolved: 35616 rows, 22010 columns, 149085 nonzeros 28 | Variable types: 11526 continuous, 10484 integer (10484 binary) 29 | 30 | Root relaxation: objective -1.789432e+02, 5382 iterations, 0.70 seconds 31 | 32 | Nodes | Current Node | Objective Bounds | Work 33 | Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time 34 | 35 | 0 0 -178.94318 0 282 -41.00000 -178.94318 336% - 4s 36 | 0 0 -171.91701 0 268 -41.00000 -171.91701 319% - 15s 37 | 0 0 -170.97660 0 267 -41.00000 -170.97660 317% - 15s 38 | 0 0 -169.27049 0 275 -41.00000 -169.27049 313% - 15s 39 | 0 0 -168.87923 0 271 -41.00000 -168.87923 312% - 15s 40 | 0 0 -168.77079 0 274 -41.00000 -168.77079 312% - 16s 41 | 0 0 -168.37789 0 271 -41.00000 -168.37789 311% - 16s 42 | 0 0 -168.13970 0 279 -41.00000 -168.13970 310% - 16s 43 | 0 0 -168.02564 0 280 -41.00000 -168.02564 310% - 16s 44 | 0 0 -168.02564 0 281 -41.00000 -168.02564 310% - 16s 45 | 0 0 -168.02564 0 281 -41.00000 -168.02564 310% - 16s 46 | 0 0 -168.02564 0 280 -41.00000 -168.02564 310% - 16s 47 | 0 0 -168.02564 0 280 -41.00000 -168.02564 310% - 16s 48 | 0 0 -168.02564 0 280 -41.00000 -168.02564 310% - 17s 49 | 0 0 -168.02564 0 280 -41.00000 -168.02564 310% - 17s 50 | 0 0 -168.02564 0 257 -41.00000 -168.02564 310% - 17s 51 | 0 0 -168.02564 0 258 -41.00000 -168.02564 310% - 18s 52 | 0 0 -168.02564 0 257 -41.00000 -168.02564 310% - 18s 53 | 0 0 -168.02564 0 257 -41.00000 -168.02564 310% - 18s 54 | 0 0 -168.02564 0 257 -41.00000 -168.02564 310% - 18s 55 | 0 2 -167.97894 0 257 -41.00000 -167.97894 310% - 21s 56 | 74 8 -144.93002 40 265 -41.00000 -167.97894 310% 20.5 25s 57 | 109 9 -133.04355 58 269 -41.00000 -167.97894 310% 21.4 30s 58 | 220 24 -85.16803 121 316 -41.00000 -167.97894 310% 16.9 35s 59 | 304 35 -47.38031 164 364 -41.00000 -167.97894 310% 19.0 40s 60 | 428 9 infeasible 159 -41.00000 -52.87391 29.0% 28.3 45s 61 | 62 | Cutting planes: 63 | Gomory: 16 64 | Implied bound: 23 65 | Clique: 1 66 | MIR: 22 67 | 68 | Explored 526 nodes (21191 simplex iterations) in 46.67 seconds 69 | Thread count was 1 (of 8 available processors) 70 | 71 | Solution count 1: -41 72 | Pool objective bound -41 73 | 74 | Optimal solution found (tolerance 0.00e+00) 75 | Best objective -4.100000000000e+01, best bound -4.100000000000e+01, gap 0.0000% 76 | 77 | Wrote result file '/home/beck/miplib2010-1.1.0/results/solutions/benchmark.gurobi.app1-2.mps.sol' 78 | 79 | 80 | @04 1477436097 81 | @05 7200 82 | 83 | Read MPS: 1 84 | MIP has 26871 vars and 53467 constraints 85 | Read SOL: 1 86 | Objective value computed by solver: -41 87 | 88 | Integrality tolerance: 1/10000 89 | Linear tolerance: 1/10000 90 | Objective tolerance: 1/10000 91 | 92 | Check SOL: Integrality 1 Constraints 1 Objective 1 93 | Maximum violations: Integrality 0 Constraints 2e-17 Objective 0 94 | 95 | ----------------------------- 96 | Tue Oct 25 15:54:58 MST 2016 97 | ----------------------------- 98 | 99 | =ready= 100 | -------------------------------------------------------------------------------- /tests/data/gurobi800-tanglegram2.out: -------------------------------------------------------------------------------- 1 | @01 instances/benchmark/tanglegram2.mps =========== 2 | ----------------------------- 3 | Wed Apr 25 17:18:17 MST 2018 4 | ----------------------------- 5 | @03 1524701897 6 | /home/beck/miplib2010-1.1.0/results/solutions/benchmark.gurobi.tanglegram2.mps.sol 7 | Set parameter TimeLimit to value 7200 8 | Set parameter MIPGap to value 0.0 9 | Set parameter Threads to value 1 10 | 11 | Gurobi Optimizer version 8.0.0 build v8.0.0rc0 (linux64) 12 | Copyright (c) 2018, Gurobi Optimization, LLC 13 | 14 | Read MPS format model from file instances/benchmark/tanglegram2.mps 15 | Reading time = 0.01 seconds 16 | tanglegram2: 8980 rows, 4714 columns, 26940 nonzeros 17 | Optimize a model with 8980 rows, 4714 columns and 26940 nonzeros 18 | Variable types: 0 continuous, 4714 integer (0 binary) 19 | Coefficient statistics: 20 | Matrix range [1e+00, 1e+00] 21 | Objective range [1e+00, 1e+00] 22 | Bounds range [1e+00, 1e+00] 23 | RHS range [1e+00, 1e+00] 24 | Found heuristic solution: objective 2160.0000000 25 | Presolve removed 1004 rows and 656 columns 26 | Presolve time: 0.03s 27 | Presolved: 7976 rows, 4058 columns, 23928 nonzeros 28 | Found heuristic solution: objective 1981.0000000 29 | Variable types: 0 continuous, 4058 integer (4058 binary) 30 | 31 | Root relaxation: objective 1.000000e+00, 73 iterations, 0.01 seconds 32 | 33 | Nodes | Current Node | Objective Bounds | Work 34 | Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time 35 | 36 | 0 0 1.00000 0 70 1981.00000 1.00000 100% - 0s 37 | H 0 0 755.0000000 1.00000 100% - 0s 38 | 0 0 36.50000 0 77 755.00000 36.50000 95.2% - 0s 39 | H 0 0 550.0000000 36.50000 93.4% - 0s 40 | 0 0 39.00000 0 90 550.00000 39.00000 92.9% - 0s 41 | 0 0 39.50000 0 77 550.00000 39.50000 92.8% - 0s 42 | 0 0 53.83333 0 140 550.00000 53.83333 90.2% - 0s 43 | 0 0 53.83333 0 70 550.00000 53.83333 90.2% - 0s 44 | 0 0 214.00000 0 87 550.00000 214.00000 61.1% - 0s 45 | 0 0 305.00000 0 106 550.00000 305.00000 44.5% - 0s 46 | 0 0 309.50000 0 119 550.00000 309.50000 43.7% - 0s 47 | 0 0 309.50000 0 113 550.00000 309.50000 43.7% - 0s 48 | 0 0 342.25000 0 112 550.00000 342.25000 37.8% - 0s 49 | H 0 0 484.0000000 342.25000 29.3% - 0s 50 | 0 0 347.50000 0 113 484.00000 347.50000 28.2% - 0s 51 | 0 0 347.50000 0 102 484.00000 347.50000 28.2% - 0s 52 | 0 0 380.16667 0 139 484.00000 380.16667 21.5% - 0s 53 | 0 0 389.50000 0 156 484.00000 389.50000 19.5% - 0s 54 | 0 0 389.50000 0 163 484.00000 389.50000 19.5% - 0s 55 | 0 0 408.33333 0 115 484.00000 408.33333 15.6% - 0s 56 | H 0 0 474.0000000 408.33333 13.9% - 0s 57 | 0 0 413.66667 0 105 474.00000 413.66667 12.7% - 0s 58 | 0 0 415.66667 0 125 474.00000 415.66667 12.3% - 0s 59 | 0 0 415.83333 0 127 474.00000 415.83333 12.3% - 0s 60 | 0 0 433.00000 0 76 474.00000 433.00000 8.65% - 0s 61 | H 0 0 443.0000000 433.00000 2.26% - 0s 62 | 0 0 436.50000 0 74 443.00000 436.50000 1.47% - 0s 63 | 0 0 cutoff 0 443.00000 443.00000 0.00% - 0s 64 | 65 | Cutting planes: 66 | Zero half: 5 67 | 68 | Explored 1 nodes (1670 simplex iterations) in 0.57 seconds 69 | Thread count was 1 (of 8 available processors) 70 | 71 | Solution count 7: 443 474 484 ... 2022 72 | 73 | Optimal solution found (tolerance 0.00e+00) 74 | Best objective 4.430000000000e+02, best bound 4.430000000000e+02, gap 0.0000% 75 | 76 | Wrote result file '/home/beck/miplib2010-1.1.0/results/solutions/benchmark.gurobi.tanglegram2.mps.sol' 77 | 78 | 79 | @04 1524701898 80 | @05 7200 81 | 82 | Read MPS: 1 83 | MIP has 4714 vars and 8980 constraints 84 | Read SOL: 1 85 | Objective value computed by solver: 443 86 | 87 | Integrality tolerance: 1/10000 88 | Linear tolerance: 1/10000 89 | Objective tolerance: 1/10000 90 | 91 | Check SOL: Integrality 1 Constraints 1 Objective 1 92 | Maximum violations: Integrality 0 Constraints 0 Objective 0 93 | 94 | ----------------------------- 95 | Wed Apr 25 17:18:18 MST 2018 96 | ----------------------------- 97 | 98 | -------------------------------------------------------------------------------- /orloge/cpsat.py: -------------------------------------------------------------------------------- 1 | from cpsat_logutils.blocks import SearchProgressBlock, SolverBlock, ResponseBlock 2 | from cpsat_logutils.blocks.search_progress import ModelEvent 3 | from .base import LogFile 4 | import cpsat_logutils as cpsatlog 5 | import pandas as pd 6 | from .constants import ( 7 | LpStatusMemoryLimit, 8 | LpStatusSolved, 9 | LpStatusInfeasible, 10 | LpSolutionIntegerFeasible, 11 | LpStatusTimeLimit, 12 | LpStatusUnbounded, 13 | LpStatusNotSolved, 14 | LpSolutionOptimal, 15 | LpSolutionInfeasible, 16 | LpSolutionNoSolutionFound, 17 | ) 18 | 19 | 20 | class CPSAT(LogFile): 21 | my_parser: cpsatlog.LogParser 22 | name = "CPSAT" 23 | 24 | def __init__(self, path, **options): 25 | super().__init__(path, **options) 26 | 27 | self.my_parser = cpsatlog.LogParser(self.content) 28 | 29 | def get_progress(self): 30 | """ 31 | Builds a pandas DataFrame with the search progress. 32 | It assumes events are sorted by time. 33 | It fills with the previous result when no new information is available. 34 | The return DataFrame has the following columns: 35 | [the names of columns match the ones in the orloge library, 36 | this may not be very relevant to cp-sat] 37 | - Time: The time of the event. 38 | - CutsBestBound: The best bound found at the time. 39 | - BestInteger: The best integer found at the time. 40 | - Gap: The gap between the best bound and the best integer. 41 | - NumVars: The number of variables before the event. 42 | - RemVars: The number of remaining variables after the event. 43 | - NumCons: The number of constraints before the event. 44 | - RemCons: The number of remaining constraints after the event. 45 | """ 46 | progress_block = self.my_parser.get_block_of_type_or_none(SearchProgressBlock) 47 | events = progress_block.get_events() 48 | gap = obj = bound = None 49 | cons = new_cons = var = new_var = None 50 | my_table = [] 51 | for e in events: 52 | if not isinstance(e, ModelEvent): 53 | bound = e.bound 54 | obj = e.obj 55 | gap = e.get_gap() 56 | else: 57 | var = e.vars 58 | new_var = e.vars_remaining 59 | cons = e.constr 60 | new_cons = e.constr_remaining 61 | my_table.append((e.time, bound, obj, gap, var, new_var, cons, new_cons)) 62 | col_names = [ 63 | "Time", 64 | "CutsBestBound", 65 | "BestInteger", 66 | "Gap", 67 | "NumVars", 68 | "RemVars", 69 | "NumCons", 70 | "RemCons", 71 | ] 72 | 73 | return pd.DataFrame.from_records(my_table, columns=col_names) 74 | 75 | def get_first_relax(self, progress): 76 | return None 77 | 78 | def get_nodes(self): 79 | return 0 80 | 81 | def get_time(self): 82 | my_block = self.my_parser.get_block_of_type_or_none(ResponseBlock) 83 | data = my_block.to_dict() 84 | return float(data["usertime"]) 85 | 86 | def get_cuts(self): 87 | pass 88 | 89 | def get_version(self): 90 | my_block = self.my_parser.get_block_of_type_or_none(SolverBlock) 91 | return my_block.get_version() 92 | 93 | def get_cuts_dict(self, progress, bound, objective): 94 | return None 95 | 96 | def get_stats(self): 97 | # status, objective, bound, gap_rel 98 | my_block = self.my_parser.get_block_of_type_or_none(ResponseBlock) 99 | data = my_block.to_dict() 100 | gap = my_block.get_gap() 101 | return data["status"], float(data["objective"]), float(data["best_bound"]), gap 102 | 103 | def get_status_codes(self, status, obj): 104 | _map_status = dict( 105 | OPTIMAL=LpStatusSolved, 106 | FEASIBLE=LpStatusSolved, 107 | INFEASIBLE=LpStatusInfeasible, 108 | UNBOUNDED=LpStatusUnbounded, 109 | TIME_LIMIT=LpStatusTimeLimit, 110 | MEMORY_LIMIT=LpStatusMemoryLimit, 111 | UNKNOWN=LpStatusNotSolved, 112 | ) 113 | _map_sol_status = dict( 114 | OPTIMAL=LpSolutionOptimal, 115 | FEASIBLE=LpSolutionIntegerFeasible, 116 | INFEASIBLE=LpSolutionInfeasible, 117 | UNKNOWN=LpSolutionNoSolutionFound, 118 | ) 119 | return _map_status.get(status, LpStatusNotSolved), _map_sol_status.get( 120 | status, LpSolutionNoSolutionFound 121 | ) 122 | 123 | def get_first_solution(self, progress): 124 | return None 125 | -------------------------------------------------------------------------------- /tests/data/gurobi700-satellites1-25.out: -------------------------------------------------------------------------------- 1 | @01 instances/miplib2010/satellites1-25.mps.gz =========== 2 | ----------------------------- 3 | Tue Oct 25 20:50:16 MST 2016 4 | ----------------------------- 5 | @03 1477453816 6 | /home/beck/miplib2010-1.1.0/results/solutions/benchmark.gurobi.satellites1-25.mps.sol 7 | Set parameter TimeLimit to value 7200 8 | Set parameter MIPGap to value 0.0 9 | Set parameter Threads to value 1 10 | 11 | Gurobi Optimizer version 7.0.0 build v7.0.0rc3 (linux64) 12 | Copyright (c) 2016, Gurobi Optimization, Inc. 13 | 14 | Read MPS format model from file instances/miplib2010/satellites1-25.mps.gz 15 | Reading time = 0.02 seconds 16 | satellites1-25: 5996 rows, 9013 columns, 59023 nonzeros 17 | Optimize a model with 5996 rows, 9013 columns and 59023 nonzeros 18 | Variable types: 504 continuous, 8509 integer (0 binary) 19 | Coefficient statistics: 20 | Matrix range [4e-01, 2e+05] 21 | Objective range [1e+00, 1e+02] 22 | Bounds range [1e+00, 2e+05] 23 | RHS range [1e+00, 2e+05] 24 | Presolve removed 1684 rows and 1393 columns 25 | Presolve time: 0.13s 26 | Presolved: 4312 rows, 7620 columns, 46838 nonzeros 27 | Variable types: 33 continuous, 7587 integer (7585 binary) 28 | Found heuristic solution: objective 49.0000000 29 | 30 | Root relaxation: objective -2.000000e+01, 7339 iterations, 1.03 seconds 31 | 32 | Nodes | Current Node | Objective Bounds | Work 33 | Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time 34 | 35 | 0 0 -20.00000 0 420 49.00000 -20.00000 141% - 2s 36 | 0 0 -20.00000 0 382 49.00000 -20.00000 141% - 4s 37 | 0 0 -20.00000 0 290 49.00000 -20.00000 141% - 6s 38 | 0 0 -20.00000 0 513 49.00000 -20.00000 141% - 7s 39 | 0 0 -20.00000 0 518 49.00000 -20.00000 141% - 8s 40 | 0 0 -20.00000 0 683 49.00000 -20.00000 141% - 8s 41 | 0 0 -20.00000 0 581 49.00000 -20.00000 141% - 8s 42 | 0 0 -20.00000 0 344 49.00000 -20.00000 141% - 10s 43 | H 0 0 38.0000000 -20.00000 153% - 10s 44 | H 0 0 37.0000000 -20.00000 154% - 10s 45 | 0 0 -20.00000 0 376 37.00000 -20.00000 154% - 10s 46 | 0 0 -20.00000 0 298 37.00000 -20.00000 154% - 12s 47 | 0 0 -20.00000 0 298 37.00000 -20.00000 154% - 12s 48 | 0 0 -20.00000 0 244 37.00000 -20.00000 154% - 13s 49 | 0 0 -20.00000 0 244 37.00000 -20.00000 154% - 13s 50 | 0 0 -20.00000 0 244 37.00000 -20.00000 154% - 14s 51 | 0 0 -20.00000 0 310 37.00000 -20.00000 154% - 14s 52 | 0 0 -20.00000 0 278 37.00000 -20.00000 154% - 15s 53 | 0 0 -20.00000 0 298 37.00000 -20.00000 154% - 15s 54 | 0 0 -20.00000 0 246 37.00000 -20.00000 154% - 17s 55 | 0 0 -20.00000 0 222 37.00000 -20.00000 154% - 19s 56 | 0 0 -20.00000 0 222 37.00000 -20.00000 154% - 20s 57 | 0 2 -20.00000 0 222 37.00000 -20.00000 154% - 21s 58 | 6 8 -20.00000 4 204 37.00000 -20.00000 154% 1128 25s 59 | H 8 8 29.0000000 -20.00000 169% 866 25s 60 | 48 7 -20.00000 5 375 29.00000 -20.00000 169% 295 30s 61 | 91 28 -19.75000 8 373 29.00000 -20.00000 169% 226 35s 62 | 173 75 -12.45697 67 420 29.00000 -20.00000 169% 163 40s 63 | 270 114 -18.00000 22 420 29.00000 -20.00000 169% 176 45s 64 | 425 183 -11.62500 77 367 29.00000 -20.00000 169% 155 50s 65 | H 506 228 0.0000000 -20.00000 - 143 51s 66 | H 692 223 -4.0000000 -19.99953 400% 123 54s 67 | H 719 230 -5.0000000 -19.99877 300% 121 54s 68 | 732 225 -18.50000 33 314 -5.00000 -19.74946 295% 121 55s 69 | 70 | Cutting planes: 71 | Learned: 1 72 | Cover: 35 73 | Implied bound: 25 74 | Clique: 71 75 | MIR: 23 76 | Inf proof: 16 77 | Zero half: 9 78 | 79 | Explored 1170 nodes (226442 simplex iterations) in 59.70 seconds 80 | Thread count was 1 (of 8 available processors) 81 | 82 | Solution count 7: -5 -4 0 ... 49 83 | Pool objective bound -5 84 | 85 | Optimal solution found (tolerance 0.00e+00) 86 | Best objective -5.000000000000e+00, best bound -5.000000000000e+00, gap 0.0000% 87 | 88 | Wrote result file '/home/beck/miplib2010-1.1.0/results/solutions/benchmark.gurobi.satellites1-25.mps.sol' 89 | 90 | 91 | @04 1477453876 92 | @05 7200 93 | 94 | Read MPS: 1 95 | MIP has 9013 vars and 5996 constraints 96 | Read SOL: 1 97 | Objective value computed by solver: -5 98 | 99 | Integrality tolerance: 1/10000 100 | Linear tolerance: 1/10000 101 | Objective tolerance: 1/10000 102 | 103 | Check SOL: Integrality 1 Constraints 1 Objective 1 104 | Maximum violations: Integrality 0 Constraints 6e-11 Objective 0 105 | 106 | ----------------------------- 107 | Tue Oct 25 20:51:16 MST 2016 108 | ----------------------------- 109 | 110 | =ready= 111 | -------------------------------------------------------------------------------- /tests/data/gurobi800-satellites1-25.out: -------------------------------------------------------------------------------- 1 | @01 instances/benchmark/satellites1-25.mps =========== 2 | ----------------------------- 3 | Wed Apr 25 17:15:41 MST 2018 4 | ----------------------------- 5 | @03 1524701741 6 | /home/beck/miplib2010-1.1.0/results/solutions/benchmark.gurobi.satellites1-25.mps.sol 7 | Set parameter TimeLimit to value 7200 8 | Set parameter MIPGap to value 0.0 9 | Set parameter Threads to value 1 10 | 11 | Gurobi Optimizer version 8.0.0 build v8.0.0rc0 (linux64) 12 | Copyright (c) 2018, Gurobi Optimization, LLC 13 | 14 | Read MPS format model from file instances/benchmark/satellites1-25.mps 15 | Reading time = 0.01 seconds 16 | satellites1-25: 5996 rows, 9013 columns, 59023 nonzeros 17 | Optimize a model with 5996 rows, 9013 columns and 59023 nonzeros 18 | Variable types: 504 continuous, 8509 integer (0 binary) 19 | Coefficient statistics: 20 | Matrix range [4e-01, 2e+05] 21 | Objective range [1e+00, 1e+02] 22 | Bounds range [1e+00, 2e+05] 23 | RHS range [1e+00, 2e+05] 24 | Presolve removed 1666 rows and 1385 columns 25 | Presolve time: 0.15s 26 | Presolved: 4330 rows, 7628 columns, 46933 nonzeros 27 | Variable types: 43 continuous, 7585 integer (7585 binary) 28 | Found heuristic solution: objective 49.0000000 29 | 30 | Root relaxation: objective -2.000000e+01, 3893 iterations, 0.27 seconds 31 | 32 | Nodes | Current Node | Objective Bounds | Work 33 | Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time 34 | 35 | 0 0 -20.00000 0 495 49.00000 -20.00000 141% - 5s 36 | H 0 0 38.0000000 -20.00000 153% - 5s 37 | H 0 0 37.0000000 -20.00000 154% - 5s 38 | 0 0 -20.00000 0 404 37.00000 -20.00000 154% - 7s 39 | 0 0 -20.00000 0 351 37.00000 -20.00000 154% - 11s 40 | H 0 0 36.0000000 -20.00000 156% - 11s 41 | 0 0 -20.00000 0 444 36.00000 -20.00000 156% - 11s 42 | 0 0 -20.00000 0 551 36.00000 -20.00000 156% - 12s 43 | 0 0 -20.00000 0 267 36.00000 -20.00000 156% - 14s 44 | 0 0 -20.00000 0 343 36.00000 -20.00000 156% - 14s 45 | 0 0 -20.00000 0 290 36.00000 -20.00000 156% - 15s 46 | 0 0 -20.00000 0 291 36.00000 -20.00000 156% - 15s 47 | 0 0 -20.00000 0 167 36.00000 -20.00000 156% - 16s 48 | 0 0 -20.00000 0 228 36.00000 -20.00000 156% - 17s 49 | 0 0 -20.00000 0 266 36.00000 -20.00000 156% - 17s 50 | 0 0 -20.00000 0 249 36.00000 -20.00000 156% - 17s 51 | 0 0 -20.00000 0 254 36.00000 -20.00000 156% - 18s 52 | 0 0 -20.00000 0 251 36.00000 -20.00000 156% - 20s 53 | 0 0 -20.00000 0 376 36.00000 -20.00000 156% - 23s 54 | 0 0 -20.00000 0 436 36.00000 -20.00000 156% - 23s 55 | 0 0 -20.00000 0 414 36.00000 -20.00000 156% - 24s 56 | 0 0 -20.00000 0 154 36.00000 -20.00000 156% - 25s 57 | 0 0 -20.00000 0 160 36.00000 -20.00000 156% - 25s 58 | 0 0 -20.00000 0 274 36.00000 -20.00000 156% - 25s 59 | 0 0 -20.00000 0 282 36.00000 -20.00000 156% - 25s 60 | 0 0 -20.00000 0 255 36.00000 -20.00000 156% - 26s 61 | 0 0 -20.00000 0 255 36.00000 -20.00000 156% - 27s 62 | 0 2 -20.00000 0 255 36.00000 -20.00000 156% - 28s 63 | H 7 7 31.0000000 -20.00000 165% 863 29s 64 | 11 13 -19.00000 9 350 31.00000 -20.00000 165% 754 30s 65 | H 64 23 29.0000000 -20.00000 169% 359 33s 66 | 96 26 -18.25000 7 234 29.00000 -20.00000 169% 313 35s 67 | H 188 17 -5.0000000 -19.00000 280% 231 37s 68 | 319 16 -12.18473 39 288 -5.00000 -13.30000 166% 174 40s 69 | 70 | Cutting planes: 71 | Learned: 1 72 | Gomory: 3 73 | Cover: 33 74 | Implied bound: 27 75 | Clique: 9 76 | MIR: 10 77 | StrongCG: 2 78 | Inf proof: 4 79 | Zero half: 20 80 | 81 | Explored 380 nodes (185198 simplex iterations) in 40.86 seconds 82 | Thread count was 1 (of 8 available processors) 83 | 84 | Solution count 7: -5 29 31 ... 49 85 | 86 | Optimal solution found (tolerance 0.00e+00) 87 | Best objective -5.000000000000e+00, best bound -5.000000000000e+00, gap 0.0000% 88 | 89 | Wrote result file '/home/beck/miplib2010-1.1.0/results/solutions/benchmark.gurobi.satellites1-25.mps.sol' 90 | 91 | 92 | @04 1524701782 93 | @05 7200 94 | 95 | Read MPS: 1 96 | MIP has 9013 vars and 5996 constraints 97 | Read SOL: 1 98 | Objective value computed by solver: -5 99 | 100 | Integrality tolerance: 1/10000 101 | Linear tolerance: 1/10000 102 | Objective tolerance: 1/10000 103 | 104 | Check SOL: Integrality 1 Constraints 1 Objective 1 105 | Maximum violations: Integrality 0 Constraints 1.135e-09 Objective 0 106 | 107 | ----------------------------- 108 | Wed Apr 25 17:16:22 MST 2018 109 | ----------------------------- 110 | 111 | =ready= 112 | -------------------------------------------------------------------------------- /tests/data/cplex1280-fmp-cutoff.out: -------------------------------------------------------------------------------- 1 | Log started (V12.8.0.0) Wed Dec 4 15:33:33 2019 2 | New value for time limit in seconds: 3600 3 | New value for mixed integer optimality gap tolerance: 0 4 | New value for absolute mixed integer optimality gap tolerance: 10 5 | New value for default parallel thread count: 1 6 | New value for type of flow cover cut generation: 1 7 | New value for type of mixed integer rounding cut generation: 1 8 | New value for factor for backtracking, lower values give more: 0.1 9 | New value for frequency to apply periodic heuristic algorithm: 100 10 | New value for node presolve strategy: 2 11 | New value for probing strategy: 3 12 | New value for candidate limit for generating Gomory fractional cuts: 10000 13 | New value for pass limit for generating Gomory fractional cuts: 10 14 | CPXPARAM_TimeLimit 3600 15 | CPXPARAM_Threads 1 16 | CPXPARAM_MIP_Strategy_Backtrack 0.10000000000000001 17 | CPXPARAM_MIP_Tolerances_AbsMIPGap 10 18 | CPXPARAM_MIP_Tolerances_MIPGap 0 19 | CPXPARAM_MIP_Strategy_HeuristicFreq 100 20 | CPXPARAM_MIP_Strategy_PresolveNode 2 21 | CPXPARAM_MIP_Cuts_FlowCovers 1 22 | CPXPARAM_MIP_Strategy_Probe 3 23 | CPXPARAM_MIP_Limits_GomoryCand 10000 24 | CPXPARAM_MIP_Limits_GomoryPass 10 25 | CPXPARAM_MIP_Cuts_MIRCut 1 26 | Aggregator has done 256 substitutions... 27 | Tried aggregator 3 times. 28 | MIP Presolve eliminated 12216 rows and 969 columns. 29 | MIP Presolve modified 593239 coefficients. 30 | Aggregator did 256 substitutions. 31 | Reduced MIP has 48938 rows, 28780 columns, and 3578287 nonzeros. 32 | Reduced MIP has 23922 binaries, 0 generals, 0 SOSs, and 0 indicators. 33 | Presolve time = 29.00 sec. (11757.37 ticks) 34 | Elapsed time = 19.38 sec. (10000.30 ticks) for 56% of probing (73 vars fixed) 35 | Probing fixed 73 vars, tightened 0 bounds. 36 | Probing time = 23.01 sec. (11653.43 ticks) 37 | Cover probing fixed 3 vars, tightened 31 bounds. 38 | Tried aggregator 3 times. 39 | MIP Presolve eliminated 440 rows and 81 columns. 40 | MIP Presolve modified 82939 coefficients. 41 | Aggregator did 2 substitutions. 42 | Reduced MIP has 48495 rows, 28697 columns, and 3555015 nonzeros. 43 | Reduced MIP has 23849 binaries, 162 generals, 0 SOSs, and 0 indicators. 44 | Presolve time = 20.09 sec. (5471.25 ticks) 45 | Probing time = 3.31 sec. (1285.29 ticks) 46 | Cover probing fixed 2 vars, tightened 18 bounds. 47 | Probing added 14096 nonzeros. 48 | Clique table members: 2002. 49 | MIP emphasis: balance optimality and feasibility. 50 | MIP search method: dynamic search. 51 | Parallel mode: none, using 1 thread. 52 | Root relaxation solution time = 59.06 sec. (5508.82 ticks) 53 | Nodes Cuts/ 54 | Node Left Objective IInf Best Integer Best Bound ItCnt Gap 55 | 0 0 -2445.5691 299 -2445.5691 8117 56 | 0 0 -2425.0602 293 Cuts: 372 9946 57 | 0 0 -2392.8643 300 Cuts: 207 11194 58 | 0 0 -2388.4548 310 Cuts: 225 12247 59 | 0 0 -1244.1796 292 Cuts: 123 13042 60 | 0 0 1018.6681 355 Cuts: 147 13392 61 | 0 0 7904.4113 318 Cuts: 141 14002 62 | 0 0 12654.2784 342 Cuts: 118 14536 63 | 0 0 cutoff 14658 64 | Elapsed time = 327.59 sec. (69707.48 ticks, tree = 0.01 MB, solutions = 0) 65 | GUB cover cuts applied: 19 66 | Clique cuts applied: 35 67 | Cover cuts applied: 1 68 | Implied bound cuts applied: 128 69 | Flow cuts applied: 23 70 | Mixed integer rounding cuts applied: 87 71 | Zero-half cuts applied: 28 72 | Gomory fractional cuts applied: 54 73 | Root node processing (before b&c): 74 | Real time = 327.76 sec. (69718.12 ticks) 75 | Sequential b&c: 76 | Real time = 0.00 sec. (0.00 ticks) 77 | ------------ 78 | Total (root+branch&cut) = 327.76 sec. (69718.12 ticks) 79 | MIP - Integer infeasible. 80 | Current MIP best bound is infinite. 81 | Solution time = 327.76 sec. Iterations = 14658 Nodes = 0 82 | Deterministic time = 69718.21 ticks (212.71 ticks/sec) 83 | CPLEX Error 1217: No solution exists. 84 | No changes made. 85 | CPXPARAM_TimeLimit 3600 86 | CPXPARAM_Threads 1 87 | CPXPARAM_MIP_Strategy_Backtrack 0.10000000000000001 88 | CPXPARAM_MIP_Tolerances_AbsMIPGap 10 89 | CPXPARAM_MIP_Tolerances_MIPGap 0 90 | CPXPARAM_MIP_Strategy_HeuristicFreq 100 91 | CPXPARAM_MIP_Strategy_PresolveNode 2 92 | CPXPARAM_MIP_Cuts_FlowCovers 1 93 | CPXPARAM_MIP_Strategy_Probe 3 94 | CPXPARAM_MIP_Limits_GomoryCand 10000 95 | CPXPARAM_MIP_Limits_GomoryPass 10 96 | CPXPARAM_MIP_Cuts_MIRCut 1 97 | Root node processing (before b&c): 98 | Real time = 0.00 sec. (0.00 ticks) 99 | Sequential b&c: 100 | Real time = 0.00 sec. (0.00 ticks) 101 | ------------ 102 | Total (root+branch&cut) = 0.00 sec. (0.00 ticks) 103 | MIP - Integer infeasible. 104 | Current MIP best bound is infinite. 105 | Solution time = 0.00 sec. Iterations = 14658 Nodes = 0 106 | Deterministic time = 0.00 ticks (0.95 ticks/sec) 107 | CPLEX Error 1217: No solution exists. 108 | No file written. -------------------------------------------------------------------------------- /tests/data/cplex1280-fmpFP4.out: -------------------------------------------------------------------------------- 1 | 2 | Log started (V12.8.0.0) Mon Apr 8 01:56:56 2019 3 | 4 | New value for time limit in seconds: 3600 5 | New value for mixed integer optimality gap tolerance: 0 6 | New value for absolute mixed integer optimality gap tolerance: 40 7 | New value for upper limit on size of tree in megabytes: 64413.2 8 | New value for type of flow cover cut generation: 1 9 | New value for type of mixed integer rounding cut generation: 1 10 | New value for factor for backtracking, lower values give more: 0.1 11 | New value for frequency to apply periodic heuristic algorithm: 100 12 | New value for node presolve strategy: 2 13 | New value for probing strategy: 3 14 | New value for candidate limit for generating Gomory fractional cuts: 10000 15 | New value for pass limit for generating Gomory fractional cuts: 10 16 | CPXPARAM_TimeLimit 3600 17 | CPXPARAM_MIP_Strategy_Backtrack 0.10000000000000001 18 | CPXPARAM_MIP_Tolerances_AbsMIPGap 40 19 | CPXPARAM_MIP_Tolerances_MIPGap 0 20 | CPXPARAM_MIP_Limits_TreeMemory 64413.1875 21 | CPXPARAM_MIP_Strategy_HeuristicFreq 100 22 | CPXPARAM_MIP_Strategy_PresolveNode 2 23 | CPXPARAM_MIP_Cuts_FlowCovers 1 24 | CPXPARAM_MIP_Strategy_Probe 3 25 | CPXPARAM_MIP_Limits_GomoryCand 10000 26 | CPXPARAM_MIP_Limits_GomoryPass 10 27 | CPXPARAM_MIP_Cuts_MIRCut 1 28 | Tried aggregator 7 times. 29 | MIP Presolve eliminated 34490 rows and 402 columns. 30 | MIP Presolve modified 728 coefficients. 31 | Aggregator did 1618 substitutions. 32 | Reduced MIP has 6744 rows, 4583 columns, and 62949 nonzeros. 33 | Reduced MIP has 3196 binaries, 0 generals, 0 SOSs, and 0 indicators. 34 | Presolve time = 0.33 sec. (319.37 ticks) 35 | Probing fixed 128 vars, tightened 0 bounds. 36 | Probing changed sense of 170 constraints. 37 | Probing time = 0.05 sec. (12.73 ticks) 38 | Cover probing fixed 0 vars, tightened 1 bounds. 39 | Tried aggregator 2 times. 40 | MIP Presolve eliminated 500 rows and 189 columns. 41 | MIP Presolve modified 511 coefficients. 42 | Aggregator did 80 substitutions. 43 | Reduced MIP has 6164 rows, 4314 columns, and 51540 nonzeros. 44 | Reduced MIP has 3007 binaries, 1 generals, 0 SOSs, and 0 indicators. 45 | Presolve time = 0.13 sec. (115.98 ticks) 46 | Probing time = 0.03 sec. (8.47 ticks) 47 | Probing added 2427 nonzeros. 48 | Clique table members: 3921. 49 | MIP emphasis: balance optimality and feasibility. 50 | MIP search method: dynamic search. 51 | Parallel mode: deterministic, using up to 12 threads. 52 | Root relaxation solution time = 0.66 sec. (409.49 ticks) 53 | 54 | Nodes Cuts/ 55 | Node Left Objective IInf Best Integer Best Bound ItCnt Gap 56 | 57 | 0 0 15192.1523 188 15192.1523 4155 58 | * 0+ 0 18041.7930 15192.1523 15.79% 59 | 0 0 18003.7155 88 18041.7930 Cuts: 37 5199 0.21% 60 | 61 | Clique cuts applied: 1 62 | Implied bound cuts applied: 3 63 | Flow cuts applied: 0 64 | Mixed integer rounding cuts applied: 2 65 | Zero-half cuts applied: 3 66 | Lift and project cuts applied: 2 67 | Gomory fractional cuts applied: 6 68 | 69 | Root node processing (before b&c): 70 | Real time = 2.17 sec. (1492.28 ticks) 71 | Parallel b&c, 12 threads: 72 | Real time = 0.00 sec. (0.00 ticks) 73 | Sync time (average) = 0.00 sec. 74 | Wait time (average) = 0.00 sec. 75 | ------------ 76 | Total (root+branch&cut) = 2.17 sec. (1492.28 ticks) 77 | 78 | Solution pool: 1 solution saved. 79 | 80 | MIP - Integer optimal, tolerance (0/40): Objective = 1.8041792998e+04 81 | Current MIP best bound = 1.8003715497e+04 (gap = 38.0775, 0.21%) 82 | Solution time = 2.17 sec. Iterations = 5199 Nodes = 0 (1) 83 | Deterministic time = 1492.30 ticks (686.16 ticks/sec) 84 | 85 | MILP problem relaxed to LP with fixed integer variables using 86 | incumbent solution. 87 | CPXPARAM_TimeLimit 3600 88 | CPXPARAM_MIP_Strategy_Backtrack 0.10000000000000001 89 | CPXPARAM_MIP_Tolerances_AbsMIPGap 40 90 | CPXPARAM_MIP_Tolerances_MIPGap 0 91 | CPXPARAM_MIP_Limits_TreeMemory 64413.1875 92 | CPXPARAM_MIP_Strategy_HeuristicFreq 100 93 | CPXPARAM_MIP_Strategy_PresolveNode 2 94 | CPXPARAM_MIP_Cuts_FlowCovers 1 95 | CPXPARAM_MIP_Strategy_Probe 3 96 | CPXPARAM_MIP_Limits_GomoryCand 10000 97 | CPXPARAM_MIP_Limits_GomoryPass 10 98 | CPXPARAM_MIP_Cuts_MIRCut 1 99 | Parallel mode: deterministic, using up to 12 threads for concurrent optimization. 100 | Tried aggregator 1 time. 101 | LP Presolve eliminated 41561 rows and 5366 columns. 102 | Aggregator did 640 substitutions. 103 | Reduced LP has 651 rows, 597 columns, and 2307 nonzeros. 104 | Presolve time = 0.01 sec. (13.42 ticks) 105 | Initializing dual steep norms . . . 106 | 107 | Iteration log . . . 108 | Iteration: 1 Dual objective = 18041.792998 109 | Perturbation started. 110 | Iteration: 51 Dual objective = 18041.792998 111 | Iteration: 165 Dual objective = 18041.830372 112 | Iteration: 244 Dual objective = 18041.843238 113 | Iteration: 316 Dual objective = 18041.856586 114 | Iteration: 378 Dual objective = 18041.904195 115 | Removing perturbation. 116 | 117 | Dual simplex solved model. 118 | 119 | 120 | Dual simplex - Optimal: Objective = 1.8041792998e+04 121 | Solution time = 0.04 sec. Iterations = 410 (0) 122 | Deterministic time = 32.91 ticks (819.65 ticks/sec) 123 | 124 | 125 | Solution written to file 'MFMP_v0002-pulp.sol'. 126 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Orloge 2 | [![PyPI version](https://badge.fury.io/py/orloge.svg)](https://badge.fury.io/py/orloge) 3 | ![Repo Size](https://img.shields.io/github/repo-size/pchtsp/orloge) 4 | [![PEP8](https://img.shields.io/badge/code%20style-pep8-orange.svg)](https://www.python.org/dev/peps/pep-0008/) 5 | [![Repo Status](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org) 6 | [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) 7 | 8 | 9 | ## What and why 10 | 11 | The idea of this project is to permit a fast and easy parsing of the log files from different solvers, specifically 'operations research' (OR) logs. 12 | 13 | There exist bigger, and more robust libraries. In particular, [IPET](https://github.com/GregorCH/ipet/). The trouble I had was that it deals with too many benchmarking and GUI things and I wanted something simple I could modify and build on top. 14 | 15 | In any case, a lot of the ideas and parsing strings were obtained or adapted from IPET, to whom I am graceful. 16 | 17 | The supported solvers for the time being are: GUROBI, CPLEX and CBC. Specially the two first ones. 18 | 19 | ## How 20 | 21 | The basic idea is just to provide a unique interface function like the following: 22 | 23 | import orloge as ol 24 | ol.get_info_solver(path_to_solver_log, solver_name) 25 | 26 | This returns a python dictionary with a lot of information from the log (see *Examples* below). 27 | 28 | ## Installation 29 | 30 | pip install orloge 31 | 32 | or, for the development version: 33 | 34 | pip install https://github.com/pchtsp/orloge/archive/master.zip 35 | 36 | ## Testing 37 | 38 | Run the command 39 | 40 | python3 -m unittest tests.SolverTest 41 | 42 | if the output says OK, all tests were passed. 43 | 44 | ## Reference 45 | 46 | ### Main parameters 47 | 48 | The most common parameters to extract are: `best_bound`, `best_solution` and `time`. These three parameters are obtained at the end of the solving process and summarize the best relaxed objective value obtained, the best integer objective value obtained and the time it took to do the solving. 49 | 50 | ### Cuts 51 | 52 | The cuts information can be accessed by the `cuts_info` key. It offers the best known bound after the cut phase has ended, the best solution (if any) after the cuts and the number of cuts made of each type. 53 | 54 | ### Matrix 55 | 56 | There are two matrices that are provided. The `matrix` key returns the number of variables, constraints and non-zero values before the pre-processing of the solver. The `matrix_post` key returns these same values after the pre-processing has been done. 57 | 58 | ### Progress 59 | 60 | The `progress` key returns a raw pandas Dataframe with the all the progress information the solver gives. Including the times, the gap, the best bound, the best solution, the iterations, nodes, among other. This table can vary in number of columns between solvers but the names of the columns are normalized so as to have the same name for the same information. 61 | 62 | ### Status 63 | 64 | The status is given in several ways. First, a raw string extraction is returned in `status`. Then, a normalized one using codes is given via `sol_code` and `status_code` keys. `sol_code` gives information about the quality of the solution obtained. `status_code` gives details about the status of the solver after finishing (mainly, the reason it stopped). 65 | 66 | ### Other 67 | 68 | There is also information about the pre-solving phase, the first bound and the first solution. Also, there's information about the time it took to solve the root node. 69 | 70 | ## Examples 71 | 72 | import orloge as ol 73 | ol.get_info_solver('tests/data/cbc298-app1-2.out', 'CBC') 74 | 75 | Would produce the following: 76 | 77 | {'best_bound': -96.111283, 78 | 'best_solution': None, 79 | 'cut_info': {'best_bound': -210.09571, 80 | 'best_solution': 1e+50, 81 | 'cuts': None, 82 | 'time': None}, 83 | 'first_relaxed': -210.09571, 84 | 'first_solution': 1e+50, 85 | 'gap': None, 86 | 'matrix': {'constraints': 53467, 'nonzeros': 199175, 'variables': 26871}, 87 | 'matrix_post': {'constraints': 26555, 'nonzeros': 195875, 'variables': 13265}, 88 | 'nodes': 31867, 89 | 'presolve': None, 90 | 'progress': 91 | Node NodesLeft BestInteger CutsBestBound Time 92 | 0 0 1 1e+50 -210.09571 32.83 93 | 1 100 11 1e+50 -210.09571 124.49 94 | .. ... ... ... ... ... 95 | [319 rows x 5 columns], 96 | 'rootTime': None, 97 | 'sol_code': 0, 98 | 'solver': 'CBC', 99 | 'status': 'Stopped on time limit', 100 | 'status_code': -4, 101 | 'time': 7132.49, 102 | 'version': '2.9.8'} 103 | 104 | And another example, this time using GUROBI: 105 | 106 | import orloge as ol 107 | ol.get_info_solver('tests/data/gurobi700-app1-2.out', 'GUROBI') 108 | 109 | Creates the following output: 110 | 111 | {'best_bound': -41.0, 112 | 'best_solution': -41.0, 113 | 'cut_info': {'best_bound': -167.97894, 114 | 'best_solution': -41.0, 115 | 'cuts': {'Clique': 1, 116 | 'Gomory': 16, 117 | 'Implied bound': 23, 118 | 'MIR': 22}, 119 | 'time': 21.0}, 120 | 'first_relaxed': -178.94318, 121 | 'first_solution': -41.0, 122 | 'gap': 0.0, 123 | 'matrix': {'constraints': 53467, 'nonzeros': 199175, 'variables': 26871}, 124 | 'matrix_post': {'constraints': 35616, 'nonzeros': 149085, 'variables': 22010}, 125 | 'nodes': 526.0, 126 | 'presolve': {'cols': 4861, 'rows': 17851, 'time': 3.4}, 127 | 'progress': 128 | Node NodesLeft Objective Depth ... CutsBestBound Gap ItpNode Time 129 | 0 0 0 -178.94318 0 ... -178.94318 336% None 4s 130 | 1 0 0 -171.91701 0 ... -171.91701 319% None 15s 131 | 2 0 0 -170.97660 0 ... -170.97660 317% None 15s 132 | [26 rows x 10 columns], 133 | 'rootTime': 0.7, 134 | 'sol_code': 1, 135 | 'solver': 'GUROBI', 136 | 'status': 'Optimal solution found', 137 | 'status_code': 1, 138 | 'time': 46.67, 139 | 'version': '7.0.0'} 140 | 141 | Parsing the complete progress table helps anyone who later wants to analyze the raw solution process. I've tried to use the status codes and solution codes present in [PuLP](https://github.com/coin-or/pulp). 142 | -------------------------------------------------------------------------------- /orloge/gurobi.py: -------------------------------------------------------------------------------- 1 | from .base import LogFile 2 | from .constants import ( 3 | LpStatusMemoryLimit, 4 | LpStatusSolved, 5 | LpStatusInfeasible, 6 | LpStatusTimeLimit, 7 | LpStatusUnbounded, 8 | LpStatusNotSolved, 9 | ) 10 | import re 11 | import numpy as np 12 | 13 | 14 | class GUROBI(LogFile): 15 | name = "GUROBI" 16 | 17 | def __init__(self, path, **options): 18 | super().__init__(path, **options) 19 | self.solver_status_map = { 20 | "Optimal solution found": LpStatusSolved, 21 | "Solved with barrier": LpStatusSolved, 22 | "Model is infeasible": LpStatusInfeasible, 23 | "Model is infeasible or unbounded": LpStatusInfeasible, 24 | "Time limit reached": LpStatusTimeLimit, 25 | "Out of memory": LpStatusMemoryLimit, 26 | "ERROR 10001": LpStatusMemoryLimit, 27 | "ERROR 10003": LpStatusNotSolved, 28 | "^Model is unbounded": LpStatusUnbounded, 29 | } 30 | self.version_regex = r"Gurobi Optimizer version (\S+)" 31 | self.progress_names = [ 32 | "Node", 33 | "NodesLeft", 34 | "Objective", 35 | "Depth", 36 | "IInf", 37 | "BestInteger", 38 | "CutsBestBound", 39 | "Gap", 40 | "ItpNode", 41 | "Time", 42 | ] 43 | self.progress_filter = r"(^[\*H]?\s+\d.*$)" 44 | 45 | def get_cuts(self): 46 | regex = r"Cutting planes:([\n\s\-\w:]+)Explored" 47 | result = self.apply_regex(regex, flags=re.MULTILINE) 48 | if not result: 49 | # if no cuts found, return empty dictionary 50 | return {} 51 | cuts = [r for r in result.split("\n") if r != ""] 52 | regex = r"\s*{}: {}".format(self.wordSearch, self.numberSearch) 53 | searches = [re.search(regex, v) for v in cuts] 54 | return { 55 | s.group(1): int(s.group(2)) 56 | for s in searches 57 | if s is not None and s.lastindex >= 2 58 | } 59 | 60 | def get_matrix(self): 61 | regex = r"Optimize a model with {0} rows, {0} columns and {0} nonzeros".format( 62 | self.numberSearch 63 | ) 64 | return self.apply_regex(regex, content_type="int") 65 | 66 | def get_matrix_post(self): 67 | regex = r"Presolved: {0} rows, {0} columns, {0} nonzeros".format( 68 | self.numberSearch 69 | ) 70 | return self.apply_regex(regex, content_type="int") 71 | 72 | def get_stats(self): 73 | regex = r"{1}( \(.*\))?\n(Warning:.*\n)?Best objective ({0}|-), best bound ({0}|-), gap ({0}|-)".format( 74 | self.numberSearch, self.wordSearch 75 | ) 76 | # content_type = ['', '', 'float', 'float', 'float'] 77 | solution = self.apply_regex(regex) 78 | if solution is None: 79 | return None, None, None, None 80 | 81 | status = solution[0] 82 | objective, bound, gap_rel = [ 83 | float(solution[pos]) if solution[pos] != "-" else None for pos in [3, 5, 7] 84 | ] 85 | return status, objective, bound, gap_rel 86 | 87 | def get_cuts_time(self): 88 | progress = self.get_progress() 89 | if not len(progress): 90 | return None 91 | df_filter = np.all( 92 | ( 93 | progress.Node.str.match(r"^\*?H?\s*0"), 94 | progress.NodesLeft.str.match(r"^\+?H?\s*2"), 95 | ), 96 | axis=0, 97 | ) 98 | 99 | cell = progress.Time.iloc[0] 100 | if len(df_filter) and any(df_filter): 101 | # we finished the cuts phase 102 | cell = progress.Time[df_filter].iloc[0] 103 | 104 | number = re.search(self.numberSearch, cell).group(1) 105 | return float(number) 106 | 107 | def get_lp_presolve(self): 108 | """ 109 | :return: tuple of length 3 110 | """ 111 | regex = r"Presolve time: {0}s".format(self.numberSearch) 112 | time = self.apply_regex(regex, pos=0, content_type="float") 113 | if time is None: 114 | time = None 115 | regex = r"Presolve removed {0} rows and {0} columns".format(self.numberSearch) 116 | result = self.apply_regex(regex, content_type="int") 117 | if result is None: 118 | result = None, None 119 | return {"time": time, "rows": result[0], "cols": result[1]} 120 | 121 | def get_time(self): 122 | regex = r"Explored {0} nodes \({0} simplex iterations\) in {0} seconds".format( 123 | self.numberSearch 124 | ) 125 | return self.apply_regex(regex, content_type="float", pos=2) 126 | 127 | def get_nodes(self): 128 | regex = r"Explored {0} nodes \({0} simplex iterations\) in {0} seconds".format( 129 | self.numberSearch 130 | ) 131 | return self.apply_regex(regex, content_type="float", pos=0) 132 | 133 | def get_root_time(self): 134 | regex = r"Root relaxation: objective {0}, {0} iterations, {0} seconds".format( 135 | self.numberSearch 136 | ) 137 | return self.apply_regex(regex, pos=2, content_type="float") 138 | 139 | def process_line(self, line): 140 | keys = [ 141 | "n", 142 | "n_left", 143 | "obj", 144 | "iinf", 145 | "b_int", 146 | "b_bound", 147 | "ItCnt", 148 | "gap", 149 | "depth", 150 | "time", 151 | ] 152 | args = {k: self.numberSearch for k in keys} 153 | args["gap"] = "({}%)".format(self.number) 154 | args["time"] = "({}s)".format(self.number) 155 | 156 | if line[0] in ["*", "H"]: 157 | args["obj"] = "()" 158 | args["iinf"] = "()" 159 | args["depth"] = "()" 160 | 161 | if re.search(r"\*\s*\d+\+", line): 162 | args["obj"] = "()" 163 | args["ItCnt"] = "()" 164 | 165 | if re.search(r"Cuts: \d+", line): 166 | args["b_bound"] = r"(Cuts: \d+)" 167 | 168 | get = re.search(r"\*?\s*\d+\+?\s*\d+\s*(infeasible|cutoff|integral)", line) 169 | if get is not None: 170 | state = get.group(1) 171 | args["obj"] = "({})".format(state) 172 | if state in ["integral"]: 173 | pass 174 | else: 175 | args["iinf"] = "()" 176 | 177 | find = re.search( 178 | r"\s+{n}\s+{n_left}\s+{obj}\s+{depth}\s+{iinf}?\s+{b_int}?-?" 179 | r"\s+{b_bound}\s+{gap}?-?\s+{ItCnt}?-?\s+{time}".format(**args), 180 | line, 181 | ) 182 | if not find: 183 | return None 184 | return find.groups() 185 | -------------------------------------------------------------------------------- /tests/data/93_01.txt: -------------------------------------------------------------------------------- 1 | // This is an example using an older version of CP-SAT. 2 | // You will see a warning about the outdated version. 3 | Starting CP-SAT solver v9.3.10497 4 | Parameters: log_search_progress: true 5 | Setting number of workers to 16 6 | 7 | Initial optimization model '': 8 | #Variables: 290 (#ints:1 in objective) 9 | - 290 in [0,17] 10 | #kAllDiff: 34 11 | #kLinMax: 1 12 | #kLinear2: 2312 (#complex_domain: 2312) 13 | 14 | Starting presolve at 0.00s 15 | [ExtractEncodingFromLinear] #potential_supersets=0 #potential_subsets=0 #at_most_one_encodings=0 #exactly_one_encodings=0 #unique_terms=0 #multiple_terms=0 #literals=0 time=9.558e-06s 16 | [Probing] deterministic_time: 0.053825 (limit: 1) wall_time: 0.0947566 (12427/12427) 17 | [Probing] - new integer bounds: 1 18 | [Probing] - new binary clause: 9282 19 | [DetectDuplicateConstraints] #duplicates=0 time=0.00993671s 20 | [DetectDominatedLinearConstraints] #relevant_constraints=2312 #work_done=14118 #num_inclusions=0 #num_redundant=0 time=0.0013379s 21 | [DetectOverlappingColumns] #processed_columns=0 #work_done=0 #nz_reduction=0 time=0.00176239s 22 | [ProcessSetPPC] #relevant_constraints=612 #num_inclusions=0 work=29376 time=0.0022503s 23 | [Probing] deterministic_time: 0.0444515 (limit: 1) wall_time: 0.0820382 (11849/11849) 24 | [Probing] - new binary clause: 9282 25 | [DetectDuplicateConstraints] #duplicates=0 time=0.00786558s 26 | [DetectDominatedLinearConstraints] #relevant_constraints=2312 #work_done=14118 #num_inclusions=0 #num_redundant=0 time=0.000688681s 27 | [DetectOverlappingColumns] #processed_columns=0 #work_done=0 #nz_reduction=0 time=0.000992311s 28 | [ProcessSetPPC] #relevant_constraints=612 #num_inclusions=0 work=29376 time=0.00121334s 29 | 30 | Presolve summary: 31 | - 0 affine relations were detected. 32 | - rule 'all_diff: expanded' was applied 34 times. 33 | - rule 'deductions: 10404 stored' was applied 1 time. 34 | - rule 'linear: simplified rhs' was applied 7514 times. 35 | - rule 'presolve: 0 unused variables removed.' was applied 1 time. 36 | - rule 'presolve: iteration' was applied 2 times. 37 | - rule 'variables: add encoding constraint' was applied 5202 times. 38 | 39 | Presolved optimization model '': 40 | #Variables: 5492 (#ints:1 in objective) 41 | - 5202 in [0,1] 42 | - 289 in [0,17] 43 | - 1 in [1,17] 44 | #kAtMostOne: 612 (#literals: 9792) 45 | #kLinMax: 1 46 | #kLinear1: 10404 (#enforced: 10404) 47 | #kLinear2: 2312 (#complex_domain: 2312) 48 | 49 | Preloading model. 50 | #Bound 0.45s best:inf next:[1,17] initial_domain 51 | 52 | Starting Search at 0.47s with 16 workers. 53 | 9 full subsolvers: [default_lp, no_lp, max_lp, reduced_costs, pseudo_costs, quick_restart, quick_restart_no_lp, lb_tree_search, probing] 54 | Interleaved subsolvers: [feasibility_pump, rnd_var_lns_default, rnd_cst_lns_default, graph_var_lns_default, graph_cst_lns_default, rins_lns_default, rens_lns_default] 55 | #1 0.71s best:17 next:[1,16] quick_restart_no_lp fixed_bools:0/11849 56 | #2 0.72s best:16 next:[1,15] quick_restart_no_lp fixed_bools:289/11849 57 | #3 0.74s best:15 next:[1,14] no_lp fixed_bools:867/11849 58 | #Bound 1.30s best:15 next:[8,14] max_lp initial_propagation 59 | #Done 3.40s max_lp 60 | #Done 3.40s probing 61 | 62 | Sub-solver search statistics: 63 | 'max_lp': 64 | LP statistics: 65 | final dimension: 2498 rows, 5781 columns, 106908 entries with magnitude in [6.155988e-02, 1.000000e+00] 66 | total number of simplex iterations: 3401 67 | num solves: 68 | - #OPTIMAL: 6 69 | - #DUAL_UNBOUNDED: 1 70 | - #DUAL_FEASIBLE: 1 71 | managed constraints: 5882 72 | merged constraints: 3510 73 | coefficient strenghtenings: 19 74 | num simplifications: 1 75 | total cuts added: 3534 (out of 4444 calls) 76 | - 'CG': 1134 77 | - 'IB': 150 78 | - 'MIR_1': 558 79 | - 'MIR_2': 647 80 | - 'MIR_3': 490 81 | - 'MIR_4': 37 82 | - 'MIR_5': 60 83 | - 'MIR_6': 20 84 | - 'ZERO_HALF': 438 85 | 86 | 'reduced_costs': 87 | LP statistics: 88 | final dimension: 979 rows, 5781 columns, 6456 entries with magnitude in [3.333333e-01, 1.000000e+00] 89 | total number of simplex iterations: 1369 90 | num solves: 91 | - #OPTIMAL: 15 92 | - #DUAL_FEASIBLE: 51 93 | managed constraints: 2962 94 | merged constraints: 2819 95 | shortened constraints: 1693 96 | coefficient strenghtenings: 675 97 | num simplifications: 1698 98 | total cuts added: 614 (out of 833 calls) 99 | - 'CG': 7 100 | - 'IB': 439 101 | - 'LinMax': 1 102 | - 'MIR_1': 87 103 | - 'MIR_2': 80 104 | 105 | 'pseudo_costs': 106 | LP statistics: 107 | final dimension: 929 rows, 5781 columns, 6580 entries with magnitude in [3.333333e-01, 1.000000e+00] 108 | total number of simplex iterations: 1174 109 | num solves: 110 | - #OPTIMAL: 14 111 | - #DUAL_FEASIBLE: 33 112 | managed constraints: 2923 113 | merged constraints: 2810 114 | shortened constraints: 1695 115 | coefficient strenghtenings: 675 116 | num simplifications: 1698 117 | total cuts added: 575 (out of 785 calls) 118 | - 'CG': 5 119 | - 'IB': 400 120 | - 'LinMax': 1 121 | - 'MIR_1': 87 122 | - 'MIR_2': 82 123 | 124 | 'lb_tree_search': 125 | LP statistics: 126 | final dimension: 929 rows, 5781 columns, 6650 entries with magnitude in [3.333333e-01, 1.000000e+00] 127 | total number of simplex iterations: 1249 128 | num solves: 129 | - #OPTIMAL: 16 130 | - #DUAL_FEASIBLE: 14 131 | managed constraints: 2924 132 | merged constraints: 2809 133 | shortened constraints: 1692 134 | coefficient strenghtenings: 675 135 | num simplifications: 1698 136 | total cuts added: 576 (out of 785 calls) 137 | - 'CG': 8 138 | - 'IB': 400 139 | - 'LinMax': 2 140 | - 'MIR_1': 87 141 | - 'MIR_2': 79 142 | 143 | 144 | Solutions found per subsolver: 145 | 'no_lp': 1 146 | 'quick_restart_no_lp': 2 147 | 148 | Objective bounds found per subsolver: 149 | 'initial_domain': 1 150 | 'max_lp': 1 151 | 152 | Improving variable bounds shared per subsolver: 153 | 'no_lp': 579 154 | 'quick_restart_no_lp': 1159 155 | 156 | CpSolverResponse summary: 157 | status: OPTIMAL 158 | objective: 15 159 | best_bound: 15 160 | booleans: 12138 161 | conflicts: 0 162 | branches: 23947 163 | propagations: 408058 164 | integer_propagations: 317340 165 | restarts: 23698 166 | lp_iterations: 1174 167 | walltime: 3.5908 168 | usertime: 3.5908 169 | deterministic_time: 6.71917 170 | gap_integral: 11.2892 171 | -------------------------------------------------------------------------------- /tests/data/gurobi700-bab5.out: -------------------------------------------------------------------------------- 1 | @01 instances/miplib2010/bab5.mps.gz =========== 2 | ----------------------------- 3 | Tue Oct 25 15:54:58 MST 2016 4 | ----------------------------- 5 | @03 1477436098 6 | /home/beck/miplib2010-1.1.0/results/solutions/benchmark.gurobi.bab5.mps.sol 7 | Set parameter TimeLimit to value 7200 8 | Set parameter MIPGap to value 0.0 9 | Set parameter Threads to value 1 10 | 11 | Gurobi Optimizer version 7.0.0 build v7.0.0rc3 (linux64) 12 | Copyright (c) 2016, Gurobi Optimization, Inc. 13 | 14 | Read MPS format model from file instances/miplib2010/bab5.mps.gz 15 | Reading time = 0.57 seconds 16 | bab5: 4964 rows, 21600 columns, 155520 nonzeros 17 | Optimize a model with 4964 rows, 21600 columns and 155520 nonzeros 18 | Variable types: 0 continuous, 21600 integer (0 binary) 19 | Coefficient statistics: 20 | Matrix range [9e-02, 8e+00] 21 | Objective range [2e+01, 4e+03] 22 | Bounds range [1e+00, 1e+00] 23 | RHS range [1e+00, 5e+01] 24 | Presolve removed 226 rows and 202 columns 25 | Presolve time: 0.27s 26 | Presolved: 4738 rows, 21398 columns, 68369 nonzeros 27 | Variable types: 0 continuous, 21398 integer (21398 binary) 28 | 29 | Root relaxation: objective -1.164152e+05, 16508 iterations, 0.58 seconds 30 | 31 | Nodes | Current Node | Objective Bounds | Work 32 | Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time 33 | 34 | 0 0 -116415.20 0 94 - -116415.20 - - 1s 35 | 0 0 -114009.28 0 279 - -114009.28 - - 1s 36 | 0 0 -114007.98 0 269 - -114007.98 - - 1s 37 | 0 0 -113171.75 0 295 - -113171.75 - - 1s 38 | 0 0 -113171.75 0 243 - -113171.75 - - 1s 39 | 0 0 -112661.95 0 253 - -112661.95 - - 1s 40 | 0 0 -112661.95 0 278 - -112661.95 - - 1s 41 | 0 0 -112645.27 0 182 - -112645.27 - - 1s 42 | 0 0 -112515.60 0 289 - -112515.60 - - 2s 43 | 0 0 -112404.61 0 217 - -112404.61 - - 2s 44 | 0 0 -112404.61 0 312 - -112404.61 - - 2s 45 | 0 0 -112354.70 0 375 - -112354.70 - - 2s 46 | 0 0 -112354.70 0 386 - -112354.70 - - 2s 47 | 0 0 -112086.27 0 387 - -112086.27 - - 2s 48 | 0 0 -112054.79 0 354 - -112054.79 - - 2s 49 | 0 0 -111957.67 0 261 - -111957.67 - - 2s 50 | 0 0 -111953.80 0 315 - -111953.80 - - 2s 51 | 0 0 -111929.92 0 334 - -111929.92 - - 2s 52 | 0 0 -111786.11 0 335 - -111786.11 - - 2s 53 | 0 0 -111549.46 0 436 - -111549.46 - - 2s 54 | 0 0 -110882.85 0 416 - -110882.85 - - 2s 55 | 0 0 -110487.99 0 441 - -110487.99 - - 2s 56 | 0 0 -110317.11 0 436 - -110317.11 - - 2s 57 | 0 0 -109715.28 0 322 - -109715.28 - - 2s 58 | 0 0 -109587.53 0 412 - -109587.53 - - 2s 59 | 0 0 -109171.88 0 425 - -109171.88 - - 2s 60 | 0 0 -109051.11 0 508 - -109051.11 - - 3s 61 | 0 0 -108732.99 0 455 - -108732.99 - - 3s 62 | 0 0 -108732.41 0 481 - -108732.41 - - 3s 63 | 0 0 -108703.77 0 404 - -108703.77 - - 3s 64 | 0 0 -108702.57 0 436 - -108702.57 - - 3s 65 | 0 0 -108654.50 0 414 - -108654.50 - - 3s 66 | 0 0 -108651.09 0 390 - -108651.09 - - 3s 67 | 0 0 -108649.38 0 448 - -108649.38 - - 3s 68 | 0 0 -108619.39 0 449 - -108619.39 - - 11s 69 | 0 0 -108611.04 0 465 - -108611.04 - - 14s 70 | 0 0 -108604.94 0 479 - -108604.94 - - 15s 71 | 0 0 -108599.46 0 363 - -108599.46 - - 15s 72 | 0 0 -108599.46 0 342 - -108599.46 - - 16s 73 | 0 2 -108599.46 0 342 - -108599.46 - - 16s 74 | 13 12 -106038.08 12 349 - -108143.04 - 169 20s 75 | H 16 13 -105135.2071 -108143.04 2.86% 152 20s 76 | 57 39 -105720.35 53 264 -105135.21 -108143.04 2.86% 69.1 25s 77 | H 81 41 -105379.3851 -108143.04 2.62% 58.3 26s 78 | H 108 47 -105423.5836 -108076.13 2.52% 53.8 27s 79 | H 135 56 -105864.2001 -108076.13 2.09% 54.4 29s 80 | 153 75 -106727.54 75 106 -105864.20 -108076.13 2.09% 55.3 30s 81 | H 162 77 -105901.5551 -108076.13 2.05% 55.7 30s 82 | H 190 76 -106190.6971 -108076.13 1.78% 55.4 33s 83 | H 202 72 -106284.8661 -107118.25 0.78% 56.2 33s 84 | 220 86 -107023.72 15 177 -106284.87 -107066.66 0.74% 59.2 35s 85 | H 272 110 -106358.0141 -107066.66 0.67% 57.6 36s 86 | 356 152 -106467.01 27 250 -106358.01 -107029.65 0.63% 53.7 40s 87 | H 407 188 -106359.9571 -107024.35 0.62% 51.6 40s 88 | 511 252 -106874.88 12 342 -106359.96 -107021.17 0.62% 50.1 50s 89 | 525 262 -106826.97 35 342 -106359.96 -107021.17 0.62% 114 63s 90 | H 527 249 -106361.4631 -107021.17 0.62% 114 64s 91 | H 533 240 -106411.8401 -106462.79 0.05% 148 64s 92 | 93 | Cutting planes: 94 | Gomory: 22 95 | Cover: 57 96 | Clique: 61 97 | MIR: 3 98 | Flow cover: 4 99 | GUB cover: 4 100 | Zero half: 17 101 | 102 | Explored 534 nodes (116569 simplex iterations) in 65.35 seconds 103 | Thread count was 1 (of 8 available processors) 104 | 105 | Solution count 10: -106412 -106361 -106360 ... -105379 106 | Pool objective bound -106412 107 | 108 | Optimal solution found (tolerance 0.00e+00) 109 | Best objective -1.064118401000e+05, best bound -1.064118401000e+05, gap 0.0000% 110 | 111 | Wrote result file '/home/beck/miplib2010-1.1.0/results/solutions/benchmark.gurobi.bab5.mps.sol' 112 | 113 | 114 | @04 1477436164 115 | @05 7200 116 | 117 | Read MPS: 1 118 | MIP has 21600 vars and 4964 constraints 119 | Read SOL: 1 120 | Objective value computed by solver: -106412 121 | 122 | Integrality tolerance: 1/10000 123 | Linear tolerance: 1/10000 124 | Objective tolerance: 1/10000 125 | 126 | Check SOL: Integrality 1 Constraints 1 Objective 1 127 | Maximum violations: Integrality 0 Constraints 0 Objective 0 128 | 129 | ----------------------------- 130 | Tue Oct 25 15:56:05 MST 2016 131 | ----------------------------- 132 | 133 | =ready= 134 | -------------------------------------------------------------------------------- /tests/data/gurobi901-noCuts.out: -------------------------------------------------------------------------------- 1 | 2 | Gurobi 9.0.1 (win64) logging started 04/24/20 15:08:57 3 | 4 | Changed value of parameter LogFile to detalles_sol.log 5 | Prev: Default: 6 | Changed value of parameter TimeLimit to 720.0 7 | Prev: inf Min: 0.0 Max: inf Default: inf 8 | Gurobi Optimizer version 9.0.1 build v9.0.1rc0 (win64) 9 | Optimize a model with 537927 rows, 381096 columns and 1946442 nonzeros 10 | Model fingerprint: 0x7aef1d09 11 | Variable types: 0 continuous, 381096 integer (0 binary) 12 | Coefficient statistics: 13 | Matrix range [6e-02, 2e+03] 14 | Objective range [1e+00, 1e+00] 15 | Bounds range [1e+00, 1e+00] 16 | RHS range [7e-01, 6e+01] 17 | Presolve removed 431330 rows and 323250 columns (presolve time = 5s) ... 18 | Presolve removed 431682 rows and 370994 columns (presolve time = 14s) ... 19 | Presolve removed 463351 rows and 371605 columns (presolve time = 15s) ... 20 | Presolve removed 463158 rows and 370951 columns 21 | Presolve time: 16.36s 22 | Presolved: 74769 rows, 10145 columns, 314632 nonzeros 23 | Variable types: 0 continuous, 10145 integer (9857 binary) 24 | 25 | Deterministic concurrent LP optimizer: primal and dual simplex 26 | Showing first log only... 27 | 28 | 29 | Root simplex log... 30 | 31 | Iteration Objective Primal Inf. Dual Inf. Time 32 | 0 handle free variables 17s 33 | 2524 5.4471098e+00 0.000000e+00 0.000000e+00 17s 34 | 2524 5.4471098e+00 0.000000e+00 0.000000e+00 17s 35 | 2524 5.4471098e+00 0.000000e+00 0.000000e+00 17s 36 | Concurrent spin time: 0.00s 37 | 38 | Solved with primal simplex 39 | 40 | Root relaxation: objective 5.447110e+00, 2524 iterations, 0.42 seconds 41 | 42 | Nodes | Current Node | Objective Bounds | Work 43 | Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time 44 | 45 | 0 0 5.44711 0 1202 - 5.44711 - - 19s 46 | H 0 0 168.0000000 5.44711 96.8% - 21s 47 | 0 0 14.99055 0 646 168.00000 14.99055 91.1% - 22s 48 | 0 0 14.99055 0 941 168.00000 14.99055 91.1% - 30s 49 | H 0 0 167.0000000 14.99055 91.0% - 32s 50 | 0 0 29.00000 0 220 167.00000 29.00000 82.6% - 33s 51 | 0 0 29.00000 0 312 167.00000 29.00000 82.6% - 33s 52 | 0 0 29.00000 0 345 167.00000 29.00000 82.6% - 34s 53 | 0 0 29.00000 0 302 167.00000 29.00000 82.6% - 35s 54 | 0 0 29.00000 0 67 167.00000 29.00000 82.6% - 38s 55 | H 0 0 166.0000000 29.00000 82.5% - 38s 56 | 0 0 29.00000 0 52 166.00000 29.00000 82.5% - 38s 57 | H 0 0 162.0000000 29.00000 82.1% - 41s 58 | 0 0 29.00000 0 105 162.00000 29.00000 82.1% - 41s 59 | H 0 0 159.0000000 29.00000 81.8% - 42s 60 | H 0 0 158.0000000 29.00000 81.6% - 42s 61 | 0 0 29.00000 0 100 158.00000 29.00000 81.6% - 42s 62 | H 0 0 156.0000000 29.00000 81.4% - 47s 63 | H 0 0 150.0000000 29.00000 80.7% - 47s 64 | H 0 0 148.0000000 29.00000 80.4% - 47s 65 | H 0 0 147.0000000 29.00000 80.3% - 47s 66 | H 0 0 142.0000000 29.00000 79.6% - 47s 67 | 0 0 29.00000 0 55 142.00000 29.00000 79.6% - 47s 68 | 0 0 29.00000 0 43 142.00000 29.00000 79.6% - 48s 69 | H 0 0 124.0000000 29.00000 76.6% - 52s 70 | 0 0 29.00000 0 131 124.00000 29.00000 76.6% - 53s 71 | 0 0 29.00000 0 131 124.00000 29.00000 76.6% - 60s 72 | H 0 0 123.0000000 29.00000 76.4% - 61s 73 | 0 0 29.01865 0 782 123.00000 29.01865 76.4% - 64s 74 | H 0 0 122.0000000 29.01865 76.2% - 65s 75 | 0 0 29.01865 0 340 122.00000 29.01865 76.2% - 65s 76 | H 0 0 83.0000000 29.01865 65.0% - 66s 77 | H 0 0 73.0000000 29.01865 60.2% - 66s 78 | 0 0 29.01865 0 129 73.00000 29.01865 60.2% - 66s 79 | 0 0 29.01865 0 42 73.00000 29.01865 60.2% - 66s 80 | H 0 0 72.0000000 29.01865 59.7% - 66s 81 | H 0 0 71.0000000 29.01865 59.1% - 67s 82 | 0 0 29.01865 0 352 71.00000 29.01865 59.1% - 67s 83 | 0 0 29.01865 0 135 71.00000 29.01865 59.1% - 67s 84 | 0 0 29.01865 0 129 71.00000 29.01865 59.1% - 67s 85 | H 0 0 43.0000000 29.01865 32.5% - 68s 86 | 0 0 29.01865 0 109 43.00000 29.01865 32.5% - 68s 87 | H 0 0 42.0000000 29.01865 30.9% - 68s 88 | 0 0 29.01865 0 238 42.00000 29.01865 30.9% - 68s 89 | 0 0 29.01865 0 252 42.00000 29.01865 30.9% - 68s 90 | 0 0 29.03259 0 258 42.00000 29.03259 30.9% - 68s 91 | 0 0 29.03259 0 264 42.00000 29.03259 30.9% - 68s 92 | 0 0 29.18177 0 138 42.00000 29.18177 30.5% - 68s 93 | 0 0 29.18177 0 140 42.00000 29.18177 30.5% - 68s 94 | H 0 0 41.0000000 29.18177 28.8% - 68s 95 | 0 0 29.18177 0 90 41.00000 29.18177 28.8% - 68s 96 | H 0 0 40.0000000 29.18177 27.0% - 68s 97 | 0 0 30.28676 0 157 40.00000 30.28676 24.3% - 68s 98 | 0 0 30.32965 0 143 40.00000 30.32965 24.2% - 68s 99 | 0 0 30.34558 0 143 40.00000 30.34558 24.1% - 68s 100 | 0 0 32.08703 0 118 40.00000 32.08703 19.8% - 68s 101 | H 0 0 39.0000000 32.08703 17.7% - 68s 102 | 0 0 32.33710 0 122 39.00000 32.33710 17.1% - 68s 103 | 0 0 32.33710 0 126 39.00000 32.33710 17.1% - 68s 104 | 0 0 33.69634 0 122 39.00000 33.69634 13.6% - 68s 105 | H 0 0 38.0000000 33.69634 11.3% - 68s 106 | 0 0 33.93814 0 103 38.00000 33.93814 10.7% - 68s 107 | 0 0 34.00708 0 109 38.00000 34.00708 10.5% - 68s 108 | 0 0 34.01463 0 110 38.00000 34.01463 10.5% - 68s 109 | 0 0 34.01463 0 110 38.00000 34.01463 10.5% - 68s 110 | 0 0 34.28048 0 97 38.00000 34.28048 9.79% - 68s 111 | 0 0 34.85714 0 42 38.00000 34.85714 8.27% - 68s 112 | H 0 0 36.0000000 34.85714 3.17% - 68s 113 | 0 0 34.85714 0 42 36.00000 34.85714 3.17% - 68s 114 | 115 | Explored 1 nodes (69267 simplex iterations) in 68.88 seconds 116 | Thread count was 6 (of 6 available processors) 117 | 118 | Solution count 10: 36 38 39 ... 73 119 | 120 | Optimal solution found (tolerance 1.00e-04) 121 | Best objective 3.600000000000e+01, best bound 3.600000000000e+01, gap 0.0000% 122 | -------------------------------------------------------------------------------- /tests/data/cplex1271-app1-2.out: -------------------------------------------------------------------------------- 1 | @01 instances/miplib2010/app1-2.mps.gz =========== 2 | ----------------------------- 3 | Mon Apr 3 16:21:00 MST 2017 4 | ----------------------------- 5 | @03 1491261660 6 | 7 | Welcome to IBM(R) ILOG(R) CPLEX(R) Interactive Optimizer 12.7.1.0 8 | with Simplex, Mixed Integer & Barrier Optimizers 9 | 5725-A06 5725-A29 5724-Y48 5724-Y49 5724-Y54 5724-Y55 5655-Y21 10 | Copyright IBM Corp. 1988, 2017. All Rights Reserved. 11 | 12 | Type 'help' for a list of available commands. 13 | Type 'help' followed by a command name for more 14 | information on commands. 15 | 16 | CPLEX> CPLEX> Logfile 'cplex.log' closed. 17 | CPLEX> New value for default parallel thread count: 1 18 | CPLEX> New value for mixed integer optimality gap tolerance: 0 19 | CPLEX> New value for type of clock used to measure time: 2 20 | CPLEX> New value for time limit in seconds: 7200 21 | CPLEX> New value for parallel optimization mode: 1 22 | CPLEX> Selected objective sense: MINIMIZE 23 | Selected objective name: OBJROW 24 | Selected RHS name: RHS 25 | Selected bound name: Bound 26 | Problem 'instances/miplib2010/app1-2.mps.gz' read. 27 | Read time = 0.07 sec. (22.50 ticks) 28 | CPLEX> Problem is a minimization problem. 29 | New sense ['max' or 'min']: No changes made. 30 | CPLEX> CPXPARAM_TimeLimit 7200 31 | CPXPARAM_Threads 1 32 | CPXPARAM_Parallel 1 33 | CPXPARAM_Read_APIEncoding "UTF-8" 34 | CPXPARAM_MIP_Tolerances_MIPGap 0 35 | Tried aggregator 2 times. 36 | MIP Presolve eliminated 17865 rows and 2577 columns. 37 | MIP Presolve modified 129521 coefficients. 38 | Aggregator did 12721 substitutions. 39 | Reduced MIP has 22881 rows, 11573 columns, and 147017 nonzeros. 40 | Reduced MIP has 11308 binaries, 0 generals, 0 SOSs, and 0 indicators. 41 | Presolve time = 1.53 sec. (8469.02 ticks) 42 | Probing fixed 512 vars, tightened 4 bounds. 43 | Probing time = 0.71 sec. (2059.60 ticks) 44 | Cover probing fixed 0 vars, tightened 49 bounds. 45 | Tried aggregator 1 time. 46 | MIP Presolve eliminated 515 rows and 513 columns. 47 | MIP Presolve modified 31487 coefficients. 48 | Reduced MIP has 22366 rows, 11060 columns, and 142909 nonzeros. 49 | Reduced MIP has 10795 binaries, 0 generals, 0 SOSs, and 0 indicators. 50 | Presolve time = 0.08 sec. (84.06 ticks) 51 | Probing time = 0.03 sec. (34.39 ticks) 52 | Clique table members: 95948. 53 | MIP emphasis: balance optimality and feasibility. 54 | MIP search method: dynamic search. 55 | Parallel mode: none, using 1 thread. 56 | Root relaxation solution time = 0.46 sec. (958.30 ticks) 57 | 58 | Nodes Cuts/ 59 | Node Left Objective IInf Best Integer Best Bound ItCnt Gap 60 | 61 | 0 0 -193.0616 253 -193.0616 1089 62 | 0 0 -64.9921 254 Cuts: 162 1891 63 | 0 0 -55.6268 240 Cuts: 214 2173 64 | 65 | Repeating presolve. 66 | Tried aggregator 1 time. 67 | MIP Presolve eliminated 9139 rows and 8046 columns. 68 | MIP Presolve modified 9192 coefficients. 69 | Reduced MIP has 13227 rows, 3014 columns, and 73188 nonzeros. 70 | Reduced MIP has 2759 binaries, 0 generals, 0 SOSs, and 0 indicators. 71 | Presolve time = 0.11 sec. (907.53 ticks) 72 | Probing fixed 4 vars, tightened 27 bounds. 73 | Probing time = 0.06 sec. (136.08 ticks) 74 | Cover probing fixed 0 vars, tightened 7 bounds. 75 | Tried aggregator 1 time. 76 | MIP Presolve eliminated 43 rows and 4 columns. 77 | MIP Presolve modified 252 coefficients. 78 | Reduced MIP has 13184 rows, 3010 columns, and 72963 nonzeros. 79 | Reduced MIP has 2755 binaries, 0 generals, 0 SOSs, and 0 indicators. 80 | Presolve time = 0.03 sec. (48.08 ticks) 81 | Represolve time = 0.22 sec. (1105.97 ticks) 82 | Probing time = 0.01 sec. (10.71 ticks) 83 | Clique table members: 19410. 84 | MIP emphasis: balance optimality and feasibility. 85 | MIP search method: dynamic search. 86 | Parallel mode: none, using 1 thread. 87 | Root relaxation solution time = 0.04 sec. (64.71 ticks) 88 | 89 | Nodes Cuts/ 90 | Node Left Objective IInf Best Integer Best Bound ItCnt Gap 91 | 92 | 0 0 -55.6268 414 -55.6268 3313 93 | 0 0 -54.0152 295 Cuts: 180 3648 94 | 0 0 -52.7442 349 Cuts: 202 3980 95 | 0 0 -52.4825 341 Cuts: 69 4059 96 | 0 0 -52.4541 347 Cuts: 27 4108 97 | 0 0 -52.4514 362 Cuts: 11 4129 98 | 0 0 -52.4514 365 Cuts: 6 4136 99 | 0 0 -52.4514 200 Cuts: 3 4142 100 | 0 0 -52.4514 271 Cuts: 92 4237 101 | 0 2 -52.4514 181 -52.3584 4237 102 | Elapsed time = 6.41 sec. (18157.44 ticks, tree = 0.01 MB, solutions = 0) 103 | 11 9 -49.4459 187 -49.4290 5512 104 | 28 12 infeasible -49.4290 6513 105 | 44 19 -41.3930 190 -49.4290 7534 106 | 76 33 -36.9401 122 -49.4290 8289 107 | 111 34 -35.9673 117 -49.4290 8874 108 | 136 39 -33.0000 108 -49.4290 9368 109 | 148 42 -33.0000 109 -49.4290 10363 110 | 155 43 -33.0000 106 -49.4290 11095 111 | 169 45 infeasible -49.4290 12001 112 | 238 62 infeasible -49.4290 15008 113 | Elapsed time = 8.01 sec. (21332.23 ticks, tree = 0.77 MB, solutions = 0) 114 | 351 93 -44.4322 178 -49.3455 17388 115 | 476 126 -45.2075 219 -48.5331 19808 116 | 616 179 -31.7402 159 -48.2960 21707 117 | 772 240 infeasible -48.2960 23193 118 | 884 278 -45.9930 179 -48.0808 25630 119 | 968 307 infeasible -47.3859 29069 120 | 1091 346 -45.4475 234 -46.6083 32501 121 | 1250 427 -36.0000 90 -46.6083 33471 122 | 1380 477 -44.0693 198 -44.0412 38659 123 | 1384 475 -41.1900 13 -43.7102 39333 124 | Elapsed time = 19.60 sec. (42764.36 ticks, tree = 1.57 MB, solutions = 0) 125 | * 1390+ 315 -41.0000 -43.7102 6.61% 126 | 1393 159 -43.6639 149 -41.0000 -43.6639 39510 6.50% 127 | 1403 91 cutoff -41.0000 -43.6639 40119 6.50% 128 | 1410 33 -42.5456 196 -41.0000 -42.9311 41037 4.71% 129 | 130 | GUB cover cuts applied: 1 131 | Clique cuts applied: 23 132 | Cover cuts applied: 9 133 | Implied bound cuts applied: 1 134 | Flow cuts applied: 119 135 | Mixed integer rounding cuts applied: 77 136 | Zero-half cuts applied: 2 137 | Lift and project cuts applied: 1 138 | Gomory fractional cuts applied: 22 139 | 140 | Root node processing (before b&c): 141 | Real time = 6.41 sec. (18142.53 ticks) 142 | Sequential b&c: 143 | Real time = 14.83 sec. (27797.53 ticks) 144 | ------------ 145 | Total (root+branch&cut) = 21.24 sec. (45940.05 ticks) 146 | 147 | Solution pool: 1 solution saved. 148 | 149 | MIP - Integer optimal solution: Objective = -4.1000000000e+01 150 | Solution time = 21.24 sec. Iterations = 41185 Nodes = 1415 151 | Deterministic time = 45940.13 ticks (2163.22 ticks/sec) 152 | 153 | CPLEX> Incumbent solution written to file '/home/beck/miplib2010-1.1.0/results/solutions/benchmark.cplex.app1-2.mps.sol.sol'. 154 | CPLEX> Logfile '/home/beck/miplib2010-1.1.0/results/solutions/benchmark.cplex.app1-2.mps.sol' open. 155 | CPLEX> MIP - Integer optimal solution: Objective = -4.1000000000e+01 156 | CPLEX> Logfile '/home/beck/miplib2010-1.1.0/results/solutions/benchmark.cplex.app1-2.mps.sol' closed. 157 | CPLEX> 158 | @04 1491261681 159 | @05 7200 160 | 161 | Read MPS: 1 162 | MIP has 26871 vars and 53467 constraints 163 | Read SOL: 1 164 | Objective value computed by solver: -41 165 | 166 | Integrality tolerance: 1/10000 167 | Linear tolerance: 1/10000 168 | Objective tolerance: 1/10000 169 | 170 | Check SOL: Integrality 1 Constraints 1 Objective 1 171 | Maximum violations: Integrality 9.999e-13 Constraints 4e-17 Objective 0 172 | 173 | ----------------------------- 174 | Mon Apr 3 16:21:22 MST 2017 175 | ----------------------------- 176 | 177 | =ready= 178 | -------------------------------------------------------------------------------- /tests/data/cplex1280-fmp_double_log.out: -------------------------------------------------------------------------------- 1 | 2 | Log started (V12.8.0.0) Wed Oct 23 05:39:55 2019 3 | 4 | New value for time limit in seconds: 3600 5 | New value for mixed integer optimality gap tolerance: 0 6 | New value for absolute mixed integer optimality gap tolerance: 10 7 | New value for default parallel thread count: 1 8 | New value for type of flow cover cut generation: 1 9 | New value for type of mixed integer rounding cut generation: 1 10 | New value for factor for backtracking, lower values give more: 0.1 11 | New value for frequency to apply periodic heuristic algorithm: 100 12 | New value for node presolve strategy: 2 13 | New value for probing strategy: 3 14 | New value for candidate limit for generating Gomory fractional cuts: 10000 15 | New value for pass limit for generating Gomory fractional cuts: 10 16 | CPXPARAM_TimeLimit 3600 17 | CPXPARAM_Threads 1 18 | CPXPARAM_MIP_Strategy_Backtrack 0.10000000000000001 19 | CPXPARAM_MIP_Tolerances_AbsMIPGap 10 20 | CPXPARAM_MIP_Tolerances_MIPGap 0 21 | CPXPARAM_MIP_Strategy_HeuristicFreq 100 22 | CPXPARAM_MIP_Strategy_PresolveNode 2 23 | CPXPARAM_MIP_Cuts_FlowCovers 1 24 | CPXPARAM_MIP_Strategy_Probe 3 25 | CPXPARAM_MIP_Limits_GomoryCand 10000 26 | CPXPARAM_MIP_Limits_GomoryPass 10 27 | CPXPARAM_MIP_Cuts_MIRCut 1 28 | Tried aggregator 1 time. 29 | LP Presolve eliminated 6223 rows and 116 columns. 30 | Aggregator did 121 substitutions. 31 | Reduced LP has 55158 rows, 29806 columns, and 4370140 nonzeros. 32 | Presolve time = 1.00 sec. (503.25 ticks) 33 | Initializing dual steep norms . . . 34 | 35 | Iteration log . . . 36 | Iteration: 1 Dual objective = -2595.662858 37 | Perturbation started. 38 | Iteration: 101 Dual objective = -2595.662858 39 | Iteration: 498 Dual objective = -2589.609265 40 | Iteration: 1378 Dual objective = -2583.821746 41 | Iteration: 2110 Dual objective = -2582.939238 42 | Iteration: 2712 Dual objective = 4553.541314 43 | Iteration: 3352 Dual objective = 61768.748013 44 | Iteration: 3746 Dual objective = 61769.126960 45 | Iteration: 4146 Dual objective = 61769.335482 46 | Iteration: 4594 Dual objective = 105446.191024 47 | Iteration: 4984 Dual objective = 105446.662350 48 | Removing perturbation. 49 | Iteration: 5287 Objective = 105446.272645 50 | 51 | Dual simplex - Optimal: Objective = 1.0544627262e+05 52 | Solution time = 4.43 sec. Iterations = 5294 (0) 53 | Deterministic time = 2797.07 ticks (631.25 ticks/sec) 54 | 55 | 56 | Solution written to file 'D:/franco.peschiera.fr/TEMP/b11cbc835163427cacb39a25d674d883-pulp.sol'. 57 | 58 | Log started (V12.8.0.0) Wed Oct 23 05:40:11 2019 59 | 60 | New value for time limit in seconds: 3600 61 | New value for mixed integer optimality gap tolerance: 0 62 | New value for absolute mixed integer optimality gap tolerance: 10 63 | New value for default parallel thread count: 1 64 | New value for type of flow cover cut generation: 1 65 | New value for type of mixed integer rounding cut generation: 1 66 | New value for factor for backtracking, lower values give more: 0.1 67 | New value for frequency to apply periodic heuristic algorithm: 100 68 | New value for node presolve strategy: 2 69 | New value for probing strategy: 3 70 | New value for candidate limit for generating Gomory fractional cuts: 10000 71 | New value for pass limit for generating Gomory fractional cuts: 10 72 | CPXPARAM_TimeLimit 3600 73 | CPXPARAM_Threads 1 74 | CPXPARAM_MIP_Strategy_Backtrack 0.10000000000000001 75 | CPXPARAM_MIP_Tolerances_AbsMIPGap 10 76 | CPXPARAM_MIP_Tolerances_MIPGap 0 77 | CPXPARAM_MIP_Strategy_HeuristicFreq 100 78 | CPXPARAM_MIP_Strategy_PresolveNode 2 79 | CPXPARAM_MIP_Cuts_FlowCovers 1 80 | CPXPARAM_MIP_Strategy_Probe 3 81 | CPXPARAM_MIP_Limits_GomoryCand 10000 82 | CPXPARAM_MIP_Limits_GomoryPass 10 83 | CPXPARAM_MIP_Cuts_MIRCut 1 84 | Tried aggregator 6 times. 85 | MIP Presolve eliminated 4498 rows and 2034 columns. 86 | MIP Presolve modified 1439 coefficients. 87 | Aggregator did 839 substitutions. 88 | Reduced MIP has 3884 rows, 8789 columns, and 97473 nonzeros. 89 | Reduced MIP has 5959 binaries, 0 generals, 0 SOSs, and 0 indicators. 90 | Presolve time = 0.37 sec. (278.68 ticks) 91 | Probing fixed 6 vars, tightened 0 bounds. 92 | Probing time = 0.26 sec. (144.00 ticks) 93 | Cover probing fixed 6 vars, tightened 61 bounds. 94 | Tried aggregator 2 times. 95 | MIP Presolve eliminated 19 rows and 32 columns. 96 | MIP Presolve modified 128 coefficients. 97 | Aggregator did 5 substitutions. 98 | Reduced MIP has 3857 rows, 8752 columns, and 97138 nonzeros. 99 | Reduced MIP has 5956 binaries, 410 generals, 0 SOSs, and 0 indicators. 100 | Presolve time = 0.11 sec. (79.69 ticks) 101 | Probing fixed 1 vars, tightened 0 bounds. 102 | Probing time = 0.13 sec. (95.59 ticks) 103 | Probing added 5042 nonzeros. 104 | Clique table members: 1429. 105 | MIP emphasis: balance optimality and feasibility. 106 | MIP search method: dynamic search. 107 | Parallel mode: none, using 1 thread. 108 | Root relaxation solution time = 0.13 sec. (103.08 ticks) 109 | 110 | Nodes Cuts/ 111 | Node Left Objective IInf Best Integer Best Bound ItCnt Gap 112 | 113 | 0 0 460102.1243 145 460102.1243 2682 114 | 0 0 476324.2967 206 Cuts: 206 2917 115 | 0 0 479461.2258 276 Cuts: 60 3052 116 | 0 0 480982.2942 303 Cuts: 75 3164 117 | 0 0 480985.7203 261 Cuts: 39 3223 118 | 0 0 482157.8621 181 Cuts: 32 3350 119 | 0 0 482157.8666 193 Cuts: 38 3385 120 | 0 0 482157.8819 185 Cuts: 13 3416 121 | 0 0 482157.8899 203 Cuts: 12 3446 122 | 0 0 482157.8924 204 Cuts: 6 3462 123 | 0 0 482157.8942 204 Cuts: 5 3472 124 | * 0+ 0 482160.9305 482157.8942 0.00% 125 | 126 | GUB cover cuts applied: 6 127 | Clique cuts applied: 11 128 | Cover cuts applied: 1 129 | Implied bound cuts applied: 35 130 | Flow cuts applied: 6 131 | Mixed integer rounding cuts applied: 30 132 | Zero-half cuts applied: 18 133 | Lift and project cuts applied: 1 134 | Gomory fractional cuts applied: 27 135 | 136 | Root node processing (before b&c): 137 | Real time = 4.26 sec. (2900.36 ticks) 138 | Sequential b&c: 139 | Real time = 0.00 sec. (0.00 ticks) 140 | ------------ 141 | Total (root+branch&cut) = 4.26 sec. (2900.36 ticks) 142 | 143 | Solution pool: 1 solution saved. 144 | 145 | MIP - Integer optimal, tolerance (0/10): Objective = 4.8216093054e+05 146 | Current MIP best bound = 4.8215789418e+05 (gap = 3.03636, 0.00%) 147 | Solution time = 4.26 sec. Iterations = 3472 Nodes = 0 (1) 148 | Deterministic time = 2900.40 ticks (681.00 ticks/sec) 149 | 150 | MILP problem relaxed to LP with fixed integer variables using 151 | incumbent solution. 152 | CPXPARAM_TimeLimit 3600 153 | CPXPARAM_Threads 1 154 | CPXPARAM_MIP_Strategy_Backtrack 0.10000000000000001 155 | CPXPARAM_MIP_Tolerances_AbsMIPGap 10 156 | CPXPARAM_MIP_Tolerances_MIPGap 0 157 | CPXPARAM_MIP_Strategy_HeuristicFreq 100 158 | CPXPARAM_MIP_Strategy_PresolveNode 2 159 | CPXPARAM_MIP_Cuts_FlowCovers 1 160 | CPXPARAM_MIP_Strategy_Probe 3 161 | CPXPARAM_MIP_Limits_GomoryCand 10000 162 | CPXPARAM_MIP_Limits_GomoryPass 10 163 | CPXPARAM_MIP_Cuts_MIRCut 1 164 | Tried aggregator 1 time. 165 | LP Presolve eliminated 6747 rows and 8506 columns. 166 | Aggregator did 1159 substitutions. 167 | Reduced LP has 1315 rows, 2003 columns, and 5566 nonzeros. 168 | Presolve time = 0.03 sec. (12.74 ticks) 169 | Initializing dual steep norms . . . 170 | 171 | Iteration log . . . 172 | Iteration: 1 Dual objective = -2529.069458 173 | Perturbation started. 174 | Iteration: 101 Dual objective = -2529.069458 175 | Iteration: 249 Dual objective = 38266.971569 176 | Iteration: 369 Dual objective = 208303.300756 177 | Iteration: 472 Dual objective = 439192.420665 178 | Iteration: 559 Dual objective = 476596.233712 179 | Removing perturbation. 180 | 181 | Dual simplex - Optimal: Objective = 4.8216093054e+05 182 | Solution time = 0.05 sec. Iterations = 675 (0) 183 | Deterministic time = 29.51 ticks (627.78 ticks/sec) 184 | 185 | 186 | Solution written to file 'D:/franco.peschiera.fr/TEMP/a93050364f494118beae3b2bab5f6e2c-pulp.sol'. 187 | -------------------------------------------------------------------------------- /orloge/cplex.py: -------------------------------------------------------------------------------- 1 | from .base import LogFile 2 | from .constants import ( 3 | LpStatusMemoryLimit, 4 | LpStatusSolved, 5 | LpStatusInfeasible, 6 | LpStatusTimeLimit, 7 | LpStatusUnbounded, 8 | LpStatusNotSolved, 9 | ) 10 | import re 11 | import numpy as np 12 | 13 | 14 | class CPLEX(LogFile): 15 | # Reference: 16 | # https://www.ibm.com/support/knowledgecenter/SSSA5P_12.6.3/ilog.odms.cplex.help/CPLEX/UsrMan/topics/discr_optim/mip/para/52_node_log.html 17 | name = "CPLEX" 18 | 19 | def __init__(self, path, **options): 20 | super().__init__(path, **options) 21 | self.solver_status_map = { 22 | "MIP - Memory limit exceeded": LpStatusMemoryLimit, 23 | "MIP - Integer optimal": LpStatusSolved, 24 | "MIP - Integer infeasible.": LpStatusInfeasible, 25 | "MIP - Time limit exceeded": LpStatusTimeLimit, 26 | "MIP - Integer unbounded": LpStatusUnbounded, 27 | "MIP - Integer infeasible or unbounded": LpStatusInfeasible, 28 | "CPLEX Error 1001: Out of memory": LpStatusMemoryLimit, 29 | "No file read": LpStatusNotSolved, 30 | } 31 | 32 | self.version_regex = [ 33 | r"Welcome to IBM\(R\) ILOG\(R\) CPLEX\(R\) Interactive Optimizer (\S+)", 34 | r"Log started \((\S+)\)", 35 | r"Version identifier: (\S+)", 36 | ] 37 | self.header_log_start = ["Welcome to IBM", "Log started"] 38 | self.progress_names = [ 39 | "Node", 40 | "NodesLeft", 41 | "Objective", 42 | "IInf", 43 | "BestInteger", 44 | "CutsBestBound", 45 | "ItpNode", 46 | "Gap", 47 | ] 48 | self.progress_filter = r"(^[\*H]?\s*\d.*$)" 49 | # in case of multiple logs in the same file, 50 | # we choose to get the last one. 51 | self.content = self.clean_before_last_log() 52 | 53 | def clean_before_last_log(self): 54 | options = self.header_log_start 55 | for opt in options: 56 | # this finds the last occurence of the string 57 | pos = self.content.rfind(opt) 58 | if pos != -1: 59 | return self.content[pos:] 60 | return self.content 61 | 62 | def get_version(self): 63 | result = None 64 | for reg in self.version_regex: 65 | result = self.apply_regex(reg) 66 | if result: 67 | return result 68 | return result 69 | 70 | def get_stats(self): 71 | status = self.get_status() 72 | objective = self.get_objective() 73 | bound, gap_abs, gap_rel = self.get_gap() 74 | return status, objective, bound, gap_rel 75 | 76 | def get_status(self): 77 | for k in self.solver_status_map.keys(): 78 | search_string = re.escape(k) 79 | if self.apply_regex(search_string): 80 | return k 81 | 82 | def get_objective(self): 83 | """ 84 | :return: tuple of length 2 85 | """ 86 | regex = r"Objective\s+=\s+{0}\s*\n".format(self.numberSearch) 87 | result = self.apply_regex(regex, flags=re.MULTILINE) 88 | if result is not None: 89 | result = float(result) 90 | return result 91 | 92 | def get_gap(self): 93 | """ 94 | :return: tuple of length 3: bound, absolute gap, relative gap 95 | """ 96 | regex = r"Current MIP best bound =\s+{0} \(gap = {0}, {0}%\)".format( 97 | self.numberSearch 98 | ) 99 | result = self.apply_regex(regex, content_type="float") 100 | if result is None: 101 | return None, None, None 102 | return result 103 | 104 | def get_matrix(self): 105 | """ 106 | :return: tuple of length 3 107 | """ 108 | # TODO: this is not correctly calculated: we need to sum the change to the initial to get 109 | # the original. 110 | regex = r"Reduced MIP has {0} rows, {0} columns, and {0} nonzeros".format( 111 | self.numberSearch 112 | ) 113 | return self.apply_regex(regex, content_type="int", num=0) 114 | 115 | def get_matrix_post(self): 116 | """ 117 | :return: tuple of length 3 118 | """ 119 | regex = r"Reduced MIP has {0} rows, {0} columns, and {0} nonzeros".format( 120 | self.numberSearch 121 | ) 122 | return self.apply_regex(regex, content_type="int", num=-1) 123 | 124 | def get_cuts(self): 125 | """ 126 | :return: dictionary of cuts 127 | """ 128 | regex = r"{1} cuts applied: {0}".format(self.numberSearch, self.wordSearch) 129 | result = self.apply_regex(regex, first=False) 130 | if result is None: 131 | return None 132 | return {k[0]: int(k[1]) for k in result} 133 | 134 | def get_lp_presolve(self): 135 | """ 136 | :return: tuple of length 3 137 | """ 138 | # TODO: this is not correctly calculated: 139 | # we need to sum the two? preprocessings in my cases 140 | regex = r"Presolve time = {0} sec. \({0} ticks\)".format(self.numberSearch) 141 | time = self.apply_regex(regex, pos=0, content_type="float") 142 | 143 | regex = r"LP Presolve eliminated {0} rows and {0} columns".format( 144 | self.numberSearch 145 | ) 146 | result = self.apply_regex(regex, content_type="int") 147 | if result is None: 148 | result = None, None 149 | return {"time": time, "rows": result[0], "cols": result[1]} 150 | 151 | def get_time(self): 152 | regex = r"Solution time =\s+{0} sec\.\s+Iterations = {0}\s+Nodes = {0}".format( 153 | self.numberSearch 154 | ) 155 | result = self.apply_regex(regex, content_type="float", pos=0) 156 | if result is not None: 157 | return result 158 | regex = r"Total \(root\+branch&cut\) =\s+{0} sec\. \({0} ticks\)".format( 159 | self.numberSearch 160 | ) 161 | return self.apply_regex(regex, content_type="float", pos=0) 162 | 163 | def get_nodes(self): 164 | regex = r"Solution time =\s+{0} sec\.\s+Iterations = {0}\s+Nodes = {0}".format( 165 | self.numberSearch 166 | ) 167 | return self.apply_regex(regex, content_type="float", pos=2) 168 | 169 | def get_root_time(self): 170 | regex = r"Root relaxation solution time = {0} sec\. \({0} ticks\)".format( 171 | self.numberSearch 172 | ) 173 | return self.apply_regex(regex, pos=0, content_type="float") 174 | 175 | def get_cuts_time(self): 176 | regex = r"Elapsed time = {0} sec\. \({0} ticks, tree = {0} MB, solutions = {0}\)".format( 177 | self.numberSearch 178 | ) 179 | return self.apply_regex(regex, content_type="float", pos=0) 180 | 181 | def process_line(self, line): 182 | keys = ["n", "n_left", "obj", "iinf", "b_int", "b_bound", "ItCnt", "gap"] 183 | args = {k: self.numberSearch for k in keys} 184 | args["gap"] = "({}%)".format(self.number) 185 | 186 | if re.search(r"\*\s*\d+\+", line): 187 | args["obj"] = "()" 188 | args["ItCnt"] = "()" 189 | args["iinf"] = "()" 190 | 191 | # TODO: maybe include explicit optioms: Impl Bds, Cuts, ZeroHalf, Flowcuts, 192 | if re.search(r"[a-zA-Z\s]+: \d+", line): 193 | args["b_bound"] = r"([a-zA-Z\s]+: \d+)" 194 | 195 | get = re.search(r"\*?\s*\d+\+?\s*\d+\s*(infeasible|cutoff|integral)", line) 196 | if get is not None: 197 | state = get.group(1) 198 | args["obj"] = "({})".format(state) 199 | if state in ["integral"]: 200 | args["iinf"] = "(0)" 201 | else: 202 | args["iinf"] = "()" 203 | if state in ["cutoff", "infeasible"]: 204 | args["b_bound"] += "?" 205 | 206 | find = re.search( 207 | r"\s*{n}\s*{n_left}\s+{obj}\s+{iinf}?\s+{b_int}?\s+{b_bound}\s+{ItCnt}\s*{gap}?".format( 208 | **args 209 | ), 210 | line, 211 | ) 212 | if not find: 213 | return None 214 | return find.groups() 215 | 216 | def get_progress(self): 217 | progress = super().get_progress() 218 | if len(progress): 219 | try: 220 | times = self.get_time_column() 221 | progress["Time"] = times 222 | except TypeError: 223 | progress["Time"] = None 224 | return progress 225 | 226 | def get_time_column(self): 227 | """ 228 | :return: Time column with same length as progress dataframe. 229 | """ 230 | regex1 = self.progress_filter 231 | args = [self.numberSearch for l in range(4)] 232 | regex = ( 233 | r"Elapsed time = {} sec. \({} ticks, tree = {} MB, solutions = {}\)".format( 234 | *args 235 | ) 236 | ) 237 | end_time = self.get_time() 238 | table_start_rx = r"\s*Node" 239 | table_start = False 240 | i = 0 241 | time = [(i, 0)] 242 | for l in self.content.split("\n"): 243 | if re.search(table_start_rx, l): 244 | table_start = True 245 | if not table_start: 246 | continue 247 | if re.search(regex1, l): 248 | i += 1 249 | continue 250 | result = re.search(regex, l) 251 | if not result: 252 | continue 253 | data = result.groups() 254 | time.append((i, float(data[0]))) 255 | time.append((i, end_time)) 256 | x, y = zip(*time) 257 | numbers = np.interp(xp=x, fp=y, x=range(1, x[-1] + 1)).round(2) 258 | # we coerce to string to match the other solvers output: 259 | return numbers.astype("str") 260 | -------------------------------------------------------------------------------- /tests/data/gurobi700-dfn-gwin-UUM.out: -------------------------------------------------------------------------------- 1 | @01 instances/miplib2010/dfn-gwin-UUM.mps.gz =========== 2 | ----------------------------- 3 | Tue Oct 25 17:31:53 MST 2016 4 | ----------------------------- 5 | @03 1477441913 6 | /home/beck/miplib2010-1.1.0/results/solutions/benchmark.gurobi.dfn-gwin-UUM.mps.sol 7 | Set parameter TimeLimit to value 7200 8 | Set parameter MIPGap to value 0.0 9 | Set parameter Threads to value 1 10 | 11 | Gurobi Optimizer version 7.0.0 build v7.0.0rc3 (linux64) 12 | Copyright (c) 2016, Gurobi Optimization, Inc. 13 | 14 | Read MPS format model from file instances/miplib2010/dfn-gwin-UUM.mps.gz 15 | Reading time = 0.07 seconds 16 | dfn-gwin-UUM: 158 rows, 938 columns, 2632 nonzeros 17 | Optimize a model with 158 rows, 938 columns and 2632 nonzeros 18 | Variable types: 848 continuous, 90 integer (0 binary) 19 | Coefficient statistics: 20 | Matrix range [1e+00, 6e+02] 21 | Objective range [7e+02, 8e+03] 22 | Bounds range [0e+00, 0e+00] 23 | RHS range [1e+00, 7e+02] 24 | Found heuristic solution: objective 174600 25 | Presolve removed 2 rows and 2 columns 26 | Presolve time: 0.00s 27 | Presolved: 156 rows, 936 columns, 2629 nonzeros 28 | Variable types: 846 continuous, 90 integer (0 binary) 29 | 30 | Root relaxation: objective 2.746726e+04, 533 iterations, 0.01 seconds 31 | 32 | Nodes | Current Node | Objective Bounds | Work 33 | Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time 34 | 35 | 0 0 27467.2572 0 45 174600.000 27467.2572 84.3% - 0s 36 | H 0 0 94848.000000 27467.2572 71.0% - 0s 37 | 0 0 31311.4434 0 36 94848.0000 31311.4434 67.0% - 0s 38 | 0 0 31997.8309 0 32 94848.0000 31997.8309 66.3% - 0s 39 | 0 0 32077.1421 0 32 94848.0000 32077.1421 66.2% - 0s 40 | 0 0 32593.1221 0 38 94848.0000 32593.1221 65.6% - 0s 41 | 0 0 32603.3729 0 37 94848.0000 32603.3729 65.6% - 0s 42 | 0 0 32784.5967 0 42 94848.0000 32784.5967 65.4% - 0s 43 | 0 0 32832.7515 0 41 94848.0000 32832.7515 65.4% - 0s 44 | 0 0 33312.3420 0 43 94848.0000 33312.3420 64.9% - 0s 45 | 0 0 33365.1230 0 43 94848.0000 33365.1230 64.8% - 0s 46 | 0 0 33550.7145 0 44 94848.0000 33550.7145 64.6% - 0s 47 | 0 0 33572.2178 0 45 94848.0000 33572.2178 64.6% - 0s 48 | 0 0 33713.1046 0 48 94848.0000 33713.1046 64.5% - 0s 49 | 0 2 33713.8408 0 48 94848.0000 33713.8408 64.5% - 0s 50 | H 29 29 61632.000000 34138.0750 44.6% 36.0 0s 51 | H 36 36 51992.000000 34138.0750 34.3% 39.4 0s 52 | H 64 64 47596.000000 34138.0750 28.3% 34.1 0s 53 | H 67 67 47300.000000 34138.0750 27.8% 33.2 0s 54 | H 74 71 45600.000000 34138.0750 25.1% 32.7 0s 55 | H 76 73 43172.000000 34138.0750 20.9% 32.1 0s 56 | H 96 90 42976.000000 34138.0750 20.6% 27.4 0s 57 | H 271 240 42472.000000 34312.8261 19.2% 26.2 0s 58 | H 407 334 42132.000000 34399.9513 18.4% 27.0 0s 59 | H 695 510 41896.000000 34932.4498 16.6% 35.6 1s 60 | H 921 536 40944.000000 35092.4479 14.3% 37.2 2s 61 | H 1137 509 39532.000000 35224.5010 10.9% 35.3 2s 62 | 2788 1578 cutoff 45 39532.0000 35732.2026 9.61% 34.6 5s 63 | 6037 3793 37770.8757 38 22 39532.0000 36190.8896 8.45% 34.2 10s 64 | 9552 6082 37015.1893 26 16 39532.0000 36446.2418 7.81% 33.2 15s 65 | 10288 6583 38043.3232 30 57 39532.0000 36487.4346 7.70% 32.8 20s 66 | H10832 6428 39396.000000 36487.4346 7.38% 35.6 24s 67 | H10941 6073 38752.000000 36487.4346 5.84% 35.9 24s 68 | 11033 6094 37183.0701 49 50 38752.0000 36487.4346 5.84% 36.3 25s 69 | 12278 6492 38361.1032 67 21 38752.0000 36560.6388 5.65% 39.9 30s 70 | 13574 6839 37454.3797 44 37 38752.0000 36794.9912 5.05% 42.5 35s 71 | 15110 7233 37317.0227 46 26 38752.0000 36954.0784 4.64% 43.7 40s 72 | 16725 7616 38169.4454 48 26 38752.0000 37086.6219 4.30% 44.6 45s 73 | 18097 7811 38653.3420 44 40 38752.0000 37187.3527 4.04% 45.7 50s 74 | 19501 8044 38047.7390 49 19 38752.0000 37268.4704 3.83% 46.6 55s 75 | 20706 8269 38439.7075 68 10 38752.0000 37337.5192 3.65% 47.0 60s 76 | 22508 8534 cutoff 45 38752.0000 37416.4470 3.45% 47.1 65s 77 | 24135 8680 cutoff 60 38752.0000 37472.5101 3.30% 47.2 70s 78 | 25867 8824 38596.1488 51 29 38752.0000 37525.4860 3.17% 47.4 75s 79 | 27804 8935 38602.7154 51 12 38752.0000 37583.7266 3.01% 47.2 80s 80 | 29583 9621 cutoff 49 38752.0000 37625.8314 2.91% 47.2 85s 81 | 31437 10240 cutoff 76 38752.0000 37662.2460 2.81% 47.1 90s 82 | 33332 10883 38573.2925 55 15 38752.0000 37693.2658 2.73% 46.9 95s 83 | 35252 11498 38584.6078 52 28 38752.0000 37724.9412 2.65% 46.8 100s 84 | 37342 12060 37871.2412 54 22 38752.0000 37763.6901 2.55% 46.4 105s 85 | 39200 12570 38189.8102 79 13 38752.0000 37793.2930 2.47% 46.4 110s 86 | 41036 13105 38440.3250 44 26 38752.0000 37820.3871 2.40% 46.3 115s 87 | 43083 13686 38666.0167 60 17 38752.0000 37848.4020 2.33% 46.0 120s 88 | 45101 14096 38181.1487 49 35 38752.0000 37878.6620 2.25% 45.8 125s 89 | 47142 14582 38511.9316 75 17 38752.0000 37907.2466 2.18% 45.6 130s 90 | 48696 14873 38612.0943 45 27 38752.0000 37926.6135 2.13% 45.4 135s 91 | 50758 15282 38343.7024 59 23 38752.0000 37950.6336 2.07% 45.1 140s 92 | 52831 15687 38362.7226 64 14 38752.0000 37973.9575 2.01% 44.9 145s 93 | 55018 16066 cutoff 70 38752.0000 37994.0912 1.96% 44.6 150s 94 | 57102 16450 38627.6190 82 13 38752.0000 38013.6230 1.91% 44.4 155s 95 | 59138 16769 38106.3304 59 38 38752.0000 38031.8647 1.86% 44.2 160s 96 | 61218 17086 38742.3218 68 13 38752.0000 38047.7333 1.82% 44.0 165s 97 | 63329 17407 38277.3653 57 34 38752.0000 38062.8788 1.78% 43.8 170s 98 | 65441 17615 38557.8511 48 33 38752.0000 38081.2145 1.73% 43.6 175s 99 | 67515 17803 38352.6803 62 10 38752.0000 38097.1200 1.69% 43.4 180s 100 | 69797 17932 38680.5141 63 21 38752.0000 38116.2750 1.64% 43.1 185s 101 | 71805 18122 38698.7640 71 9 38752.0000 38130.2664 1.60% 43.0 190s 102 | 73219 18219 38180.5169 59 30 38752.0000 38139.2425 1.58% 42.9 195s 103 | 75445 18445 cutoff 44 38752.0000 38152.9642 1.55% 42.7 200s 104 | 77728 18648 38318.9596 70 13 38752.0000 38167.2125 1.51% 42.4 205s 105 | 79675 18827 38550.9115 80 15 38752.0000 38178.8196 1.48% 42.2 210s 106 | 81953 18922 cutoff 51 38752.0000 38192.8589 1.44% 42.0 215s 107 | 84175 19076 cutoff 53 38752.0000 38205.1286 1.41% 41.8 220s 108 | 86512 19190 38716.0292 80 10 38752.0000 38217.4697 1.38% 41.6 225s 109 | 88829 19321 cutoff 71 38752.0000 38229.8536 1.35% 41.4 230s 110 | 91115 19341 38502.7323 70 6 38752.0000 38243.2822 1.31% 41.2 235s 111 | 93368 19406 38419.3754 71 19 38752.0000 38254.3412 1.28% 41.1 240s 112 | 95640 19362 38546.1828 67 12 38752.0000 38267.1079 1.25% 40.9 245s 113 | 97971 19406 cutoff 41 38752.0000 38278.5312 1.22% 40.7 250s 114 | 99674 19403 38479.1346 54 38 38752.0000 38287.0708 1.20% 40.6 256s 115 | 101590 19338 38602.7092 72 18 38752.0000 38296.7409 1.17% 40.4 260s 116 | 104020 19298 38474.7989 92 18 38752.0000 38308.8041 1.14% 40.2 265s 117 | 106473 19215 cutoff 84 38752.0000 38320.4959 1.11% 40.0 270s 118 | 108839 19180 38388.5364 61 16 38752.0000 38332.0348 1.08% 39.9 275s 119 | 111227 19025 38408.0127 54 11 38752.0000 38342.8841 1.06% 39.7 280s 120 | 113658 18813 38528.4014 46 35 38752.0000 38354.8239 1.02% 39.5 285s 121 | 116123 18574 cutoff 68 38752.0000 38365.8799 1.00% 39.4 290s 122 | 118503 18310 38517.8942 70 7 38752.0000 38376.0005 0.97% 39.2 295s 123 | 121019 18035 38536.6581 84 21 38752.0000 38387.0547 0.94% 39.0 300s 124 | 123542 17722 38486.0595 72 22 38752.0000 38398.2146 0.91% 38.9 305s 125 | 125370 17461 38637.1806 73 18 38752.0000 38406.3182 0.89% 38.8 310s 126 | 127840 16945 38691.6694 71 6 38752.0000 38418.1941 0.86% 38.6 315s 127 | 130448 16472 cutoff 60 38752.0000 38430.3739 0.83% 38.4 320s 128 | 132921 16063 cutoff 60 38752.0000 38441.6632 0.80% 38.3 325s 129 | 135569 15507 38531.0344 68 12 38752.0000 38453.5525 0.77% 38.1 330s 130 | 138186 14869 38717.5734 78 17 38752.0000 38465.6491 0.74% 37.9 335s 131 | 140778 14305 38495.3934 67 28 38752.0000 38476.7816 0.71% 37.7 340s 132 | 143447 13583 38534.1712 56 20 38752.0000 38489.4966 0.68% 37.6 345s 133 | 145621 12943 38592.1193 75 23 38752.0000 38499.8318 0.65% 37.4 350s 134 | 148303 12081 cutoff 68 38752.0000 38513.6954 0.61% 37.3 355s 135 | 151011 11126 cutoff 88 38752.0000 38527.5068 0.58% 37.1 360s 136 | 153810 10133 cutoff 77 38752.0000 38542.3196 0.54% 36.9 365s 137 | 156665 8863 38567.8068 70 5 38752.0000 38559.6568 0.50% 36.7 370s 138 | 159401 7502 cutoff 68 38752.0000 38577.8908 0.45% 36.4 375s 139 | 162569 5651 cutoff 75 38752.0000 38604.4064 0.38% 36.2 380s 140 | 166136 3261 cutoff 63 38752.0000 38643.6309 0.28% 35.8 385s 141 | 142 | Cutting planes: 143 | Gomory: 87 144 | MIR: 798 145 | 146 | Explored 170061 nodes (5993331 simplex iterations) in 388.98 seconds 147 | Thread count was 1 (of 8 available processors) 148 | 149 | Solution count 10: 38752 39396 39532 ... 45600 150 | Pool objective bound 38752 151 | 152 | Optimal solution found (tolerance 0.00e+00) 153 | Best objective 3.875200000000e+04, best bound 3.875200000000e+04, gap 0.0000% 154 | 155 | Wrote result file '/home/beck/miplib2010-1.1.0/results/solutions/benchmark.gurobi.dfn-gwin-UUM.mps.sol' 156 | 157 | 158 | @04 1477442302 159 | @05 7200 160 | 161 | Read MPS: 1 162 | MIP has 938 vars and 158 constraints 163 | Read SOL: 1 164 | Objective value computed by solver: 38752 165 | 166 | Integrality tolerance: 1/10000 167 | Linear tolerance: 1/10000 168 | Objective tolerance: 1/10000 169 | 170 | Check SOL: Integrality 1 Constraints 1 Objective 1 171 | Maximum violations: Integrality 0 Constraints 0 Objective 0 172 | 173 | ----------------------------- 174 | Tue Oct 25 17:38:22 MST 2016 175 | ----------------------------- 176 | 177 | =ready= 178 | -------------------------------------------------------------------------------- /tests/data/gurobi800-bab5.out: -------------------------------------------------------------------------------- 1 | @01 instances/benchmark/bab5.mps =========== 2 | ----------------------------- 3 | Wed Apr 25 13:38:21 MST 2018 4 | ----------------------------- 5 | @03 1524688701 6 | /home/beck/miplib2010-1.1.0/results/solutions/benchmark.gurobi.bab5.mps.sol 7 | Set parameter TimeLimit to value 7200 8 | Set parameter MIPGap to value 0.0 9 | Set parameter Threads to value 1 10 | 11 | Gurobi Optimizer version 8.0.0 build v8.0.0rc0 (linux64) 12 | Copyright (c) 2018, Gurobi Optimization, LLC 13 | 14 | Read MPS format model from file instances/benchmark/bab5.mps 15 | Reading time = 0.04 seconds 16 | bab5: 4964 rows, 21600 columns, 155520 nonzeros 17 | Optimize a model with 4964 rows, 21600 columns and 155520 nonzeros 18 | Variable types: 0 continuous, 21600 integer (0 binary) 19 | Coefficient statistics: 20 | Matrix range [9e-02, 8e+00] 21 | Objective range [2e+01, 4e+03] 22 | Bounds range [1e+00, 1e+00] 23 | RHS range [1e+00, 5e+01] 24 | Presolve removed 226 rows and 202 columns 25 | Presolve time: 0.18s 26 | Presolved: 4738 rows, 21398 columns, 68369 nonzeros 27 | Variable types: 0 continuous, 21398 integer (21398 binary) 28 | 29 | Root relaxation: objective -1.164152e+05, 16059 iterations, 0.38 seconds 30 | 31 | Nodes | Current Node | Objective Bounds | Work 32 | Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time 33 | 34 | 0 0 -116415.20 0 100 - -116415.20 - - 0s 35 | 0 0 -114007.98 0 237 - -114007.98 - - 0s 36 | 0 0 -114007.98 0 239 - -114007.98 - - 1s 37 | 0 0 -113180.48 0 246 - -113180.48 - - 1s 38 | 0 0 -113176.46 0 240 - -113176.46 - - 1s 39 | 0 0 -112669.88 0 286 - -112669.88 - - 1s 40 | 0 0 -112625.91 0 326 - -112625.91 - - 1s 41 | 0 0 -112577.04 0 272 - -112577.04 - - 1s 42 | 0 0 -112577.04 0 269 - -112577.04 - - 1s 43 | 0 0 -112549.71 0 303 - -112549.71 - - 1s 44 | 0 0 -112549.71 0 328 - -112549.71 - - 1s 45 | 0 0 -112485.76 0 300 - -112485.76 - - 1s 46 | 0 0 -112485.76 0 298 - -112485.76 - - 1s 47 | 0 0 -112379.54 0 327 - -112379.54 - - 1s 48 | 0 0 -112348.93 0 303 - -112348.93 - - 1s 49 | 0 0 -112333.92 0 304 - -112333.92 - - 1s 50 | 0 0 -112113.07 0 285 - -112113.07 - - 1s 51 | 0 0 -112089.49 0 351 - -112089.49 - - 1s 52 | 0 0 -112086.82 0 392 - -112086.82 - - 1s 53 | 0 0 -112041.56 0 352 - -112041.56 - - 1s 54 | 0 0 -112041.56 0 361 - -112041.56 - - 1s 55 | 0 0 -111768.03 0 341 - -111768.03 - - 2s 56 | 0 0 -111626.46 0 438 - -111626.46 - - 2s 57 | 0 0 -111526.49 0 421 - -111526.49 - - 2s 58 | 0 0 -111525.57 0 428 - -111525.57 - - 2s 59 | 0 0 -111422.11 0 449 - -111422.11 - - 2s 60 | 0 0 -111406.27 0 433 - -111406.27 - - 2s 61 | 0 0 -111406.27 0 484 - -111406.27 - - 2s 62 | 0 0 -111275.29 0 428 - -111275.29 - - 2s 63 | 0 0 -110876.88 0 487 - -110876.88 - - 2s 64 | 0 0 -110868.34 0 447 - -110868.34 - - 2s 65 | 0 0 -110868.20 0 422 - -110868.20 - - 2s 66 | 0 0 -110512.32 0 383 - -110512.32 - - 2s 67 | 0 0 -110480.06 0 423 - -110480.06 - - 2s 68 | 0 0 -110470.36 0 432 - -110470.36 - - 2s 69 | 0 0 -110317.95 0 504 - -110317.95 - - 2s 70 | 0 0 -110208.13 0 482 - -110208.13 - - 2s 71 | 0 0 -110178.85 0 489 - -110178.85 - - 2s 72 | 0 0 -110177.99 0 503 - -110177.99 - - 2s 73 | 0 0 -110035.19 0 493 - -110035.19 - - 3s 74 | 0 0 -109999.91 0 488 - -109999.91 - - 3s 75 | 0 0 -109999.91 0 488 - -109999.91 - - 3s 76 | 0 0 -108769.81 0 455 - -108769.81 - - 3s 77 | 0 0 -108767.23 0 449 - -108767.23 - - 3s 78 | 0 0 -108333.35 0 381 - -108333.35 - - 3s 79 | 0 0 -108124.12 0 395 - -108124.12 - - 3s 80 | 0 0 -108023.74 0 350 - -108023.74 - - 3s 81 | 0 0 -108013.56 0 345 - -108013.56 - - 3s 82 | 0 0 -108005.02 0 393 - -108005.02 - - 3s 83 | 0 0 -108005.02 0 392 - -108005.02 - - 3s 84 | 0 0 -108000.15 0 417 - -108000.15 - - 3s 85 | 0 0 -107999.97 0 448 - -107999.97 - - 3s 86 | 0 0 -107998.10 0 505 - -107998.10 - - 3s 87 | 0 0 -107998.10 0 508 - -107998.10 - - 3s 88 | 0 0 -107985.66 0 529 - -107985.66 - - 3s 89 | 0 0 -107985.66 0 373 - -107985.66 - - 12s 90 | 0 0 -107799.47 0 262 - -107799.47 - - 14s 91 | 0 0 -107533.39 0 252 - -107533.39 - - 15s 92 | 0 0 -107520.46 0 275 - -107520.46 - - 16s 93 | 0 0 -107508.55 0 274 - -107508.55 - - 17s 94 | 0 0 -107422.89 0 266 - -107422.89 - - 17s 95 | 0 0 -107334.45 0 269 - -107334.45 - - 17s 96 | 0 0 -107334.45 0 269 - -107334.45 - - 18s 97 | 0 0 -107334.45 0 245 - -107334.45 - - 18s 98 | H 0 0 -106130.5441 -107334.45 1.13% - 18s 99 | 0 0 -107334.45 0 138 -106130.54 -107334.45 1.13% - 19s 100 | 0 0 -107334.45 0 299 -106130.54 -107334.45 1.13% - 19s 101 | 0 0 -107334.45 0 397 -106130.54 -107334.45 1.13% - 19s 102 | 0 0 -107334.45 0 417 -106130.54 -107334.45 1.13% - 19s 103 | 0 0 -107334.45 0 384 -106130.54 -107334.45 1.13% - 19s 104 | 0 0 -107334.45 0 376 -106130.54 -107334.45 1.13% - 20s 105 | 0 0 -107334.45 0 406 -106130.54 -107334.45 1.13% - 20s 106 | 0 0 -107136.77 0 288 -106130.54 -107136.77 0.95% - 20s 107 | 0 0 -107136.77 0 293 -106130.54 -107136.77 0.95% - 20s 108 | 0 0 -107136.77 0 220 -106130.54 -107136.77 0.95% - 20s 109 | H 0 0 -106259.6071 -107136.77 0.83% - 20s 110 | 0 0 -107108.71 0 373 -106259.61 -107108.71 0.80% - 20s 111 | 0 0 -107088.01 0 387 -106259.61 -107088.01 0.78% - 20s 112 | 0 0 -107087.15 0 362 -106259.61 -107087.15 0.78% - 20s 113 | 0 0 -107038.63 0 299 -106259.61 -107038.63 0.73% - 20s 114 | 0 0 -107038.63 0 278 -106259.61 -107038.63 0.73% - 20s 115 | 0 0 -107031.44 0 363 -106259.61 -107031.44 0.73% - 20s 116 | 0 0 -107027.80 0 354 -106259.61 -107027.80 0.72% - 20s 117 | 0 0 -107026.09 0 289 -106259.61 -107026.09 0.72% - 20s 118 | 0 0 -106993.15 0 316 -106259.61 -106993.15 0.69% - 20s 119 | 0 0 -106993.15 0 319 -106259.61 -106993.15 0.69% - 21s 120 | 0 0 -106974.63 0 278 -106259.61 -106974.63 0.67% - 21s 121 | 0 0 -106974.63 0 277 -106259.61 -106974.63 0.67% - 21s 122 | 0 0 -106974.63 0 286 -106259.61 -106974.63 0.67% - 21s 123 | 0 0 -106974.63 0 285 -106259.61 -106974.63 0.67% - 21s 124 | 0 0 -106974.63 0 134 -106259.61 -106974.63 0.67% - 21s 125 | 0 0 -106974.63 0 118 -106259.61 -106974.63 0.67% - 21s 126 | 0 0 -106974.63 0 141 -106259.61 -106974.63 0.67% - 21s 127 | 0 0 -106974.63 0 141 -106259.61 -106974.63 0.67% - 23s 128 | H 0 0 -106319.0101 -106974.63 0.62% - 23s 129 | H 0 0 -106319.1941 -106974.63 0.62% - 23s 130 | 0 0 -106974.63 0 110 -106319.19 -106974.63 0.62% - 24s 131 | H 0 0 -106326.9661 -106974.63 0.61% - 24s 132 | 0 0 -106974.63 0 220 -106326.97 -106974.63 0.61% - 24s 133 | 0 0 -106974.63 0 201 -106326.97 -106974.63 0.61% - 24s 134 | 0 0 -106974.63 0 152 -106326.97 -106974.63 0.61% - 24s 135 | 0 0 -106974.63 0 271 -106326.97 -106974.63 0.61% - 24s 136 | 0 0 -106974.63 0 98 -106326.97 -106974.63 0.61% - 24s 137 | 0 0 -106974.63 0 232 -106326.97 -106974.63 0.61% - 24s 138 | 0 0 -106923.63 0 283 -106326.97 -106923.63 0.56% - 24s 139 | 0 0 -106558.50 0 144 -106326.97 -106558.50 0.22% - 24s 140 | 0 0 -106558.50 0 125 -106326.97 -106558.50 0.22% - 24s 141 | 0 0 -106506.06 0 100 -106326.97 -106506.06 0.17% - 25s 142 | 0 0 -106506.06 0 54 -106326.97 -106506.06 0.17% - 25s 143 | 0 0 -106506.06 0 41 -106326.97 -106506.06 0.17% - 25s 144 | 0 0 -106491.79 0 61 -106326.97 -106491.79 0.16% - 25s 145 | 0 0 -106491.79 0 61 -106326.97 -106491.79 0.16% - 25s 146 | 0 0 -106445.36 0 128 -106326.97 -106445.36 0.11% - 25s 147 | 0 0 -106432.87 0 119 -106326.97 -106432.87 0.10% - 25s 148 | 0 0 -106411.84 0 93 -106326.97 -106411.84 0.08% - 25s 149 | * 0 0 0 -106411.8401 -106411.84 0.00% - 25s 150 | 0 0 - 0 -106411.84 -106411.84 0.00% - 25s 151 | 152 | Cutting planes: 153 | Gomory: 9 154 | Cover: 45 155 | Clique: 62 156 | MIR: 5 157 | GUB cover: 1 158 | Zero half: 16 159 | 160 | Explored 1 nodes (104032 simplex iterations) in 25.52 seconds 161 | Thread count was 1 (of 8 available processors) 162 | 163 | Solution count 6: -106412 -106327 -106319 ... -106131 164 | 165 | Optimal solution found (tolerance 0.00e+00) 166 | Best objective -1.064118401000e+05, best bound -1.064118401000e+05, gap 0.0000% 167 | 168 | Wrote result file '/home/beck/miplib2010-1.1.0/results/solutions/benchmark.gurobi.bab5.mps.sol' 169 | 170 | 171 | @04 1524688726 172 | @05 7200 173 | 174 | Read MPS: 1 175 | MIP has 21600 vars and 4964 constraints 176 | Read SOL: 1 177 | Objective value computed by solver: -106412 178 | 179 | Integrality tolerance: 1/10000 180 | Linear tolerance: 1/10000 181 | Objective tolerance: 1/10000 182 | 183 | Check SOL: Integrality 1 Constraints 1 Objective 1 184 | Maximum violations: Integrality 0 Constraints 0 Objective 0 185 | 186 | ----------------------------- 187 | Wed Apr 25 13:38:47 MST 2018 188 | ----------------------------- 189 | 190 | =ready= 191 | -------------------------------------------------------------------------------- /orloge/base.py: -------------------------------------------------------------------------------- 1 | # /usr/bin/python3 2 | import re 3 | import pandas as pd 4 | import numpy as np 5 | from .constants import ( 6 | LpSolutionOptimal, 7 | LpSolutionIntegerFeasible, 8 | LpSolutionNoSolutionFound, 9 | solver_to_solution, 10 | ) 11 | 12 | 13 | class LogFile(object): 14 | """ 15 | This represents the log files that solvers return. 16 | We implement functions to get different information 17 | """ 18 | 19 | name = None 20 | 21 | def __init__(self, path, **options): 22 | 23 | if options.get("content", False): 24 | content = path 25 | else: 26 | with open(path, "r") as f: 27 | content = f.read() 28 | 29 | self.path = path 30 | self.content = content 31 | self.number = r"-?[\de\.\+]+" 32 | self.numberSearch = r"({})".format(self.number) 33 | self.wordSearch = r"([\w, -]+)" 34 | 35 | self.solver_status_map = {} 36 | self.version_regex = "" 37 | self.progress_filter = "" 38 | self.progress_names = [] 39 | self.options = options 40 | 41 | def apply_regex( 42 | self, regex, content_type=None, first=True, pos=None, num=None, **kwargs 43 | ): 44 | """ 45 | regex is the regular expression to apply to the file contents. 46 | content_type are optional type casting for the results (int, float, str) 47 | if first is false, we take the raw output from the re.findall. Useful for progress table. 48 | num means, if there are multiple matches in re.findall, num tells which position to take out. 49 | if num=-1, we take the last one 50 | pos means the group we want to take out from all the groups of the relevant match. 51 | kwargs are additional parameters to the re.findall function 52 | :return: a list, a tuple or a single value with type "content_type" 53 | """ 54 | solution = re.findall(regex, self.content, **kwargs) 55 | if solution is None: 56 | return None 57 | if not first: 58 | return solution 59 | if len(solution) == 0: 60 | return None 61 | if num is None: 62 | num = 0 63 | possible_tuple = solution[num] 64 | if type(possible_tuple) is str: 65 | # we force a tuple to deal with one string lists 66 | possible_tuple = (possible_tuple,) 67 | pos = 0 68 | func = {"float": float, "int": int, "str": str} 69 | if pos is not None: 70 | value = possible_tuple[pos] 71 | if content_type in func: 72 | return func[content_type](value) 73 | else: 74 | return possible_tuple[pos] 75 | if content_type is None: 76 | return possible_tuple 77 | if type(content_type) is not list: 78 | return [func[content_type](val) for val in possible_tuple] 79 | else: 80 | # each one has its own type. 81 | # by default, we use strings 82 | ct = ["str" for r in possible_tuple] 83 | for i, _c in enumerate(content_type): 84 | if _c in func: 85 | ct[i] = _c 86 | return [func[ct[i]](val) for i, val in enumerate(possible_tuple)] 87 | 88 | def get_first_relax(self, progress) -> float | None: 89 | """ 90 | scans the progress table for the initial relaxed solution 91 | :return: relaxation 92 | """ 93 | bestBounds = progress.CutsBestBound[~progress.CutsBestBound.isna()] 94 | 95 | df_filter = bestBounds.apply( 96 | lambda x: re.search(r"^\s*{}$".format(self.number), x) is not None 97 | ) 98 | if len(df_filter) > 0 and any(df_filter): 99 | return float(bestBounds[df_filter].iloc[0]) 100 | return None 101 | 102 | def get_first_solution(self, progress): 103 | """ 104 | scans the progress table for the initial integer solution 105 | :param progress: table with progress 106 | :return: dictionary with information on the moment of finding integer solution 107 | """ 108 | vars_extract = ["Node", "NodesLeft", "BestInteger", "CutsBestBound"] 109 | df_filter = progress.BestInteger.fillna("").str.match( 110 | r"^\s*{}$".format(self.number) 111 | ) 112 | # HACK: take out CBCs magic number (1e+50 for no integer solution found) 113 | df_filter_1e50 = progress.BestInteger.fillna("").str.match(r"^\s*1e\+50$") 114 | df_filter = np.all([df_filter, ~df_filter_1e50], axis=0) 115 | if len(df_filter) > 0 and any(df_filter): 116 | for col in vars_extract: 117 | floatSearch = r"[+-]?[\d]+(\.[\d]+)?([Ee][+-]?[\d]+)?" 118 | regex = "^({}).*$".format(floatSearch) 119 | progress[col] = progress[col].str.extract(regex)[[0]] 120 | # progress[col] = progress[col].str.replace('(?!{})'.format(self.number), '') 121 | return pd.to_numeric(progress[vars_extract][df_filter].iloc[0]).to_dict() 122 | return None 123 | 124 | @staticmethod 125 | def get_results_after_cuts(progress): 126 | """ 127 | gets relaxed and integer solutions after the cuts phase has ended. 128 | :return: tuple of length two 129 | """ 130 | df_filter = np.all( 131 | ( 132 | progress.Node.str.match(r"^\*?H?\s*0"), 133 | progress.NodesLeft.str.match(r"^\+?H?\s*[012]"), 134 | ), 135 | axis=0, 136 | ) 137 | 138 | # in case we have some progress after the cuts, we get those values 139 | # if not, we return None to later fill with best_solution and best_bound 140 | if not np.any(df_filter): 141 | return None, None 142 | sol_value = progress.BestInteger[df_filter].iloc[-1] 143 | relax_value = progress.CutsBestBound[df_filter].iloc[-1] 144 | 145 | # finally, we return the found values 146 | if sol_value and re.search(r"^\s*-?\d", sol_value): 147 | sol_value = float(sol_value) 148 | if relax_value and re.search(r"^\s*-?\d", relax_value): 149 | relax_value = float(relax_value) 150 | else: 151 | relax_value = None 152 | 153 | return relax_value, sol_value 154 | 155 | def get_log_info(self) -> dict: 156 | """ 157 | Main function that builds the general output for every solver 158 | :return: a dictionary 159 | """ 160 | version = self.get_version() 161 | matrix = self.get_matrix_dict() 162 | matrix_post = self.get_matrix_dict(post=True) 163 | status, objective, bound, gap_rel = self.get_stats() 164 | solver_status, solution_status = self.get_status_codes(status, objective) 165 | if bound is None and solution_status == LpSolutionOptimal: 166 | bound = objective 167 | if solution_status == LpSolutionOptimal: 168 | gap_rel = 0 169 | presolve = self.get_lp_presolve() 170 | time_out = self.get_time() 171 | nodes = self.get_nodes() 172 | root_time = self.get_root_time() 173 | if self.options.get("get_progress", True): 174 | progress = self.get_progress() 175 | else: 176 | progress = pd.DataFrame() 177 | first_relax = first_solution = None 178 | cut_info = self.get_cuts_dict(progress, bound, objective) 179 | 180 | if len(progress): 181 | first_relax = self.get_first_relax(progress) 182 | if solution_status in [LpSolutionIntegerFeasible, LpSolutionOptimal]: 183 | first_solution = self.get_first_solution(progress) 184 | 185 | return { 186 | "version": version, 187 | "solver": self.name, 188 | "status": status, 189 | "best_bound": bound, 190 | "best_solution": objective, 191 | "gap": gap_rel, 192 | "time": time_out, 193 | "matrix_post": matrix_post, 194 | "matrix": matrix, 195 | "cut_info": cut_info, 196 | "rootTime": root_time, 197 | "presolve": presolve, 198 | "first_relaxed": first_relax, 199 | "progress": progress, 200 | "first_solution": first_solution, 201 | "status_code": solver_status, 202 | "sol_code": solution_status, 203 | "nodes": nodes, 204 | } 205 | 206 | def get_cuts_dict(self, progress, best_bound, best_solution) -> dict: 207 | """ 208 | builds a dictionary with all information regarding to the applied cuts 209 | :return: a dictionary 210 | """ 211 | if not len(progress): 212 | return None 213 | cuts = self.get_cuts() 214 | if not cuts: 215 | # if no cuts were found, no cuts statistics are produced 216 | return {} 217 | cutsTime = self.get_cuts_time() 218 | after_cuts, sol_after_cuts = self.get_results_after_cuts(progress) 219 | if after_cuts is None: 220 | after_cuts = best_bound 221 | 222 | return { 223 | "time": cutsTime, 224 | "cuts": cuts, 225 | "best_bound": after_cuts, 226 | "best_solution": sol_after_cuts, 227 | } 228 | 229 | def get_matrix_dict(self, post=False) -> dict: 230 | """ 231 | wrapper to both matrix parsers (before and after preprocess) 232 | :return: a dictionary with three elements or None 233 | """ 234 | if post: 235 | matrix = self.get_matrix_post() 236 | else: 237 | matrix = self.get_matrix() 238 | 239 | if matrix is None: 240 | return None 241 | 242 | order = ["constraints", "variables", "nonzeros"] 243 | return {k: matrix[p] for p, k in enumerate(order)} 244 | 245 | def get_version(self) -> str: 246 | """ 247 | gets the solver's version 248 | """ 249 | return self.apply_regex(self.version_regex) 250 | 251 | def get_matrix(self) -> dict | None: 252 | return None 253 | 254 | def get_matrix_post(self) -> dict | None: 255 | return None 256 | 257 | def get_stats(self): 258 | return None, None, None, None 259 | 260 | def get_status_codes(self, status, obj) -> tuple[int, int]: 261 | """ 262 | converts the status string into a solver code and a solution code 263 | to standardize the output among solvers 264 | :return: tuple of length 2 265 | """ 266 | 267 | solver_status = self.solver_status_map.get(status) 268 | solution_status = solver_to_solution.get(solver_status) 269 | 270 | if obj is not None and solution_status == LpSolutionNoSolutionFound: 271 | solution_status = LpSolutionIntegerFeasible 272 | 273 | return solver_status, solution_status 274 | 275 | def get_cuts(self): 276 | return None 277 | 278 | def get_cuts_time(self) -> float | None: 279 | return None 280 | 281 | def get_lp_presolve(self) -> float | None: 282 | return None 283 | 284 | def get_time(self) -> float | None: 285 | return None 286 | 287 | def get_nodes(self) -> int | None: 288 | return None 289 | 290 | def get_root_time(self) -> float: 291 | return None 292 | 293 | def process_line(self, line): 294 | return None 295 | 296 | def get_progress(self) -> pd.DataFrame: 297 | """ 298 | :return: pandas dataframe with 8 columns 299 | """ 300 | lines = self.apply_regex(self.progress_filter, first=False, flags=re.MULTILINE) 301 | processed = [self.process_line(line) for line in lines] 302 | processed_clean = [p for p in processed if p is not None] 303 | progress = pd.DataFrame(processed_clean) 304 | if len(progress): 305 | progress.columns = self.progress_names 306 | return progress 307 | 308 | 309 | if __name__ == "__main__": 310 | pass 311 | -------------------------------------------------------------------------------- /tests/data/cplex1271-dfn-gwin-UUM.out: -------------------------------------------------------------------------------- 1 | @01 instances/miplib2010/dfn-gwin-UUM.mps.gz =========== 2 | ----------------------------- 3 | Mon Apr 3 18:19:55 MST 2017 4 | ----------------------------- 5 | @03 1491268795 6 | 7 | Welcome to IBM(R) ILOG(R) CPLEX(R) Interactive Optimizer 12.7.1.0 8 | with Simplex, Mixed Integer & Barrier Optimizers 9 | 5725-A06 5725-A29 5724-Y48 5724-Y49 5724-Y54 5724-Y55 5655-Y21 10 | Copyright IBM Corp. 1988, 2017. All Rights Reserved. 11 | 12 | Type 'help' for a list of available commands. 13 | Type 'help' followed by a command name for more 14 | information on commands. 15 | 16 | CPLEX> CPLEX> Logfile 'cplex.log' closed. 17 | CPLEX> New value for default parallel thread count: 1 18 | CPLEX> New value for mixed integer optimality gap tolerance: 0 19 | CPLEX> New value for type of clock used to measure time: 2 20 | CPLEX> New value for time limit in seconds: 7200 21 | CPLEX> New value for parallel optimization mode: 1 22 | CPLEX> Selected objective sense: MINIMIZE 23 | Selected objective name: obj 24 | Selected RHS name: rhs 25 | Selected bound name: bnd 26 | Problem 'instances/miplib2010/dfn-gwin-UUM.mps.gz' read. 27 | Read time = 0.02 sec. (0.44 ticks) 28 | CPLEX> Problem is a minimization problem. 29 | New sense ['max' or 'min']: No changes made. 30 | CPLEX> CPXPARAM_TimeLimit 7200 31 | CPXPARAM_Threads 1 32 | CPXPARAM_Parallel 1 33 | CPXPARAM_Read_APIEncoding "UTF-8" 34 | CPXPARAM_MIP_Tolerances_MIPGap 0 35 | Tried aggregator 2 times. 36 | MIP Presolve eliminated 1 rows and 1 columns. 37 | Aggregator did 1 substitutions. 38 | Reduced MIP has 156 rows, 936 columns, and 2629 nonzeros. 39 | Reduced MIP has 0 binaries, 90 generals, 0 SOSs, and 0 indicators. 40 | Presolve time = 0.00 sec. (0.86 ticks) 41 | Found incumbent of value 170460.000000 after 0.00 sec. (2.21 ticks) 42 | Tried aggregator 1 time. 43 | Reduced MIP has 156 rows, 936 columns, and 2629 nonzeros. 44 | Reduced MIP has 0 binaries, 90 generals, 0 SOSs, and 0 indicators. 45 | Presolve time = 0.00 sec. (0.92 ticks) 46 | MIP emphasis: balance optimality and feasibility. 47 | MIP search method: dynamic search. 48 | Parallel mode: none, using 1 thread. 49 | Root relaxation solution time = 0.01 sec. (8.33 ticks) 50 | 51 | Nodes Cuts/ 52 | Node Left Objective IInf Best Integer Best Bound ItCnt Gap 53 | 54 | * 0+ 0 170460.0000 2400.0000 98.59% 55 | 0 0 27467.2572 45 170460.0000 27467.2572 556 83.89% 56 | * 0+ 0 46632.0000 27467.2572 41.10% 57 | 0 0 33284.9342 38 46632.0000 Cuts: 139 728 28.62% 58 | 0 0 34200.3542 47 46632.0000 Cuts: 139 841 26.66% 59 | 0 0 34594.9463 45 46632.0000 Cuts: 134 945 25.81% 60 | 0 0 34928.4060 44 46632.0000 Cuts: 139 1056 25.10% 61 | 0 0 35084.1072 48 46632.0000 Cuts: 111 1177 24.76% 62 | 0 0 35230.7073 49 46632.0000 Cuts: 105 1259 24.45% 63 | 0 0 35311.2273 47 46632.0000 MIRcuts: 112 1361 24.28% 64 | 0 0 35384.7603 54 46632.0000 Cuts: 89 1458 24.12% 65 | 0 0 35420.2111 50 46632.0000 MIRcuts: 51 1540 24.04% 66 | 0 0 35447.0036 51 46632.0000 Cuts: 73 1607 23.99% 67 | 0 0 35455.5392 51 46632.0000 MIRcuts: 56 1652 23.97% 68 | 0 0 35470.3364 51 46632.0000 MIRcuts: 75 1706 23.94% 69 | 0 0 35484.7507 52 46632.0000 Cuts: 58 1747 23.90% 70 | 0 0 35489.2610 51 46632.0000 Cuts: 66 1774 23.90% 71 | 0 0 35500.1877 47 46632.0000 Cuts: 30 1826 23.87% 72 | 0 0 35512.1646 53 46632.0000 MIRcuts: 40 1869 23.85% 73 | 0 0 35520.9168 54 46632.0000 MIRcuts: 31 1909 23.83% 74 | 0 0 35522.8006 54 46632.0000 Cuts: 56 1934 23.82% 75 | * 0+ 0 41244.0000 35522.8006 13.87% 76 | 0 2 35522.8006 54 41244.0000 35522.8811 1934 13.87% 77 | Elapsed time = 0.40 sec. (678.32 ticks, tree = 0.01 MB, solutions = 3) 78 | 30 32 37353.6240 26 41244.0000 35523.4616 5438 13.87% 79 | 119 92 41090.9548 2 41244.0000 35523.4616 9762 13.87% 80 | * 122+ 89 41036.0000 35523.4616 13.43% 81 | 122 91 38364.8088 39 41036.0000 35538.9883 10216 13.40% 82 | 200 142 36164.1323 50 41036.0000 35684.2578 12904 13.04% 83 | 260 196 36256.6371 40 41036.0000 35730.6960 15268 12.93% 84 | 315 243 36476.5357 41 41036.0000 35733.3662 17491 12.92% 85 | * 340+ 264 40808.0000 35733.3662 12.44% 86 | * 350+ 227 40024.0000 35733.3662 10.72% 87 | 390 254 36051.0624 34 40024.0000 35939.6446 20798 10.20% 88 | 495 329 37776.9250 28 40024.0000 35962.8053 24153 10.15% 89 | 571 383 39884.3535 17 40024.0000 35972.6156 27702 10.12% 90 | 963 669 38229.3960 29 40024.0000 36109.2523 43693 9.78% 91 | Elapsed time = 2.37 sec. (4168.29 ticks, tree = 2.21 MB, solutions = 6) 92 | * 973+ 449 40016.0000 36109.2523 9.76% 93 | * 973+ 299 39756.0000 36109.2523 9.17% 94 | * 973+ 199 39688.0000 36109.2523 9.02% 95 | * 973+ 133 39376.0000 36109.2523 8.30% 96 | 973 135 35692.4074 58 39376.0000 36109.2523 45964 8.30% 97 | 1072 127 36820.0453 49 39376.0000 36109.2523 53276 8.30% 98 | 1290 218 36104.7355 46 39376.0000 36109.2523 63238 8.30% 99 | 1512 384 36655.4549 40 39376.0000 36159.4085 73924 8.17% 100 | 1748 532 37078.5083 35 39376.0000 36377.2173 86576 7.62% 101 | 1966 671 38722.4921 40 39376.0000 36521.9389 98292 7.25% 102 | 2157 783 37125.4712 39 39376.0000 36640.1275 109943 6.95% 103 | 2360 925 39024.3379 31 39376.0000 36682.5470 120719 6.84% 104 | 2532 1009 cutoff 39376.0000 36774.0443 133829 6.61% 105 | 2663 1099 38185.5098 33 39376.0000 36800.0935 143246 6.54% 106 | Elapsed time = 7.96 sec. (14159.21 ticks, tree = 4.72 MB, solutions = 10) 107 | 2827 1196 38359.0699 24 39376.0000 36846.5558 154066 6.42% 108 | 3075 1318 38095.4810 23 39376.0000 36931.5383 166215 6.21% 109 | 3267 1436 38324.5465 19 39376.0000 36966.3831 177906 6.12% 110 | * 3422+ 1037 38752.0000 37051.5754 4.39% 111 | 3450 1048 37832.4889 17 38752.0000 37069.2488 190553 4.34% 112 | 3582 1116 37946.0157 34 38752.0000 37097.3300 198269 4.27% 113 | 3719 1157 37571.6762 38 38752.0000 37151.7912 209411 4.13% 114 | 3934 1242 cutoff 38752.0000 37229.7618 222058 3.93% 115 | 4135 1330 cutoff 38752.0000 37288.8726 234298 3.78% 116 | 4312 1398 38561.5705 20 38752.0000 37336.6181 246447 3.65% 117 | 4546 1515 37878.2994 23 38752.0000 37399.1641 259679 3.49% 118 | Elapsed time = 13.37 sec. (23732.35 ticks, tree = 7.39 MB, solutions = 11) 119 | 4723 1567 38538.9548 17 38752.0000 37452.2652 272906 3.35% 120 | 4893 1629 38045.8371 38 38752.0000 37491.3898 284761 3.25% 121 | 5105 1695 38282.4870 28 38752.0000 37550.9143 297117 3.10% 122 | 5312 1771 38505.1225 19 38752.0000 37589.5380 310366 3.00% 123 | 5532 1841 38700.8195 23 38752.0000 37641.3531 323855 2.87% 124 | 5716 1905 38018.3908 43 38752.0000 37674.2482 336120 2.78% 125 | 5972 1988 cutoff 38752.0000 37720.6922 349146 2.66% 126 | 6172 2054 38346.2331 28 38752.0000 37749.1168 363103 2.59% 127 | 6385 2109 38399.4529 32 38752.0000 37789.0710 376295 2.48% 128 | 6627 2153 38413.7318 38 38752.0000 37828.5912 389506 2.38% 129 | Elapsed time = 18.83 sec. (33383.90 ticks, tree = 10.30 MB, solutions = 11) 130 | 6842 2207 38258.6583 36 38752.0000 37860.5001 403421 2.30% 131 | 7073 2285 38653.0178 16 38752.0000 37887.2242 415790 2.23% 132 | 7309 2322 38193.5730 21 38752.0000 37921.6358 428934 2.14% 133 | 7534 2334 38324.9640 22 38752.0000 37957.9423 441551 2.05% 134 | 7798 2396 38288.0437 33 38752.0000 37987.9376 454821 1.97% 135 | 8027 2425 cutoff 38752.0000 38017.0909 467765 1.90% 136 | 8260 2473 cutoff 38752.0000 38037.8338 481071 1.84% 137 | 8524 2495 38455.0107 39 38752.0000 38068.9368 494103 1.76% 138 | 8775 2519 38685.2661 18 38752.0000 38092.4061 506957 1.70% 139 | 9011 2521 38382.9376 32 38752.0000 38123.4250 519507 1.62% 140 | Elapsed time = 24.33 sec. (42983.29 ticks, tree = 12.61 MB, solutions = 11) 141 | 9319 2544 38512.4350 35 38752.0000 38155.2452 533191 1.54% 142 | 9591 2541 cutoff 38752.0000 38182.1197 545447 1.47% 143 | 9877 2527 cutoff 38752.0000 38210.6689 558241 1.40% 144 | 10156 2518 cutoff 38752.0000 38231.8288 570706 1.34% 145 | 10401 2496 cutoff 38752.0000 38250.2521 583443 1.29% 146 | 10682 2455 cutoff 38752.0000 38270.6545 596243 1.24% 147 | 10692 2457 cutoff 38752.0000 38271.4109 596695 1.24% 148 | 10949 2401 38604.0900 14 38752.0000 38297.0412 607691 1.17% 149 | 11304 2330 38732.5764 17 38752.0000 38331.9089 621405 1.08% 150 | 11640 2270 38646.6636 26 38752.0000 38359.2951 635240 1.01% 151 | Elapsed time = 33.86 sec. (58813.54 ticks, tree = 11.83 MB, solutions = 11) 152 | 12002 2162 38693.7057 34 38752.0000 38393.4415 647654 0.93% 153 | 12380 2042 38634.1664 21 38752.0000 38425.2540 661373 0.84% 154 | 12795 1917 38735.7872 18 38752.0000 38460.6361 674305 0.75% 155 | 13200 1794 cutoff 38752.0000 38492.1367 688164 0.67% 156 | 13619 1625 38677.7140 12 38752.0000 38528.0932 701473 0.58% 157 | 14128 1396 38727.0069 15 38752.0000 38568.3960 712719 0.47% 158 | 14668 1132 cutoff 38752.0000 38603.7456 724097 0.38% 159 | 15241 757 cutoff 38752.0000 38651.6887 733503 0.26% 160 | 15907 208 cutoff 38752.0000 38717.4645 740580 0.09% 161 | 162 | Mixed integer rounding cuts applied: 455 163 | Zero-half cuts applied: 2 164 | Multi commodity flow cuts applied: 13 165 | Lift and project cuts applied: 15 166 | Gomory fractional cuts applied: 8 167 | 168 | Root node processing (before b&c): 169 | Real time = 0.40 sec. (678.40 ticks) 170 | Sequential b&c: 171 | Real time = 38.82 sec. (67005.35 ticks) 172 | ------------ 173 | Total (root+branch&cut) = 39.22 sec. (67683.75 ticks) 174 | 175 | Solution pool: 11 solutions saved. 176 | 177 | MIP - Integer optimal solution: Objective = 3.8752000000e+04 178 | Solution time = 39.22 sec. Iterations = 741835 Nodes = 16132 179 | Deterministic time = 67683.75 ticks (1725.69 ticks/sec) 180 | 181 | CPLEX> Incumbent solution written to file '/home/beck/miplib2010-1.1.0/results/solutions/benchmark.cplex.dfn-gwin-UUM.mps.sol.sol'. 182 | CPLEX> Logfile '/home/beck/miplib2010-1.1.0/results/solutions/benchmark.cplex.dfn-gwin-UUM.mps.sol' open. 183 | CPLEX> MIP - Integer optimal solution: Objective = 3.8752000000e+04 184 | CPLEX> Logfile '/home/beck/miplib2010-1.1.0/results/solutions/benchmark.cplex.dfn-gwin-UUM.mps.sol' closed. 185 | CPLEX> 186 | @04 1491268835 187 | @05 7200 188 | 189 | Read MPS: 1 190 | MIP has 938 vars and 158 constraints 191 | Read SOL: 1 192 | Objective value computed by solver: 38752 193 | 194 | Integrality tolerance: 1/10000 195 | Linear tolerance: 1/10000 196 | Objective tolerance: 1/10000 197 | 198 | Check SOL: Integrality 1 Constraints 1 Objective 1 199 | Maximum violations: Integrality 0 Constraints 1e-14 Objective 0 200 | 201 | ----------------------------- 202 | Mon Apr 3 18:20:35 MST 2017 203 | ----------------------------- 204 | 205 | =ready= 206 | -------------------------------------------------------------------------------- /tests/data/cplex1280-tanglegram2.out: -------------------------------------------------------------------------------- 1 | @01 instances/miplib2010/tanglegram2.mps.gz =========== 2 | ----------------------------- 3 | Mon Nov 13 16:59:57 MST 2017 4 | ----------------------------- 5 | @03 1510617597 6 | 7 | Welcome to IBM(R) ILOG(R) CPLEX(R) Interactive Optimizer 12.8.0.0 8 | with Simplex, Mixed Integer & Barrier Optimizers 9 | 5725-A06 5725-A29 5724-Y48 5724-Y49 5724-Y54 5724-Y55 5655-Y21 10 | Copyright IBM Corp. 1988, 2017. All Rights Reserved. 11 | 12 | Type 'help' for a list of available commands. 13 | Type 'help' followed by a command name for more 14 | information on commands. 15 | 16 | CPLEX> CPLEX> Logfile 'cplex.log' closed. 17 | CPLEX> New value for default parallel thread count: 1 18 | CPLEX> New value for mixed integer optimality gap tolerance: 0 19 | CPLEX> New value for type of clock used to measure time: 2 20 | CPLEX> New value for time limit in seconds: 7200 21 | CPLEX> New value for parallel optimization mode: 1 22 | CPLEX> Selected objective sense: MINIMIZE 23 | Selected objective name: obj 24 | Selected RHS name: rhs 25 | Selected bound name: bnd 26 | Problem 'instances/miplib2010/tanglegram2.mps.gz' read. 27 | Read time = 0.01 sec. (3.19 ticks) 28 | CPLEX> Problem is a minimization problem. 29 | New sense ['max' or 'min']: No changes made. 30 | CPLEX> CPXPARAM_TimeLimit 7200 31 | CPXPARAM_Threads 1 32 | CPXPARAM_Parallel 1 33 | CPXPARAM_MIP_Tolerances_MIPGap 0 34 | Found incumbent of value 4490.000000 after 0.00 sec. (0.33 ticks) 35 | Tried aggregator 3 times. 36 | MIP Presolve eliminated 8326 rows and 171 columns. 37 | MIP Presolve added 1 rows and 1 columns. 38 | MIP Presolve modified 9 coefficients. 39 | Aggregator did 24 substitutions. 40 | Reduced MIP has 631 rows, 370 columns, and 1891 nonzeros. 41 | Reduced MIP has 369 binaries, 1 generals, 0 SOSs, and 0 indicators. 42 | Presolve time = 0.01 sec. (14.40 ticks) 43 | Probing changed sense of 2 constraints. 44 | Probing time = 0.00 sec. (0.12 ticks) 45 | Tried aggregator 1 time. 46 | MIP Presolve eliminated 227 rows and 116 columns. 47 | Reduced MIP has 404 rows, 254 columns, and 1212 nonzeros. 48 | Reduced MIP has 254 binaries, 0 generals, 0 SOSs, and 0 indicators. 49 | Presolve time = 0.00 sec. (0.70 ticks) 50 | Probing time = 0.00 sec. (0.07 ticks) 51 | Tried aggregator 1 time. 52 | Reduced MIP has 404 rows, 254 columns, and 1212 nonzeros. 53 | Reduced MIP has 254 binaries, 0 generals, 0 SOSs, and 0 indicators. 54 | Presolve time = 0.00 sec. (0.73 ticks) 55 | Probing time = 0.00 sec. (0.07 ticks) 56 | MIP emphasis: balance optimality and feasibility. 57 | MIP search method: dynamic search. 58 | Parallel mode: none, using 1 thread. 59 | Root relaxation solution time = 0.00 sec. (0.75 ticks) 60 | 61 | Nodes Cuts/ 62 | Node Left Objective IInf Best Integer Best Bound ItCnt Gap 63 | 64 | * 0+ 0 3856.0000 1.0000 99.97% 65 | 0 0 1.0000 52 3856.0000 1.0000 55 99.97% 66 | * 0+ 0 1969.0000 1.0000 99.95% 67 | 0 0 70.5833 67 1969.0000 Cuts: 153 160 96.42% 68 | 0 0 98.5000 70 1969.0000 Cuts: 65 227 95.00% 69 | 0 0 110.0000 85 1969.0000 ZeroHalf: 76 271 94.41% 70 | 0 0 117.0000 83 1969.0000 ZeroHalf: 57 320 94.06% 71 | 0 0 119.1250 107 1969.0000 ZeroHalf: 42 364 93.95% 72 | 0 0 127.8333 86 1969.0000 Cuts: 88 404 93.51% 73 | 0 0 134.2500 96 1969.0000 ZeroHalf: 56 448 93.18% 74 | 0 0 138.7976 127 1969.0000 Cuts: 44 489 92.95% 75 | 0 0 153.0000 130 1969.0000 Cuts: 64 544 92.23% 76 | 0 0 155.9118 134 1969.0000 ZeroHalf: 35 592 92.08% 77 | 0 0 160.5000 136 1969.0000 Cuts: 79 633 91.85% 78 | 0 0 165.1592 139 1969.0000 Cuts: 109 724 91.61% 79 | 0 0 167.6944 138 1969.0000 Cuts: 69 764 91.48% 80 | 0 0 171.5833 118 1969.0000 Cuts: 49 794 91.29% 81 | 0 0 172.6244 145 1969.0000 ZeroHalf: 55 856 91.23% 82 | 0 0 174.3821 145 1969.0000 ZeroHalf: 38 898 91.14% 83 | 0 0 178.2500 120 1969.0000 ZeroHalf: 50 927 90.95% 84 | 0 0 181.0000 127 1969.0000 Cuts: 55 982 90.81% 85 | 0 0 184.1591 142 1969.0000 Cuts: 60 1036 90.65% 86 | 0 0 185.5000 149 1969.0000 Cuts: 59 1073 90.58% 87 | 0 0 191.5000 113 1969.0000 Cuts: 79 1126 90.27% 88 | 0 0 193.0000 128 1969.0000 Cuts: 54 1172 90.20% 89 | 0 0 194.5000 145 1969.0000 Cuts: 70 1205 90.12% 90 | 0 0 198.9167 152 1969.0000 Cuts: 75 1287 89.90% 91 | 0 0 201.6795 154 1969.0000 Cuts: 45 1349 89.76% 92 | 0 0 204.1490 179 1969.0000 Cuts: 89 1420 89.63% 93 | * 0+ 0 470.0000 204.1490 56.56% 94 | 0 0 207.5000 135 470.0000 ZeroHalf: 37 1458 55.85% 95 | 0 0 208.4610 186 470.0000 Cuts: 94 1492 55.65% 96 | 0 0 214.5979 187 470.0000 Cuts: 44 1558 54.34% 97 | 0 0 218.8077 164 470.0000 ZeroHalf: 52 1627 53.45% 98 | 0 0 220.5335 175 470.0000 Cuts: 40 1670 53.08% 99 | 0 0 224.9792 172 470.0000 Cuts: 52 1745 52.13% 100 | 0 0 228.3750 118 470.0000 Cuts: 58 1786 51.41% 101 | 0 0 230.6212 191 470.0000 Cuts: 74 1867 50.93% 102 | 0 0 236.2500 137 470.0000 Cuts: 94 1969 49.73% 103 | 0 0 239.9132 190 470.0000 ZeroHalf: 89 2081 48.95% 104 | 0 0 241.3425 197 470.0000 Cuts: 69 2137 48.65% 105 | 0 0 243.2139 195 470.0000 ZeroHalf: 52 2207 48.25% 106 | 0 0 245.4956 191 470.0000 Cuts: 82 2281 47.77% 107 | 0 0 247.1134 196 470.0000 Cuts: 66 2345 47.42% 108 | 0 0 248.2610 195 470.0000 Cuts: 54 2408 47.18% 109 | 0 0 249.2911 188 470.0000 Cuts: 49 2460 46.96% 110 | 0 0 250.0542 196 470.0000 Cuts: 51 2503 46.80% 111 | 0 0 250.8924 196 470.0000 ZeroHalf: 48 2551 46.62% 112 | 0 0 251.4500 188 470.0000 Cuts: 68 2605 46.50% 113 | 0 0 252.0021 180 470.0000 Cuts: 54 2649 46.38% 114 | 0 0 253.9736 191 470.0000 Cuts: 62 2739 45.96% 115 | 0 0 255.5793 189 470.0000 Cuts: 63 2797 45.62% 116 | 0 0 256.9361 192 470.0000 Cuts: 50 2846 45.33% 117 | 0 0 257.9988 197 470.0000 Cuts: 53 2911 45.11% 118 | 0 0 259.2644 199 470.0000 Cuts: 55 2982 44.84% 119 | 0 0 259.8588 205 470.0000 Cuts: 47 3031 44.71% 120 | 0 0 260.8179 203 470.0000 Cuts: 59 3087 44.51% 121 | 0 0 263.5330 189 470.0000 ZeroHalf: 38 3172 43.93% 122 | 0 0 269.1913 196 470.0000 Cuts: 92 3241 42.73% 123 | 0 0 273.0333 164 470.0000 Cuts: 67 3314 41.91% 124 | 0 0 275.2846 200 470.0000 Cuts: 125 3386 41.43% 125 | 0 0 277.5876 198 470.0000 Cuts: 74 3446 40.94% 126 | 0 0 279.2721 205 470.0000 Cuts: 48 3502 40.58% 127 | 0 0 281.6669 195 470.0000 Cuts: 70 3574 40.07% 128 | 0 0 283.6646 204 470.0000 ZeroHalf: 77 3651 39.65% 129 | 0 0 285.1411 186 470.0000 ZeroHalf: 30 3698 39.33% 130 | 0 0 288.4262 196 470.0000 ZeroHalf: 57 3768 38.63% 131 | 0 0 289.0383 201 470.0000 Cuts: 64 3831 38.50% 132 | 0 0 290.5031 184 470.0000 Cuts: 75 3889 38.19% 133 | 0 0 291.3698 190 470.0000 ZeroHalf: 73 3939 38.01% 134 | 0 0 291.9843 192 470.0000 Cuts: 51 3991 37.88% 135 | * 0+ 0 459.0000 291.9843 36.39% 136 | 0 0 292.7841 196 459.0000 Cuts: 29 4044 36.21% 137 | 0 0 294.0971 201 459.0000 Cuts: 43 4135 35.93% 138 | 0 0 295.0183 203 459.0000 Cuts: 62 4181 35.73% 139 | 0 0 296.3371 194 459.0000 Cuts: 37 4244 35.44% 140 | 0 0 296.7080 200 459.0000 Cuts: 49 4290 35.36% 141 | 0 0 298.0833 212 459.0000 Cuts: 53 4353 35.06% 142 | 0 0 300.0734 208 459.0000 Cuts: 47 4423 34.62% 143 | 0 0 300.7435 206 459.0000 ZeroHalf: 48 4481 34.48% 144 | 0 0 301.5239 201 459.0000 Cuts: 34 4539 34.31% 145 | 0 0 303.1953 202 459.0000 Cuts: 64 4642 33.94% 146 | 0 0 304.6735 204 459.0000 Cuts: 60 4716 33.62% 147 | 0 0 305.0388 204 459.0000 Cuts: 48 4780 33.54% 148 | 0 0 305.6456 201 459.0000 Cuts: 59 4849 33.41% 149 | 0 0 306.0204 200 459.0000 Cuts: 31 4890 33.33% 150 | 0 0 306.3982 206 459.0000 Cuts: 39 4931 33.25% 151 | 0 0 307.1663 200 459.0000 Cuts: 52 5028 33.08% 152 | 0 0 308.1909 194 459.0000 Cuts: 63 5087 32.86% 153 | 0 0 311.5572 196 459.0000 ZeroHalf: 46 5177 32.12% 154 | * 0+ 0 453.0000 311.5572 31.22% 155 | 0 0 312.1212 199 453.0000 Cuts: 52 5235 31.10% 156 | 0 0 313.5465 203 453.0000 Cuts: 56 5316 30.78% 157 | 0 0 315.3641 195 453.0000 Cuts: 56 5417 30.38% 158 | 0 0 315.8291 190 453.0000 Cuts: 50 5487 30.28% 159 | 0 0 316.4288 196 453.0000 Cuts: 51 5563 30.15% 160 | 0 0 316.8818 196 453.0000 Cuts: 41 5613 30.05% 161 | 0 0 317.0107 204 453.0000 ZeroHalf: 23 5649 30.02% 162 | 0 0 317.1909 201 453.0000 Cuts: 21 5678 29.98% 163 | * 0+ 0 447.0000 317.1909 29.04% 164 | 0 2 317.1909 201 447.0000 317.1958 5678 29.04% 165 | Elapsed time = 0.97 sec. (947.26 ticks, tree = 0.01 MB, solutions = 7) 166 | * 1 1 integral 0 443.0000 317.1958 5900 28.40% 167 | 168 | Zero-half cuts applied: 123 169 | Lift and project cuts applied: 24 170 | Gomory fractional cuts applied: 3 171 | 172 | Root node processing (before b&c): 173 | Real time = 0.97 sec. (947.34 ticks) 174 | Sequential b&c: 175 | Real time = 0.01 sec. (18.69 ticks) 176 | ------------ 177 | Total (root+branch&cut) = 0.98 sec. (966.04 ticks) 178 | 179 | Solution pool: 9 solutions saved. 180 | 181 | MIP - Integer optimal solution: Objective = 4.4300000000e+02 182 | Solution time = 0.98 sec. Iterations = 6240 Nodes = 3 183 | Deterministic time = 966.05 ticks (988.41 ticks/sec) 184 | 185 | CPLEX> Incumbent solution written to file '/home/beck/miplib2010-1.1.0/results/solutions/benchmark.cplex.tanglegram2.mps.sol.sol'. 186 | CPLEX> Logfile '/home/beck/miplib2010-1.1.0/results/solutions/benchmark.cplex.tanglegram2.mps.sol' open. 187 | CPLEX> MIP - Integer optimal solution: Objective = 4.4300000000e+02 188 | CPLEX> Logfile '/home/beck/miplib2010-1.1.0/results/solutions/benchmark.cplex.tanglegram2.mps.sol' closed. 189 | CPLEX> 190 | @04 1510617598 191 | @05 7200 192 | 193 | Read MPS: 1 194 | MIP has 4714 vars and 8980 constraints 195 | Read SOL: 1 196 | Objective value computed by solver: 443 197 | 198 | Integrality tolerance: 1/10000 199 | Linear tolerance: 1/10000 200 | Objective tolerance: 1/10000 201 | 202 | Check SOL: Integrality 1 Constraints 1 Objective 1 203 | Maximum violations: Integrality 0 Constraints 0 Objective 0 204 | 205 | ----------------------------- 206 | Mon Nov 13 16:59:58 MST 2017 207 | ----------------------------- 208 | 209 | =ready= 210 | -------------------------------------------------------------------------------- /tests/data/cbc298-ash608gpia-3col.out: -------------------------------------------------------------------------------- 1 | @01 instances/miplib2010/ash608gpia-3col.mps.gz =========== 2 | ----------------------------- 3 | Sat Jun 11 05:42:43 MST 2016 4 | ----------------------------- 5 | @03 1465648963 6 | Welcome to the CBC MILP Solver 7 | Version: 2.9.8 8 | Build Date: Jun 10 2016 9 | 10 | command line - /home/beck/math/opt/miplib/miplib2010-1.1.0/bin/cbc -import instances/miplib2010/ash608gpia-3col.mps.gz -sec 7200 -threads 1 -ratio 0.0 -timeMode elapsed -solve -solution /home/beck/math/opt/miplib/miplib2010-1.1.0/results/solutions/benchmark.cbc.ash608gpia-3col.mps.sol (default strategy 1) 11 | At line 1 NAME ash608gpia-3col 12 | At line 2 ROWS 13 | At line 24752 COLUMNS 14 | At line 99002 RHS 15 | At line 100219 BOUNDS 16 | At line 103871 ENDATA 17 | Problem ash608gpia-3col has 24748 rows, 3651 columns and 74244 elements 18 | Coin0008I ash608gpia-3col read with 0 errors 19 | seconds was changed from 1e+100 to 7200 20 | threads was changed from 0 to 1 21 | ratioGap was changed from 0 to 0 22 | Option for timeMode changed from cpu to elapsed 23 | Continuous objective value is 2 - 0.27 seconds 24 | Cgl0003I 0 fixed, 0 tightened bounds, 3325 strengthened rows, 0 substitutions 25 | Cgl0003I 0 fixed, 0 tightened bounds, 3517 strengthened rows, 0 substitutions 26 | Cgl0003I 0 fixed, 0 tightened bounds, 2752 strengthened rows, 0 substitutions 27 | Cgl0004I processed model has 18352 rows, 3651 columns (3651 integer (3651 of which binary)) and 58254 elements 28 | Cutoff increment increased from 1e-05 to 0.9999 29 | Cbc0045I 3 integer variables out of 3651 objects (3651 integer) have cost of 1 - high priority 30 | Cbc0045I branch on satisfied Y create fake objective Y random cost Y 31 | Cbc0038I Initial state - 3518 integers unsatisfied sum - 1078.97 32 | Cbc0038I Pass 1: (32.16 seconds) suminf. 977.91601 (3159) obj. 3 iterations 10157 33 | Cbc0038I Pass 2: (35.83 seconds) suminf. 943.12582 (3032) obj. 3 iterations 6378 34 | Cbc0038I Pass 3: (38.36 seconds) suminf. 928.66667 (2814) obj. 3 iterations 4139 35 | Cbc0038I Pass 4: (38.72 seconds) suminf. 919.66667 (2779) obj. 3 iterations 472 36 | Cbc0038I Pass 5: (39.04 seconds) suminf. 919.33333 (2776) obj. 3 iterations 467 37 | Cbc0038I Pass 6: (39.22 seconds) suminf. 917.33333 (2767) obj. 3 iterations 252 38 | Cbc0038I Pass 7: (39.47 seconds) suminf. 915.00000 (2760) obj. 3 iterations 283 39 | Cbc0038I Pass 8: (39.70 seconds) suminf. 915.00000 (2760) obj. 3 iterations 276 40 | Cbc0038I Pass 9: (39.97 seconds) suminf. 915.00000 (2760) obj. 3 iterations 334 41 | Cbc0038I Pass 10: (40.20 seconds) suminf. 915.00000 (2760) obj. 3 iterations 285 42 | Cbc0038I Pass 11: (40.66 seconds) suminf. 915.00000 (2760) obj. 3 iterations 686 43 | Cbc0038I Pass 12: (40.82 seconds) suminf. 911.66667 (2735) obj. 3 iterations 173 44 | Cbc0038I Pass 13: (40.94 seconds) suminf. 911.66667 (2735) obj. 3 iterations 143 45 | Cbc0038I Pass 14: (41.17 seconds) suminf. 911.66667 (2735) obj. 3 iterations 267 46 | Cbc0038I Pass 15: (42.37 seconds) suminf. 910.00000 (2730) obj. 3 iterations 1853 47 | Cbc0038I Pass 16: (43.33 seconds) suminf. 910.00000 (2730) obj. 3 iterations 1477 48 | Cbc0038I Pass 17: (43.75 seconds) suminf. 910.00000 (2730) obj. 3 iterations 609 49 | Cbc0038I Pass 18: (44.95 seconds) suminf. 908.33333 (2725) obj. 3 iterations 1834 50 | Cbc0038I Pass 19: (46.01 seconds) suminf. 908.33333 (2725) obj. 3 iterations 1655 51 | Cbc0038I Pass 20: (46.40 seconds) suminf. 908.33333 (2725) obj. 3 iterations 561 52 | Cbc0038I Pass 21: (47.68 seconds) suminf. 907.66667 (2723) obj. 3 iterations 2000 53 | Cbc0038I Pass 22: (48.74 seconds) suminf. 907.66667 (2723) obj. 3 iterations 1639 54 | Cbc0038I Pass 23: (49.02 seconds) suminf. 907.66667 (2723) obj. 3 iterations 368 55 | Cbc0038I Pass 24: (49.92 seconds) suminf. 907.66667 (2723) obj. 3 iterations 1388 56 | Cbc0038I Pass 25: (51.31 seconds) suminf. 907.00000 (2721) obj. 3 iterations 2127 57 | Cbc0038I Pass 26: (52.39 seconds) suminf. 907.00000 (2721) obj. 3 iterations 1671 58 | Cbc0038I Pass 27: (52.83 seconds) suminf. 907.00000 (2721) obj. 3 iterations 623 59 | Cbc0038I Pass 28: (53.81 seconds) suminf. 907.00000 (2721) obj. 3 iterations 1521 60 | Cbc0038I Pass 29: (55.27 seconds) suminf. 906.33333 (2719) obj. 3 iterations 2269 61 | Cbc0038I Pass 30: (56.39 seconds) suminf. 906.33333 (2719) obj. 3 iterations 1721 62 | Cbc0038I Pass 31: (56.63 seconds) suminf. 906.33333 (2719) obj. 3 iterations 330 63 | Cbc0038I Pass 32: (57.44 seconds) suminf. 902.00000 (2706) obj. 3 iterations 1241 64 | Cbc0038I Pass 33: (58.27 seconds) suminf. 902.00000 (2706) obj. 3 iterations 1268 65 | Cbc0038I Pass 34: (58.62 seconds) suminf. 902.00000 (2706) obj. 3 iterations 435 66 | Cbc0038I Pass 35: (59.82 seconds) suminf. 902.00000 (2706) obj. 3 iterations 1872 67 | Cbc0038I Pass 36: (61.38 seconds) suminf. 900.66667 (2702) obj. 3 iterations 2426 68 | Cbc0038I Pass 37: (62.44 seconds) suminf. 900.66667 (2702) obj. 3 iterations 1654 69 | Cbc0038I Pass 38: (62.79 seconds) suminf. 900.66667 (2702) obj. 3 iterations 483 70 | Cbc0038I Pass 39: (63.76 seconds) suminf. 900.66667 (2702) obj. 3 iterations 1479 71 | Cbc0038I Pass 40: (64.87 seconds) suminf. 898.66667 (2696) obj. 3 iterations 1713 72 | Cbc0038I Pass 41: (65.77 seconds) suminf. 898.66667 (2696) obj. 3 iterations 1366 73 | Cbc0038I Pass 42: (65.99 seconds) suminf. 898.66667 (2696) obj. 3 iterations 267 74 | Cbc0038I Pass 43: (67.37 seconds) suminf. 898.66667 (2696) obj. 3 iterations 2181 75 | Cbc0038I Pass 44: (68.92 seconds) suminf. 898.00000 (2694) obj. 3 iterations 2415 76 | Cbc0038I Pass 45: (70.06 seconds) suminf. 896.66667 (2690) obj. 3 iterations 1767 77 | Cbc0038I Pass 46: (70.14 seconds) suminf. 896.66667 (2690) obj. 3 iterations 76 78 | Cbc0038I Pass 47: (70.41 seconds) suminf. 896.66667 (2690) obj. 3 iterations 354 79 | Cbc0038I Pass 48: (71.72 seconds) suminf. 896.66667 (2690) obj. 3 iterations 2056 80 | Cbc0038I Pass 49: (73.07 seconds) suminf. 896.66667 (2690) obj. 3 iterations 2121 81 | Cbc0038I Pass 50: (74.54 seconds) suminf. 896.66667 (2690) obj. 3 iterations 2325 82 | Cbc0038I Pass 51: (75.60 seconds) suminf. 896.66667 (2690) obj. 3 iterations 1644 83 | Cbc0038I Pass 52: (76.06 seconds) suminf. 896.66667 (2690) obj. 3 iterations 663 84 | Cbc0038I Pass 53: (77.31 seconds) suminf. 894.00000 (2682) obj. 3 iterations 1980 85 | Cbc0038I Pass 54: (78.47 seconds) suminf. 894.00000 (2682) obj. 3 iterations 1823 86 | Cbc0038I Pass 55: (78.87 seconds) suminf. 894.00000 (2682) obj. 3 iterations 558 87 | Cbc0038I Pass 56: (80.18 seconds) suminf. 894.33333 (2683) obj. 3 iterations 2077 88 | Cbc0038I Pass 57: (81.30 seconds) suminf. 894.33333 (2683) obj. 3 iterations 1756 89 | Cbc0038I Pass 58: (81.61 seconds) suminf. 894.33333 (2683) obj. 3 iterations 433 90 | Cbc0038I Pass 59: (82.79 seconds) suminf. 894.00000 (2682) obj. 3 iterations 1865 91 | Cbc0038I Pass 60: (84.26 seconds) suminf. 894.00000 (2682) obj. 3 iterations 2339 92 | Cbc0038I Pass 61: (85.59 seconds) suminf. 894.33333 (2683) obj. 3 iterations 2125 93 | Cbc0038I Pass 62: (86.88 seconds) suminf. 893.66667 (2681) obj. 3 iterations 2042 94 | Cbc0038I Pass 63: (87.68 seconds) suminf. 893.66667 (2681) obj. 3 iterations 1224 95 | Cbc0038I Pass 64: (88.03 seconds) suminf. 893.66667 (2681) obj. 3 iterations 485 96 | Cbc0038I Pass 65: (89.31 seconds) suminf. 891.33333 (2674) obj. 3 iterations 2024 97 | Cbc0038I Pass 66: (90.42 seconds) suminf. 891.33333 (2674) obj. 3 iterations 1741 98 | Cbc0038I Pass 67: (90.87 seconds) suminf. 891.33333 (2674) obj. 3 iterations 670 99 | Cbc0038I Pass 68: (92.12 seconds) suminf. 891.33333 (2674) obj. 3 iterations 1965 100 | Cbc0038I Pass 69: (93.44 seconds) suminf. 891.33333 (2674) obj. 3 iterations 2085 101 | Cbc0038I Pass 70: (94.89 seconds) suminf. 891.33333 (2674) obj. 3 iterations 2294 102 | Cbc0038I Pass 71: (96.37 seconds) suminf. 890.00000 (2670) obj. 3 iterations 2345 103 | Cbc0038I Pass 72: (97.43 seconds) suminf. 890.00000 (2670) obj. 3 iterations 1675 104 | Cbc0038I Pass 73: (97.82 seconds) suminf. 890.00000 (2670) obj. 3 iterations 513 105 | Cbc0038I Pass 74: (99.07 seconds) suminf. 889.33333 (2668) obj. 3 iterations 1973 106 | Cbc0038I Pass 75: (100.15 seconds) suminf. 889.33333 (2668) obj. 3 iterations 1667 107 | Cbc0038I Pass 76: (100.53 seconds) suminf. 889.33333 (2668) obj. 3 iterations 535 108 | Cbc0038I Pass 77: (101.80 seconds) suminf. 889.33333 (2668) obj. 3 iterations 2001 109 | Cbc0038I Pass 78: (102.94 seconds) suminf. 889.33333 (2668) obj. 3 iterations 1796 110 | Cbc0038I Pass 79: (103.31 seconds) suminf. 889.33333 (2668) obj. 3 iterations 518 111 | Cbc0038I Pass 80: (104.48 seconds) suminf. 889.33333 (2668) obj. 3 iterations 1855 112 | Cbc0038I Pass 81: (105.57 seconds) suminf. 889.33333 (2668) obj. 3 iterations 1705 113 | Cbc0038I Pass 82: (105.94 seconds) suminf. 889.33333 (2668) obj. 3 iterations 522 114 | Cbc0038I Pass 83: (107.19 seconds) suminf. 889.00000 (2667) obj. 3 iterations 1935 115 | Cbc0038I Pass 84: (108.32 seconds) suminf. 889.00000 (2667) obj. 3 iterations 1735 116 | Cbc0038I Pass 85: (108.71 seconds) suminf. 889.00000 (2667) obj. 3 iterations 529 117 | Cbc0038I Pass 86: (109.94 seconds) suminf. 889.00000 (2667) obj. 3 iterations 1950 118 | Cbc0038I Pass 87: (111.36 seconds) suminf. 889.00000 (2667) obj. 3 iterations 2268 119 | Cbc0038I Pass 88: (112.50 seconds) suminf. 889.00000 (2667) obj. 3 iterations 1789 120 | Cbc0038I Pass 89: (112.75 seconds) suminf. 889.00000 (2667) obj. 3 iterations 349 121 | Cbc0038I Pass 90: (114.09 seconds) suminf. 889.00000 (2667) obj. 3 iterations 2087 122 | Cbc0038I Pass 91: (115.56 seconds) suminf. 888.33333 (2665) obj. 3 iterations 2342 123 | Cbc0038I Pass 92: (116.73 seconds) suminf. 888.00000 (2693) obj. 3 iterations 1821 124 | Cbc0038I Pass 93: (116.86 seconds) suminf. 887.00000 (2692) obj. 3 iterations 152 125 | Cbc0038I Pass 94: (117.06 seconds) suminf. 886.66667 (2693) obj. 3 iterations 236 126 | Cbc0038I Pass 95: (117.18 seconds) suminf. 886.66667 (2693) obj. 3 iterations 137 127 | Cbc0038I Pass 96: (117.49 seconds) suminf. 886.66667 (2693) obj. 3 iterations 439 128 | Cbc0038I Pass 97: (118.75 seconds) suminf. 886.66667 (2693) obj. 3 iterations 1963 129 | Cbc0038I Pass 98: (120.22 seconds) suminf. 886.66667 (2693) obj. 3 iterations 2333 130 | Cbc0038I Pass 99: (121.22 seconds) suminf. 886.66667 (2693) obj. 3 iterations 1563 131 | Cbc0038I Pass 100: (122.51 seconds) suminf. 887.00000 (2694) obj. 3 iterations 2015 132 | Cbc0038I No solution found this major pass 133 | Cbc0038I Before mini branch and bound, 73 integers at bound fixed and 0 continuous 134 | Cbc0038I Full problem 18352 rows 3651 columns, reduced to 17768 rows 3508 columns - too large 135 | Cbc0038I Mini branch and bound did not improve solution (122.57 seconds) 136 | Cbc0038I After 122.57 seconds - Feasibility pump exiting - took 96.01 seconds 137 | Cbc0031I 4 added rows had average density of 72 138 | Cbc0013I At root node, 116 cuts changed objective from 3 to 3.1176906 in 1 passes 139 | Cbc0014I Cut generator 0 (Probing) - 0 row cuts average 0.0 elements, 0 column cuts (0 active) in 0.412 seconds - new frequency is -100 140 | Cbc0014I Cut generator 1 (Gomory) - 37 row cuts average 151.4 elements, 0 column cuts (0 active) in 0.538 seconds - new frequency is 1 141 | Cbc0014I Cut generator 2 (Knapsack) - 0 row cuts average 0.0 elements, 0 column cuts (0 active) in 0.007 seconds - new frequency is -100 142 | Cbc0014I Cut generator 3 (Clique) - 0 row cuts average 0.0 elements, 0 column cuts (0 active) in 0.035 seconds - new frequency is -100 143 | Cbc0014I Cut generator 4 (MixedIntegerRounding2) - 0 row cuts average 0.0 elements, 0 column cuts (0 active) in 0.005 seconds - new frequency is -100 144 | Cbc0014I Cut generator 5 (FlowCover) - 0 row cuts average 0.0 elements, 0 column cuts (0 active) in 0.000 seconds - new frequency is -100 145 | Cbc0014I Cut generator 6 (TwoMirCuts) - 79 row cuts average 115.6 elements, 0 column cuts (0 active) in 0.595 seconds - new frequency is -100 146 | Cbc0030I Thread 0 used 0 times, waiting to start 0.12635827, 0 cpu time, 0 locks, 0 locked, 0 waiting for locks 147 | Cbc0030I Main thread 0 waiting for threads, 1 locks, 6.6757202e-06 locked, 4.7683716e-07 waiting for locks 148 | Cbc0001I Search completed - best objective 1e+50, took 95053 iterations and 0 nodes (222.97 seconds) 149 | Cbc0035I Maximum depth 0, 0 variables fixed on reduced cost 150 | Cuts at root node changed objective from 3 to 3.11769 151 | Probing was tried 2 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.824 seconds) 152 | Gomory was tried 2 times and created 74 cuts of which 0 were active after adding rounds of cuts (1.076 seconds) 153 | Knapsack was tried 2 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.015 seconds) 154 | Clique was tried 2 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.070 seconds) 155 | MixedIntegerRounding2 was tried 2 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.011 seconds) 156 | FlowCover was tried 2 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.001 seconds) 157 | TwoMirCuts was tried 2 times and created 158 cuts of which 0 were active after adding rounds of cuts (1.189 seconds) 158 | 159 | Result - Problem proven infeasible 160 | 161 | No feasible solution found 162 | Enumerated nodes: 0 163 | Total iterations: 95053 164 | Time (CPU seconds): 224.67 165 | Time (Wallclock seconds): 224.50 166 | 167 | Total time (CPU seconds): 224.71 (Wallclock seconds): 224.56 168 | 169 | =infeas= 170 | 171 | @04 1465649188 172 | @05 7200 173 | 174 | Read MPS: 1 175 | MIP has 3651 vars and 24748 constraints 176 | Read SOL: 0 177 | 178 | ----------------------------- 179 | Sat Jun 11 05:46:28 MST 2016 180 | ----------------------------- 181 | 182 | =ready= 183 | -------------------------------------------------------------------------------- /tests/data/trivial_cplex_300.out: -------------------------------------------------------------------------------- 1 | Version identifier: 20.1.0.0 | 2020-11-10 | 9bedb6d68 2 | CPXPARAM_Read_DataCheck 1 3 | CPXPARAM_TimeLimit 300 4 | Tried aggregator 1 time. 5 | MIP Presolve eliminated 1172 rows and 1 columns. 6 | MIP Presolve modified 2093 coefficients. 7 | Reduced MIP has 613 rows, 428 columns, and 23460 nonzeros. 8 | Reduced MIP has 214 binaries, 0 generals, 0 SOSs, and 0 indicators. 9 | Presolve time = 0.05 sec. (37.45 ticks) 10 | Found incumbent of value 0.938917 after 0.13 sec. (74.31 ticks) 11 | Probing time = 0.00 sec. (1.61 ticks) 12 | Tried aggregator 1 time. 13 | Detecting symmetries... 14 | MIP Presolve modified 404 coefficients. 15 | Reduced MIP has 613 rows, 428 columns, and 23457 nonzeros. 16 | Reduced MIP has 214 binaries, 0 generals, 0 SOSs, and 0 indicators. 17 | Presolve time = 0.06 sec. (26.49 ticks) 18 | Probing time = 0.00 sec. (1.49 ticks) 19 | Clique table members: 184. 20 | MIP emphasis: balance optimality and feasibility. 21 | MIP search method: dynamic search. 22 | Parallel mode: deterministic, using up to 8 threads. 23 | Root relaxation solution time = 0.02 sec. (7.97 ticks) 24 | 25 | Nodes Cuts/ 26 | Node Left Objective IInf Best Integer Best Bound ItCnt Gap 27 | 28 | * 0+ 0 0.9389 9.2890 889.33% 29 | * 0+ 0 1.6139 9.2890 475.56% 30 | 0 0 1.7363 89 1.6139 1.7363 145 7.58% 31 | * 0+ 0 1.6250 1.7363 6.84% 32 | * 0+ 0 1.6358 1.7363 6.14% 33 | * 0+ 0 1.6382 1.7363 5.99% 34 | * 0+ 0 1.6509 1.7363 5.17% 35 | * 0+ 0 1.6516 1.7363 5.13% 36 | Detecting symmetries... 37 | 0 2 1.7363 80 1.6516 1.7363 145 5.13% 38 | Elapsed time = 1.25 sec. (496.73 ticks, tree = 0.02 MB, solutions = 7) 39 | * 13+ 3 1.6524 1.7363 5.08% 40 | * 92+ 30 1.6544 1.7363 4.95% 41 | 397 251 1.7237 64 1.6544 1.7363 10585 4.95% 42 | * 609+ 432 1.6556 1.7363 4.87% 43 | * 746+ 432 1.6565 1.7363 4.81% 44 | * 1038+ 621 1.6569 1.7363 4.79% 45 | 1223 1036 1.7320 77 1.6569 1.7363 25213 4.79% 46 | * 1889+ 1502 1.6569 1.7363 4.79% 47 | 1889 1504 1.7352 83 1.6569 1.7363 39882 4.79% 48 | 2690 2227 1.7327 77 1.6569 1.7363 49877 4.79% 49 | * 3060+ 1493 1.6575 1.7363 4.75% 50 | * 3598+ 1556 1.6575 1.7363 4.75% 51 | 52 | Performing restart 1 53 | 54 | Repeating presolve. 55 | Tried aggregator 1 time. 56 | MIP Presolve modified 173 coefficients. 57 | Reduced MIP has 613 rows, 428 columns, and 23457 nonzeros. 58 | Reduced MIP has 214 binaries, 0 generals, 0 SOSs, and 0 indicators. 59 | Presolve time = 0.03 sec. (12.72 ticks) 60 | Tried aggregator 1 time. 61 | MIP Presolve modified 1 coefficients. 62 | Reduced MIP has 613 rows, 428 columns, and 23457 nonzeros. 63 | Reduced MIP has 214 binaries, 0 generals, 0 SOSs, and 0 indicators. 64 | Presolve time = 0.02 sec. (11.70 ticks) 65 | Represolve time = 0.06 sec. (30.89 ticks) 66 | * 3741+ 0 1.6575 1.7363 4.75% 67 | 3741 2 1.7363 83 1.6575 1.7363 66418 4.75% 68 | 3743 4 1.7361 85 1.6575 1.7363 66765 4.75% 69 | 3745 6 1.7361 86 1.6575 1.7363 66779 4.75% 70 | 3752 12 1.7349 84 1.6575 1.7363 66967 4.75% 71 | 3806 50 1.7289 80 1.6575 1.7363 69067 4.75% 72 | 7636 3512 1.7358 83 1.6575 1.7363 129918 4.75% 73 | Elapsed time = 13.83 sec. (4700.76 ticks, tree = 1.40 MB, solutions = 16) 74 | 15011 9534 1.7333 75 1.6575 1.7363 205622 4.75% 75 | 23612 17543 1.7328 81 1.6575 1.7363 304066 4.75% 76 | 33716 27663 1.6712 30 1.6575 1.7363 415631 4.75% 77 | * 37270+31097 1.6579 1.7363 4.73% 78 | * 38002+30797 1.6580 1.7363 4.72% 79 | * 38158+31306 1.6583 1.7363 4.70% 80 | * 38310+31306 1.6583 1.7363 4.70% 81 | * 39232+30797 1.6586 1.7363 4.68% 82 | * 39702+30797 1.6589 1.7363 4.66% 83 | * 39743+30797 1.6590 1.7363 4.66% 84 | * 39984+30797 1.6590 1.7363 4.66% 85 | * 40387+30797 1.6592 1.7363 4.65% 86 | * 40560+30797 1.6596 1.7363 4.62% 87 | * 40577+30797 1.6596 1.7363 4.62% 88 | 40950 34520 1.7351 86 1.6596 1.7363 486328 4.62% 89 | 49070 39748 1.7156 61 1.6596 1.7363 540601 4.62% 90 | 60759 52222 1.7049 56 1.6596 1.7363 655467 4.62% 91 | 92 | Performing restart 2 93 | 94 | Repeating presolve. 95 | Tried aggregator 1 time. 96 | MIP Presolve modified 24 coefficients. 97 | Reduced MIP has 613 rows, 428 columns, and 23535 nonzeros. 98 | Reduced MIP has 214 binaries, 0 generals, 0 SOSs, and 0 indicators. 99 | Presolve time = 0.02 sec. (12.78 ticks) 100 | Tried aggregator 1 time. 101 | Reduced MIP has 613 rows, 428 columns, and 23535 nonzeros. 102 | Reduced MIP has 214 binaries, 0 generals, 0 SOSs, and 0 indicators. 103 | Presolve time = 0.03 sec. (11.81 ticks) 104 | Represolve time = 0.09 sec. (34.33 ticks) 105 | * 70239+ 0 1.6596 1.7362 4.62% 106 | 70239 2 1.7363 83 1.6596 1.7362 752033 4.62% 107 | 70254 16 1.7312 81 1.6596 1.7362 753291 4.62% 108 | 70340 66 1.7209 62 1.6596 1.7362 757236 4.62% 109 | 72253 1247 1.7362 90 1.6596 1.7362 778644 4.62% 110 | Elapsed time = 45.24 sec. (15205.79 ticks, tree = 0.66 MB, solutions = 37) 111 | 80000 8447 1.6597 23 1.6596 1.7362 859464 4.62% 112 | 88841 16891 1.7220 62 1.6596 1.7362 950626 4.62% 113 | 98355 26389 1.7280 78 1.6596 1.7362 1040012 4.62% 114 | 106835 33959 1.6876 45 1.6596 1.7362 1116664 4.62% 115 | 117270 43421 1.7322 80 1.6596 1.7362 1195344 4.62% 116 | 127345 51434 1.7344 76 1.6596 1.7362 1268463 4.62% 117 | 137764 61516 1.7309 77 1.6596 1.7362 1351166 4.62% 118 | 148260 72834 1.7326 73 1.6596 1.7362 1443533 4.61% 119 | 159417 81937 1.7315 75 1.6596 1.7362 1515892 4.61% 120 | 166389 89951 1.7295 77 1.6596 1.7362 1579836 4.61% 121 | Elapsed time = 75.72 sec. (24743.19 ticks, tree = 35.49 MB, solutions = 37) 122 | 177050 99143 1.7339 79 1.6596 1.7361 1657692 4.61% 123 | 187512 108925 1.7317 79 1.6596 1.7361 1737799 4.61% 124 | 198603 120741 1.7207 69 1.6596 1.7361 1832528 4.61% 125 | 209656 130923 1.7337 79 1.6596 1.7360 1912622 4.61% 126 | 218886 139838 1.7316 75 1.6596 1.7360 1981689 4.60% 127 | 230334 150049 1.7152 60 1.6596 1.7360 2059707 4.60% 128 | 241933 160802 1.7342 85 1.6596 1.7360 2142288 4.60% 129 | 252861 172023 1.6679 19 1.6596 1.7359 2227186 4.60% 130 | 263432 182486 1.7168 63 1.6596 1.7359 2306291 4.60% 131 | 275613 192205 1.7337 77 1.6596 1.7359 2378132 4.60% 132 | Elapsed time = 106.09 sec. (34280.78 ticks, tree = 76.08 MB, solutions = 37) 133 | 285485 201766 1.6662 26 1.6596 1.7359 2448173 4.60% 134 | 297767 213636 1.7352 85 1.6596 1.7359 2534158 4.59% 135 | 307846 224661 1.6881 44 1.6596 1.7358 2617829 4.59% 136 | 318635 234186 1.7142 62 1.6596 1.7358 2688086 4.59% 137 | 331262 243824 1.7317 74 1.6596 1.7358 2758478 4.59% 138 | 341056 255102 1.7322 78 1.6596 1.7358 2843080 4.59% 139 | 353248 265439 1.6982 53 1.6596 1.7358 2915175 4.59% 140 | *364967+278705 1.6598 1.7358 4.57% 141 | 365108 278420 1.7116 61 1.6598 1.7358 3006760 4.57% 142 | *367357+280317 1.6598 1.7357 4.57% 143 | 371319 284093 1.7322 74 1.6598 1.7357 3048736 4.57% 144 | 383176 292677 1.7325 78 1.6598 1.7357 3109696 4.57% 145 | Elapsed time = 134.13 sec. (43818.07 ticks, tree = 114.80 MB, solutions = 39) 146 | 395557 304444 1.6920 43 1.6598 1.7357 3195389 4.57% 147 | 407494 316331 1.7179 66 1.6598 1.7357 3278563 4.57% 148 | 417719 325720 1.7316 74 1.6598 1.7357 3345227 4.57% 149 | 429645 339103 1.7320 82 1.6598 1.7357 3442369 4.57% 150 | 442566 350055 1.7327 75 1.6598 1.7357 3520227 4.57% 151 | 452426 360450 1.7333 79 1.6598 1.7356 3593870 4.57% 152 | 464838 372091 1.6845 36 1.6598 1.7356 3674120 4.57% 153 | 477587 382319 1.7323 76 1.6598 1.7356 3748350 4.57% 154 | 487757 392282 1.7323 79 1.6598 1.7356 3815960 4.56% 155 | 500524 402762 1.7031 54 1.6598 1.7356 3889846 4.56% 156 | Elapsed time = 162.38 sec. (53355.41 ticks, tree = 159.11 MB, solutions = 39) 157 | 511908 415262 1.7282 69 1.6598 1.7356 3977120 4.56% 158 | 522616 425871 1.7266 68 1.6598 1.7356 4054017 4.56% 159 | 535363 436099 1.6652 24 1.6598 1.7356 4124804 4.56% 160 | 547322 448105 1.7327 80 1.6598 1.7355 4208544 4.56% 161 | 558608 458091 1.7318 78 1.6598 1.7355 4279838 4.56% 162 | 571023 469471 1.7328 74 1.6598 1.7355 4357587 4.56% 163 | 582995 481930 1.7312 72 1.6598 1.7355 4442156 4.56% 164 | 593838 490759 1.7323 72 1.6598 1.7355 4505926 4.56% 165 | 606073 504261 1.6600 24 1.6598 1.7355 4599626 4.56% 166 | 618201 517989 cutoff 1.6598 1.7355 4696092 4.56% 167 | Elapsed time = 194.99 sec. (62892.85 ticks, tree = 202.47 MB, solutions = 39) 168 | 628294 523631 1.6881 39 1.6598 1.7355 4737067 4.56% 169 | 642140 537429 1.7308 77 1.6598 1.7354 4830873 4.56% 170 | 653008 548277 1.7325 70 1.6598 1.7354 4905706 4.55% 171 | 665253 560517 1.7325 80 1.6598 1.7354 4991688 4.55% 172 | 677143 569808 1.6802 42 1.6598 1.7354 5053158 4.55% 173 | 689937 584991 1.7150 63 1.6598 1.7354 5155778 4.55% 174 | 700236 593665 1.7325 79 1.6598 1.7354 5214666 4.55% 175 | 713864 605254 1.7326 75 1.6598 1.7354 5297112 4.55% 176 | 725598 614494 1.7081 55 1.6598 1.7354 5361166 4.55% 177 | 735753 627658 1.7327 79 1.6598 1.7354 5451051 4.55% 178 | Elapsed time = 233.92 sec. (72430.28 ticks, tree = 245.05 MB, solutions = 39) 179 | 748585 639408 1.7331 77 1.6598 1.7353 5528964 4.55% 180 | 761777 650690 1.7260 67 1.6598 1.7353 5605934 4.55% 181 | 773536 661251 1.7057 49 1.6598 1.7353 5680647 4.55% 182 | 784083 671198 1.7112 62 1.6598 1.7353 5750614 4.55% 183 | 796052 684828 1.6669 27 1.6598 1.7353 5845705 4.55% 184 | 809315 696699 1.7317 74 1.6598 1.7353 5929049 4.55% 185 | 821411 709923 1.7330 81 1.6598 1.7353 6020427 4.55% 186 | 832555 717790 1.7303 72 1.6598 1.7353 6071496 4.54% 187 | 845135 729950 1.7303 71 1.6598 1.7353 6149793 4.54% 188 | 858764 739145 1.7313 74 1.6598 1.7353 6205568 4.54% 189 | Elapsed time = 264.28 sec. (81967.35 ticks, tree = 416.83 MB, solutions = 39) 190 | 867857 751621 1.6987 48 1.6598 1.7353 6281884 4.54% 191 | Starting limited solution polishing. 192 | *876912+760416 1.6598 1.7352 4.54% 193 | *878071+756409 1.6598 1.7352 4.54% 194 | 879059 757646 1.7172 60 1.6598 1.7352 6319623 4.54% 195 | 885405 766890 1.7323 79 1.6598 1.7352 6376721 4.54% 196 | 891717 775752 1.7208 62 1.6598 1.7352 6431219 4.54% 197 | 897783 779750 1.7322 71 1.6598 1.7352 6456581 4.54% 198 | *902760+786039 1.6600 1.7352 4.53% 199 | 904496 784726 1.7248 72 1.6600 1.7352 6486204 4.53% 200 | *910538+791494 1.6600 1.7352 4.53% 201 | *910973+790933 1.6602 1.7352 4.52% 202 | 910982 791969 1.7313 75 1.6602 1.7352 6533526 4.52% 203 | *911519+793026 1.6603 1.7352 4.51% 204 | *912425+793270 1.6603 1.7352 4.51% 205 | 916455 796027 1.7034 52 1.6603 1.7352 6567143 4.51% 206 | 922824 801763 1.7311 74 1.6603 1.7352 6603194 4.51% 207 | *923250+803111 1.6603 1.7352 4.51% 208 | 209 | Root node processing (before b&c): 210 | Real time = 1.25 sec. (496.14 ticks) 211 | Parallel b&c, 8 threads: 212 | Real time = 298.78 sec. (91126.61 ticks) 213 | Sync time (average) = 45.06 sec. 214 | Wait time (average) = 0.09 sec. 215 | ------------ 216 | Total (root+branch&cut) = 300.03 sec. (91622.74 ticks) 217 | --------------------------------------------------------------------------------