Metadata-Version: 2.4
Name: passagemath-coin-or-cbc
Version: 10.4.1
Summary: COIN-OR Cbc backend for Sage MixedIntegerLinearProgram
Home-page: https://github.com/passagemath/passagemath-coin-or-cbc
Author: Nathann Cohen, Yuan Zhou, John Perry, Zeyi Wang, Martin Albrecht, Jori Mäntysalo, Matthias Koeppe, Erik M. Bray, Jeroen Demeyer, Nils Bruin, Julien Puydt, Dima Pasechnik, and others
Author-email: mkoeppe@math.ucdavis.edu
License: GPLv2+
Keywords: milp,linear-programming,optimization
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: passagemath-categories
Provides-Extra: doc
Requires-Dist: sphinx; extra == "doc"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: summary

# COIN-OR mixed integer linear programming backend for SageMath (sage-numerical-backends-coin fork)

[![PyPI](https://img.shields.io/pypi/v/passagemath-coin-or-cbc)](https://pypi.org/project/passagemath-coin-or-cbc/ "PyPI: passagemath-coin-or-cbc")
[![GitHub Workflow Status](https://github.com/passagemath/passagemath-coin-or-cbc/workflows/Build%20and%20test%20Python%20package/badge.svg)](https://github.com/passagemath/passagemath-coin-or-cbc/actions "GitHub Actions: passagemath-coin-or-cbc")

`CoinBackend` has previously been available as part of the [SageMath](http://www.sagemath.org/) source tree,
from which it is built as an "optional extension" when the `cbc` Sage package is installed.
However, it has not been available in binary distributions.

The standalone Python package `sage-numerical-backends-coin` was created from the SageMath sources, version 9.0.beta10; the in-tree version of `CoinBackend` has been removed in Sage ticket https://trac.sagemath.org/ticket/28175.  SageMath 9.1 and later makes the package available as an optional Sage package (SPKG).

The current version of this package is the compatible fork `passagemath-coin-or-cbc`.

It can also be installed on top of various Sage installations using pip.
(Your installation of Sage must be based on Python 3; if your SageMath is version 9.2 or newer, it is.)

## Installation

CBC can either be installed using its Sage package using

    $ sage -i cbc

or any of the methods explained at https://github.com/coin-or/Cbc .

This package finds the CBC installation by means of ``pkgconfig``.

Install this package from PyPI using

    $ sage -pip install passagemath-coin-or-cbc

or from GitHub using

    $ sage -pip install git+https://github.com/passagemath/passagemath-coin-or-cbc

(See [`.github/workflows/build.yml`](.github/workflows/build.yml) for details about package prerequisites on various systems.)

## Using this package

After a successful installation, Sage will automatically make this new backend
the default MIP solver.

To select the `'Coin'` solver explicitly as the default MIP backend, additionally use the following command.

    sage: default_mip_solver('Coin')

To make these settings permanent, add this command to your `~/.sage/init.sage` file.
Note that this setting will not affect doctesting (`sage -t`) because this file is ignored in doctesting mode.

## Running doctests

To run the (limited) testsuite of this package, use:

    $ sage setup.py test

To run the Sage testsuite with the default MIP solver set to the backend provided by this package, use:

    $ sage setup.py check_sage_testsuite

## Running tests with tox

The doctests can also be invoked using `tox`:

    $ tox -e local
    $ tox -e local-sage_testsuite

If you have `docker` installed, more tests can be run:

    $ tox -e docker-sage_binary-cbc_coinbrew

See `tox.ini` for the available options.
