pax_global_header 0000666 0000000 0000000 00000000064 13525002437 0014513 g ustar 00root root 0000000 0000000 52 comment=7a5bd6f63cf51ea546ec788b03114984dfa498b2
cbcpy-2.10.3-2/ 0000775 0000000 0000000 00000000000 13525002437 0013035 5 ustar 00root root 0000000 0000000 cbcpy-2.10.3-2/.gitignore 0000664 0000000 0000000 00000000044 13525002437 0015023 0 ustar 00root root 0000000 0000000 /.project
/.pydevproject
/.settings
cbcpy-2.10.3-2/.gitlab-ci.yml 0000664 0000000 0000000 00000006401 13525002437 0015472 0 ustar 00root root 0000000 0000000 image: quay.io/pypa/manylinux2010_x86_64
stages:
- prebuild
- build
- publish
variables:
CBC_VERSION: 2.10.3
#
# Build Stages
#
.build: &build
stage: build
script:
- for FILE in patches/*.diff; do patch -p1 < $FILE; done
# Compile python module
- $PYTHON_ENV/bin/python setup.py build_ext --swig="${SWIG:-swig-4.0.0/swig}"
# Build package
- $PYTHON_ENV/bin/python setup.py bdist_wheel
# Convert to manylinux if required
- mkdir wheelhouse
- if [[ "$CI_JOB_NAME" == *linux* ]]; then auditwheel repair dist/*.whl; else mv dist/*.whl wheelhouse/; fi
# Test the packages
- $PYTHON_ENV/bin/pip install wheelhouse/*.whl
- $PYTHON_ENV/bin/python -m cbcpy
artifacts:
paths:
- wheelhouse
.buildlinux: &buildlinux
<<: *build
dependencies:
- build_cbc_x86_64_linux
before_script:
# Install SWIG
- yum install -y wget pcre-devel
- wget https://sourceforge.net/projects/swig/files/swig/swig-4.0.0/swig-4.0.0.tar.gz
- tar -zxvf swig-4.0.0.tar.gz
- cd swig-4.0.0
- ./configure && make && make install
- cd .. && pwd
.buildwin: &buildwin
<<: *build
before_script:
# Install CBC
- export CBC_FILE=Cbc-$CBC_VERSION-win32-msvc9.zip
- mkdir Cbc && cd Cbc
- wget https://bintray.com/coin-or/download/download_file?file_path=$CBC_FILE -O $CBC_FILE
- unzip $CBC_FILE
- cd .. && pwd
# Install SWIG
- wget https://sourceforge.net/projects/swig/files/swigwin/swigwin-4.0.0/swigwin-4.0.0.zip
- unzip swigwin-4.0.0.zip
dependencies: []
#
# Build CBC & SWIG
#
build_cbc_x86_64_linux:
stage: prebuild
image: quay.io/pypa/manylinux2010_x86_64
script:
- yum install -y wget
- mkdir Cbc && cd Cbc
- wget https://www.coin-or.org/download/source/Cbc/Cbc-$CBC_VERSION.tgz
- tar -zxvf Cbc-$CBC_VERSION.tgz --strip 1
- ./configure --disable-shared -with-pic
- make
- make install
artifacts:
paths:
- Cbc/lib
- Cbc/include
#
# Build python
#
build_cp27-cp27m_x86_64_linux:
<<: *buildlinux
variables:
PYTHON_ENV: /opt/python/cp27-cp27m
build_cp27-cp27mu_x86_64_linux:
<<: *buildlinux
variables:
PYTHON_ENV: /opt/python/cp27-cp27mu
build_cp34-cp34m_x86_64_linux:
<<: *buildlinux
variables:
PYTHON_ENV: /opt/python/cp34-cp34m
build_cp35-cp35m_x86_64_linux:
<<: *buildlinux
variables:
PYTHON_ENV: /opt/python/cp35-cp35m
build_cp36-cp36m_x86_64_linux:
<<: *buildlinux
variables:
PYTHON_ENV: /opt/python/cp36-cp36m
build_cp37-cp37m_x86_64_linux:
<<: *buildlinux
variables:
PYTHON_ENV: /opt/python/cp37-cp37m
build_py27_win32_msvc9:
<<: *buildwin
image: ikus060/manywindows
allow_failure: true
variables:
SWIG: swigwin-4.0.0/swig.exe
PYTHON_ENV: /opt/python/cp27-cp27m-win32
#
# Publish manylinux packages
#
publish_nexus:
stage: publish
image: python:3
script:
- pip install twine --upgrade
- python setup.py sdist
- twine upload wheelhouse/* -u $NEXUS_USR -p $NEXUS_PWD --repository-url $NEXUS_PYPI_URL
publish_pypi:
stage: publish
image: python:3
only:
- tags
script:
- pip3 install twine --upgrade
- python setup.py sdist
- twine upload wheelhouse/* -u $PYPI_USR -p $PYPI_PWD
cbcpy-2.10.3-2/LICENSE 0000664 0000000 0000000 00000017207 13525002437 0014051 0 ustar 00root root 0000000 0000000 GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library. cbcpy-2.10.3-2/README.md 0000664 0000000 0000000 00000003442 13525002437 0014317 0 ustar 00root root 0000000 0000000 # cbcpy
Native Python interface for Coin-or Branch and Cut Solver ([Cbc](https://github.com/coin-or/Cbc)).
# Description
This project provide the build mechanism to automatically generate the wrapper code between Cbc c++ code and python using [SWIG](http://www.swig.org/).
This project was develop as part of the CBC Coin-or Sprint Aug 2019.
Binaries for the following platform are pre-compiled:
* linux x86_64 / python 2.7
* linux x86_64 / python 3.5
* linux x86_64 / python 3.6
* linux x86_64 / python 3.7
* win32 / python 2.7
**Linux i386 is not supported.**
NOTICE Adding more platform is in progress.
# Installation
Pre-compiled python packages are deployed to [cbcpy Pypi repositories](https://pypi.org/cbcpy).
To install `cbcpy` you should make use of `pip` command line:
pip install cbcpy
The packages include pre-compiled version of Cbc.
# Usage
Here a minimalistic python script making use of `cbcpy`.
You may download `p0033.mps` from [here](https://raw.githubusercontent.com/coin-or/yaposib/master/examples/p0033.mps).
import cbcpy as cbc
solver1 = cbc.OsiClpSolverInterface()
solver1.readMps("p0033.mps")
model = cbc.CbcModel(solver1)
model.branchAndBound()
numberColumns = model.solver().getNumCols()
p_solution = model.solver().getColSolution()
solution = cbc.doubleArray_frompointer(p_solution)
for i in range(numberColumns):
value = solution[i]
print("%s has value %s" % (i, value))
# Documentation
Original documentation from Cbc project is available in python using the `help()` function.
# python
Python 2.7.16 (default, Jul 13 2019, 16:01:51)
[GCC 8.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cbcpy
>>> help(cbcpy)
Help on module cbcpy:
cbcpy-2.10.3-2/cbcpy.i 0000664 0000000 0000000 00000002507 13525002437 0014313 0 ustar 00root root 0000000 0000000 /*
* Coin-or CBC native interface for Python
* Copyright (C) 2019 Patrik Dufresne Service Logiciel
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
%module cbcpy
%{
#include "CbcModel.hpp"
#include "CbcStrategy.hpp"
#include "OsiSolverInterface.hpp"
#include "OsiClpSolverInterface.hpp"
%}
%ignore OsiSolverInterfaceCommonUnitTest;
%ignore OsiSolverInterfaceMpsUnitTest;
%ignore OsiClpSolverInterfaceUnitTest;
%include "carrays.i"
%array_class(double, doubleArray);
%include "CbcModel.hpp"
%include "CbcStrategy.hpp"
%include "OsiSolverInterface.hpp"
%include "OsiClpSolverInterface.hpp" cbcpy-2.10.3-2/patches/ 0000775 0000000 0000000 00000000000 13525002437 0014464 5 ustar 00root root 0000000 0000000 cbcpy-2.10.3-2/patches/01_CbcModel.diff 0000664 0000000 0000000 00000005614 13525002437 0017274 0 ustar 00root root 0000000 0000000 --- a/Cbc/include/coin/CbcModel.hpp 2019-06-15 03:04:50.000000000 +0000
+++ b/Cbc/include/coin/CbcModel.hpp 2019-08-07 21:51:54.753624098 +0000
@@ -2346,10 +2346,10 @@
{
return master_;
}
+#ifdef CBC_THREAD
/// From here to end of section - code in CbcThread.cpp until class changed
/// Returns true if locked
bool isLocked() const;
-#ifdef CBC_THREAD
/**
Locks a thread if parallel so that stuff like cut pool
can be updated and/or used.
@@ -2359,12 +2359,6 @@
Unlocks a thread if parallel to say cut pool stuff not needed
*/
void unlockThread();
-#else
- inline void lockThread()
- {
- }
- inline void unlockThread() {}
-#endif
/** Set information in a child
-3 pass pointer to child thread info
-2 just stop
@@ -2389,7 +2383,7 @@
void mergeModels(int numberModel, CbcModel **model,
int numberNodes);
//@}
-
+#endif
///@name semi-private i.e. users should not use
//@{
/// Get how many Nodes it took to solve the problem.
@@ -2430,7 +2424,6 @@
bool &resolved, CoinWarmStartBasis *lastws,
const double *lowerBefore, const double *upperBefore,
OsiSolverBranch *&branches);
- int chooseBranch(CbcNode *newNode, int numberPassesLeft, bool &resolved);
/** Return an empty basis object of the specified size
@@ -2505,8 +2498,6 @@
void synchronizeNumberBeforeTrust(int type = 0);
/// Zap integer information in problem (may leave object info)
void zapIntegerInformation(bool leaveObjects = true);
- /// Use cliques for pseudocost information - return nonzero if infeasible
- int cliquePseudoCosts(int doStatistics);
/// Fill in useful estimates
void pseudoShadow(int type);
/** Return pseudo costs
@@ -3251,7 +3242,6 @@
// So we can call from other programs
// Real main program
class OsiClpSolverInterface;
-int CbcMain(int argc, const char *argv[], OsiClpSolverInterface &solver, CbcModel **babSolver);
int CbcMain(int argc, const char *argv[], CbcModel &babSolver);
// four ways of calling
int callCbc(const char *input2, OsiClpSolverInterface &solver1);
@@ -3264,12 +3254,8 @@
// two ways of calling
int callCbc(const char *input2, CbcModel &babSolver);
int callCbc(const std::string input2, CbcModel &babSolver);
-// And when CbcMain0 already called to initialize
-int callCbc1(const char *input2, CbcModel &babSolver);
-int callCbc1(const std::string input2, CbcModel &babSolver);
// And when CbcMain0 already called to initialize (with call back) (see CbcMain1 for whereFrom)
int callCbc1(const char *input2, CbcModel &babSolver, int(CbcModel *currentSolver, int whereFrom));
-int callCbc1(const std::string input2, CbcModel &babSolver, int(CbcModel *currentSolver, int whereFrom));
int CbcMain1(int argc, const char *argv[], CbcModel &babSolver, int(CbcModel *currentSolver, int whereFrom));
// For uniform setting of cut and heuristic options
void setCutAndHeuristicOptions(CbcModel &model);
cbcpy-2.10.3-2/patches/02_OsiClpSolverInterface.diff 0000664 0000000 0000000 00000003660 13525002437 0022031 0 ustar 00root root 0000000 0000000 --- a/Cbc/include/coin/OsiClpSolverInterface.hpp 2019-06-15 02:56:22.000000000 +0000
+++ b/Cbc/include/coin/OsiClpSolverInterface.hpp 2019-08-07 21:53:40.886632449 +0000
@@ -174,13 +174,9 @@
and can be queried by other methods.
*/
virtual void enableSimplexInterface(bool doingPrimal);
- /// Copy across enabled stuff from one solver to another
- void copyEnabledSuff(OsiClpSolverInterface &rhs);
/*! \brief Undo setting changes made by #enableSimplexInterface */
virtual void disableSimplexInterface();
- /// Copy across enabled stuff from one solver to another
- void copyEnabledStuff(ClpSimplex &rhs);
/** Perform a pivot by substituting a colIn for colOut in the basis.
The status of the leaving variable is given in statOut. Where
@@ -340,16 +336,6 @@
void stopFastDual();
/// Sets integer tolerance and increment
void setStuff(double tolerance, double increment);
- /// Return a conflict analysis cut from small model
- OsiRowCut *smallModelCut(const double *originalLower, const double *originalUpper,
- int numberRowsAtContinuous, const int *whichGenerator,
- int typeCut = 0);
- /** Return a conflict analysis cut from model
- If type is 0 then genuine cut, if 1 then only partially processed
- */
- OsiRowCut *modelCut(const double *originalLower, const double *originalUpper,
- int numberRowsAtContinuous, const int *whichGenerator,
- int typeCut = 0);
//@}
//---------------------------------------------------------------------------
@@ -972,7 +958,6 @@
/// This loads a model from a coinModel object - returns number of errors
virtual int loadFromCoinModel(CoinModel &modelObject, bool keepSolution = false);
- using OsiSolverInterface::readMps;
/** Read an mps file from the given filename (defaults to Osi reader) - returns
number of errors (see OsiMpsReader class) */
virtual int readMps(const char *filename,
cbcpy-2.10.3-2/setup.py 0000664 0000000 0000000 00000004405 13525002437 0014552 0 ustar 00root root 0000000 0000000 #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Coin-or CBC native interface for Python
# Coin-or CBC native interface for Python
# Copyright (C) 2019 Patrik Dufresne Service Logiciel
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import os
try:
from setuptools import setup, Extension
except ImportError:
import ez_setup
ez_setup.use_setuptools()
from setuptools import setup, Extension
CBC_DIR = os.environ.get('CBC_DIR', './Cbc')
if not os.path.isdir(CBC_DIR):
print('CBC_DIR environment variable must be a directory: ' + CBC_DIR)
include_dirs = [os.path.join(CBC_DIR, 'include/coin')]
library_dirs = [os.path.join(CBC_DIR, 'lib')]
libraries = ['CbcSolver', 'Cbc', 'Cgl', 'OsiClp', 'OsiCbc', 'Osi', 'Clp', 'CoinUtils']
if os.name == 'nt':
extra_objects = []
libraries = ['lib' + name for name in libraries]
else:
extra_objects = ['%s/lib%s.a' % (library_dirs[0], l) for l in libraries]
libraries = []
swig_opts=['-c++','-doxygen']
swig_opts.extend(['-I%s' % i for i in include_dirs])
setup(
name='cbcpy',
version="2.10.3-2",
description='Coin-or CBC native interface for Python',
author='Patrik Dufresne',
author_email='info@patrikdufresne.com',
url='https://git.patrikdufresne.com/pdsl/cbcpy',
license="",
ext_modules=[Extension(
'_cbcpy',
['cbcpy.i'],
swig_opts=swig_opts,
include_dirs=include_dirs,
library_dirs=library_dirs,
libraries=libraries,
extra_objects=extra_objects)],
py_modules=['cbcpy'],
) cbcpy-2.10.3-2/tests/ 0000775 0000000 0000000 00000000000 13525002437 0014177 5 ustar 00root root 0000000 0000000 cbcpy-2.10.3-2/tests/p0033.mps 0000664 0000000 0000000 00000014633 13525002437 0015474 0 ustar 00root root 0000000 0000000 *NAME: p0033
*ROWS: 16
*COLUMNS: 33
*INTEGER: 33
*NONZERO: 98
*BEST SOLN: 3089 (opt)
*LP SOLN: 2520.57
*SOURCE: Crowder-Johnson-Padberg test set
*
* E. Andrew Boyd (Rice University)
*APPLICATION: unknown
*COMMENTS: pure 0/1 IP
* 5 SOS constraints
*
NAME P0033
ROWS
N R100
L R114
L R115
L R116
L R117
L R118
L R119
L R120
L R121
L R122
L R123
L R124
L R125
L R126
L R127
L R128
L ZBESTROW
COLUMNS
MARK0000 'MARKER' 'INTORG'
C157 R100 171 R114 1
C157 R122 -300 R123 -300
C158 R100 171 R114 1
C158 R126 -300 R127 -300
C159 R100 171 R114 1
C159 R119 300 R120 -300
C159 R123 -300
C160 R100 171 R114 1
C160 R119 300 R120 -300
C160 R121 -300
C161 R100 163 R115 1
C161 R119 285 R120 -285
C161 R124 -285 R125 -285
C162 R100 162 R115 1
C162 R119 285 R120 -285
C162 R122 -285 R123 -285
C163 R100 163 R115 1
C163 R128 -285
C164 R100 69 R116 1
C164 R119 265 R120 -265
C164 R124 -265 R125 -265
C165 R100 69 R116 1
C165 R119 265 R120 -265
C165 R122 -265 R123 -265
C166 R100 183 R117 1
C166 R118 -230
C167 R100 183 R117 1
C167 R124 -230 R125 -230
C168 R100 183 R117 1
C168 R119 230 R120 -230
C168 R125 -230
C169 R100 183 R117 1
C169 R119 230 R120 -230
C169 R123 -230
C170 R100 49 R119 190
C170 R120 -190 R122 -190
C170 R123 -190
C171 R100 183 R117 1
C172 R100 258 R118 -200
C173 R100 517 R118 -400
C174 R100 250 R126 -200
C174 R127 -200
C175 R100 500 R126 -400
C175 R127 -400
C176 R100 250 R127 -200
C177 R100 500 R127 -400
C178 R100 159 R119 200
C178 R120 -200 R124 -200
C178 R125 -200
C179 R100 318 R119 400
C179 R120 -400 R124 -400
C179 R125 -400
C180 R100 159 R119 200
C180 R120 -200 R125 -200
C181 R100 318 R119 400
C181 R120 -400 R125 -400
C182 R100 159 R119 200
C182 R120 -200 R122 -200
C182 R123 -200
C183 R100 318 R119 400
C183 R120 -400 R122 -400
C183 R123 -400
C184 R100 159 R119 200
C184 R120 -200 R123 -200
C185 R100 318 R119 400
C185 R120 -400 R123 -400
C186 R100 114 R119 200
C186 R120 -200 R121 -200
C187 R100 228 R119 400
C187 R120 -400 R121 -400
C188 R100 159 R128 -200
C189 R100 318 R128 -400
MARK0001 'MARKER' 'INTEND'
RHS
RHS R114 1 R115 1
RHS R116 1 R117 1
RHS R118 -5 R119 2700
RHS R120 -2600 R121 -100
RHS R122 -900 R123 -1656
RHS R124 -335 R125 -1026
RHS R126 -5 R127 -500
RHS R128 -270
BOUNDS
UP ONE C157 1
UP ONE C158 1
UP ONE C159 1
UP ONE C160 1
UP ONE C161 1
UP ONE C162 1
UP ONE C163 1
UP ONE C164 1
UP ONE C165 1
UP ONE C166 1
UP ONE C167 1
UP ONE C168 1
UP ONE C169 1
UP ONE C170 1
UP ONE C171 1
UP ONE C172 1
UP ONE C173 1
UP ONE C174 1
UP ONE C175 1
UP ONE C176 1
UP ONE C177 1
UP ONE C178 1
UP ONE C179 1
UP ONE C180 1
UP ONE C181 1
UP ONE C182 1
UP ONE C183 1
UP ONE C184 1
UP ONE C185 1
UP ONE C186 1
UP ONE C187 1
UP ONE C188 1
UP ONE C189 1
ENDATA
cbcpy-2.10.3-2/tests/test.py 0000664 0000000 0000000 00000000555 13525002437 0015535 0 ustar 00root root 0000000 0000000 import cbc
solver1 = cbc.OsiClpSolverInterface()
solver1.readMps("p0033.mps")
model = cbc.CbcModel(solver1)
model.branchAndBound()
numberColumns = model.solver().getNumCols()
p_solution = model.solver().getColSolution()
solution = cbc.doubleArray_frompointer(p_solution)
for i in range(numberColumns):
value = solution[i]
print("%s has value %s" % (i, value))