[Dip] Dippy

Ted Ralphs ted at lehigh.edu
Thu Feb 6 12:58:09 EST 2014


It's been a while since I tried any of the test scripts, so it's possible
they are broken. The examples should be up to date, though, and I've been
using those for testing. Try running the facility location one.

cd Dip-0.9.8/examples/Dippy/cflp
python facility_location.py

I'll take a look at the tests later. Did you build Dip with CPLEX as the
underlying solver? Otherwise, I don't see why CPLEX would be called.

Cheers,

Ted


On Thu, Feb 6, 2014 at 11:33 AM, Romain Montagné <romain.montagne at polymtl.ca
> wrote:

> Great! That worked! Thanks!
>
> -I had to add a "export
> LD_LIBRARY_PATH=/home/montroma/Dip-0.9.8/build/lib:$LD_LIBRARY_PATH"
> though, otherwise I had an error when i tried to import coinor.dippy.
>
> -However, the tests do not work:
>
> cd /home/montroma/Dip-0.9.8/Dip/src/dippy/tests
>
> python test_coke.py
>
> COIN Exception [ Error calling method row.getName() ] at
> src/dippy/DippyDecompApp.cpp:L47 in DippyDecompApp::createModels
> Error returned from _dippy
> getName
> E
>
> Then CPLEX solves the problem
>
> CPLEX> Solution written to file '/tmp/12736-pulp.sol'.
>
> CPLEX> .
> ======================================================================
> ERROR: test_dippy_branch (__main__.TestCokeProblem)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "test_coke.py", line 31, in test_dippy_branch
>     dippy.Solve(self.prob, {})
>   File "build/bdist.linux-x86_64/egg/coinor/dippy/dippy.py", line 126, in
> Solve
>     status, message, solList, dualList = _Solve(prob, processed)
> AttributeError: getName
>
> ----------------------------------------------------------------------
> Ran 2 tests in 0.234s
>
> FAILED (errors=1)
>
>
> Am I missing something?
>
> Thanks,
>
> Romain
>
>
>
> Le 5 févr. 2014 à 12:34, Ted Ralphs a écrit :
>
> You are correct---you need to run the setup.py script that is in the
> source directory, but COIN_INSTALL_DIR should still be set to the location
> where Dip is installed, i.e., the build directory. In other words, just run
> the command I indicated:
>
> COIN_INSTALL_DIR=/path/to/Dip-0.9.8/build python setup.py install
>
> but run it in the directory /path/to/Dip-0.9.8/Dip, where the setup.py
> file actually lives. Everything should then work and DipPy should be
> installed.
>
> Cheers,
>
> Ted
>
>
> On Mon, Feb 3, 2014 at 10:59 AM, Romain Montagné <
> romain.montagne at polymtl.ca> wrote:
>
>> Ok, I have been able to install Dip-0.9.8 correctly, I think:
>>
>> dhcp-10-231-192-228:Documents romainmontagne$ cd ./Dip-0.9.8
>>
>> dhcp-10-231-192-228:Dip-0.9.8 romainmontagne$ ls
>> AUTHORS Data Makefile.am config.guess ltmain.sh
>> Alps Dependencies Makefile.in config.sub missing
>> BuildTools Dip Osi configure share
>> Cbc GiMPy README configure.ac
>> Cgl GrUMPy ThirdParty depcomp
>> Clp INSTALL build doxydoc
>> CoinUtils LICENSE conf install-sh
>>
>> dhcp-10-231-192-228:Dip-0.9.8 romainmontagne$ cd build
>>
>> dhcp-10-231-192-228:build romainmontagne$ ls
>> Alps GiMPy config.status
>> Cbc GrUMPy include
>> Cgl Makefile lib
>> Clp Osi libtool
>> CoinUtils bin share
>> Data coin_subdirs.txt
>> Dip config.log
>>
>>
>> However, in my "build folder", there is no "setup.py", which makes it
>> impossible to execute the last command
>> (COIN_INSTALL_DIR=/path/to/Dip-0.9.8/build python setup.py install )...stuck
>> again.
>>
>> There is however a setup.py in this folder:
>>
>> dhcp-10-231-192-228:Dip romainmontagne$ cd
>> /Users/romainmontagne/Documents/Dip-0.9.8/Dip
>>
>> dhcp-10-231-192-228:Dip romainmontagne$ ls
>> AUTHORS config.guess ez_setup.pyc
>> LICENSE config.sub install-sh
>> MSVisualStudio configure ltmain.sh
>> Makefile.am configure.ac missing
>> Makefile.in data py-compile
>> README depcomp scripts
>> README.rst dip-uninstalled.pc.in setup.py
>> bugs dip.pc.in src
>> build examples test
>> coinor.dippy.egg-info ez_setup.py
>>
>> But if i
>> type COIN_INSTALL_DIR=/Users/romainmontagne/Documents/Dip-0.9.8/Dip python
>> setup.py install, here is what I get:
>>
>> dhcp-10-231-192-228:Dip romainmontagne$
>> COIN_INSTALL_DIR=/Users/romainmontagne/Documents/Dip-0.9.8/Dip python
>> setup.py install
>> Traceback (most recent call last):
>>   File "setup.py", line 87, in <module>
>>     libraries = get_libs(coin_install_dir)
>>   File "setup.py", line 31, in get_libs
>>     'doc', 'Dip', 'dip_addlibs.txt')) as f:
>> IOError: [Errno 2] No such file or directory:
>> '/Users/romainmontagne/Documents/Dip-0.9.8/Dip/share/coin/doc/Dip/dip_addlibs.txt'
>>
>>
>> I have a feeling I'm pretty close...I hope!
>>
>> Romain
>>
>>
>>
>>
>> Le 30 janv. 2014 à 18:59, Ted Ralphs a écrit :
>>
>> The problem now is that when the binaries you downloaded were built, they
>> were linked with the gfortran library. You can fix this by installing
>> gfortran with homebrew or by removing the dependency from the
>> dip_addlibs.txt file. However, I do believe that easiest thing is always
>> just to download and build COIN on your own machine so that you know
>> everything works fine. Something like the following should work:
>>
>> Download http://www.coin-or.org/download/source/Dip/Dip-0.9.8.tgz
>>
>> tar -xzvf Dip-0.9.8.tgz
>> cd /path/to/Dip-0.9.8
>>  mkdir build
>> cd build
>> ../configure
>> make
>> make install
>> COIN_INSTALL_DIR=/path/to/Dip-0.9.8/build python setup.py install
>>
>> To answer your questions, most Python packages can be built with "python
>> setup.py install", but they may depend on libraries that one also has to
>> install separately and that is the crux of the problem. They Python
>> extension that is required to use DipPy will be built automatically on all
>> platforms with just the Python setup command, but Dip itself must already
>> be installed somewhere.
>>
>> If you have more questions, it would be great if you could post them to
>> the Dip mailing list so that other users can benefit from the answers.
>> Please do feel free to ask, though, as I would like Dip to be easy to use
>> as possible. It's useful to know what roadblocks there are to using it.
>>
>> Cheers,
>>
>> Ted
>>
>>
>> On Wed, Jan 29, 2014 at 11:16 PM, Romain Montagné <
>> romain.montagne at polymtl.ca> wrote:
>>
>>> Hello Ted,
>>>
>>> I am embarrassed to continue asking for your help, I have already wasted
>>> too much of your time.
>>>
>>> But setting up dippy is getting trickier by the day, each time a problem
>>> is solved, a new one appears. Here is the last one: after coping with the
>>> sudo issue, here the error I get in my terminal:
>>>
>>> dhcp-10-231-192-228:~ romainmontagne$ sudo -i
>>> Password:
>>> dhcp-10-231-192-228:~ root# export
>>> COIN_INSTALL_DIR=/Users/romainmontagne/Documents/Coin
>>> dhcp-10-231-192-228:~ root# easy_install coinor.dippy
>>> Searching for coinor.dippy
>>> Reading http://pypi.python.org/simple/coinor.dippy/
>>> Best match: coinor.dippy 1.9.8
>>> Downloading
>>> https://pypi.python.org/packages/source/c/coinor.dippy/coinor.dippy-1.9.8.tar.gz#md5=7d14f5b85b1ebb3dcfd9538dd207ca9b
>>> Processing coinor.dippy-1.9.8.tar.gz
>>> Running coinor.dippy-1.9.8/setup.py -q bdist_egg --dist-dir
>>> /tmp/easy_install-6zl0Pn/coinor.dippy-1.9.8/egg-dist-tmp-rnw0ec
>>> cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
>>> Ada/C/ObjC but not for C++
>>> In file included from src/dippy/DippyDecompAlgo.cpp:3:
>>> src/dippy/DippyDecompAlgo.h: In constructor
>>> 'DippyAlgoMixin::DippyAlgoMixin(UtilParameters*, PyObject*)':
>>> src/dippy/DippyDecompAlgo.h:31: warning: 'DippyAlgoMixin::m_utilParam'
>>> will be initialized after
>>> src/dippy/DippyDecompAlgo.h:24: warning:   'PyObject*
>>> DippyAlgoMixin::pDownLB'
>>> src/dippy/DippyDecompAlgo.h:39: warning:   when initialized here
>>> src/dippy/DippyDecompAlgo.cpp: In member function 'bool
>>> DippyAlgoMixin::chooseBranchSet(DecompAlgo*, std::vector<std::pair<int,
>>> double>, std::allocator<std::pair<int, double> > >&,
>>> std::vector<std::pair<int, double>, std::allocator<std::pair<int, double> >
>>> >&, std::vector<std::pair<int, double>, std::allocator<std::pair<int,
>>> double> > >&, std::vector<std::pair<int, double>,
>>> std::allocator<std::pair<int, double> > >&)':
>>> src/dippy/DippyDecompAlgo.cpp:29: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompAlgo.cpp:29: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompAlgo.cpp: In member function 'void
>>> DippyAlgoMixin::postProcessBranch(DecompAlgo*, DecompStatus)':
>>> src/dippy/DippyDecompAlgo.cpp:99: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompAlgo.cpp:99: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompAlgo.cpp:99: warning: unused variable 'pResult'
>>> src/dippy/DippyDecompAlgo.cpp: In member function 'void
>>> DippyAlgoMixin::postProcessNode(DecompAlgo*, DecompStatus)':
>>> src/dippy/DippyDecompAlgo.cpp:109: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompAlgo.cpp:109: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompAlgo.cpp:109: warning: unused variable 'pResult'
>>> cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
>>> Ada/C/ObjC but not for C++
>>> In file included from src/dippy/DippyDecompAlgo.cpp:3:
>>> src/dippy/DippyDecompAlgo.h: In constructor
>>> 'DippyAlgoMixin::DippyAlgoMixin(UtilParameters*, PyObject*)':
>>> src/dippy/DippyDecompAlgo.h:31: warning: 'DippyAlgoMixin::m_utilParam'
>>> will be initialized after
>>> src/dippy/DippyDecompAlgo.h:24: warning:   'PyObject*
>>> DippyAlgoMixin::pDownLB'
>>> src/dippy/DippyDecompAlgo.h:39: warning:   when initialized here
>>> src/dippy/DippyDecompAlgo.cpp: In member function 'bool
>>> DippyAlgoMixin::chooseBranchSet(DecompAlgo*, std::vector<std::pair<int,
>>> double>, std::allocator<std::pair<int, double> > >&,
>>> std::vector<std::pair<int, double>, std::allocator<std::pair<int, double> >
>>> >&, std::vector<std::pair<int, double>, std::allocator<std::pair<int,
>>> double> > >&, std::vector<std::pair<int, double>,
>>> std::allocator<std::pair<int, double> > >&)':
>>> src/dippy/DippyDecompAlgo.cpp:29: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompAlgo.cpp:29: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompAlgo.cpp: In member function 'void
>>> DippyAlgoMixin::postProcessBranch(DecompAlgo*, DecompStatus)':
>>> src/dippy/DippyDecompAlgo.cpp:99: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompAlgo.cpp:99: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompAlgo.cpp:99: warning: unused variable 'pResult'
>>> src/dippy/DippyDecompAlgo.cpp: In member function 'void
>>> DippyAlgoMixin::postProcessNode(DecompAlgo*, DecompStatus)':
>>> src/dippy/DippyDecompAlgo.cpp:109: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompAlgo.cpp:109: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompAlgo.cpp:109: warning: unused variable 'pResult'
>>> cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
>>> Ada/C/ObjC but not for C++
>>> src/dippy/DippyDecompApp.cpp: In member function 'void
>>> DippyDecompApp::createModels()':
>>> src/dippy/DippyDecompApp.cpp:24: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:44: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:50: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:56: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:87: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:93: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:99: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:105: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:154: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:185: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:185: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:199: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:205: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:211: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:241: warning: comparison between signed and
>>> unsigned integer expressions
>>> src/dippy/DippyDecompApp.cpp:254: warning: comparison between signed and
>>> unsigned integer expressions
>>> src/dippy/DippyDecompApp.cpp:266: warning: comparison between signed and
>>> unsigned integer expressions
>>> src/dippy/DippyDecompApp.cpp:280: warning: format '%d' expects type
>>> 'int', but argument 2 has type 'size_t'
>>> src/dippy/DippyDecompApp.cpp:280: warning: format '%d' expects type
>>> 'int', but argument 2 has type 'size_t'
>>> src/dippy/DippyDecompApp.cpp:19: warning: unused variable 'len'
>>> src/dippy/DippyDecompApp.cpp: In member function 'virtual
>>> DecompSolverStatus DippyDecompApp::solveRelaxed(int, const double*,
>>> DecompVarList&)':
>>> src/dippy/DippyDecompApp.cpp:348: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:348: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp: In member function 'virtual bool
>>> DippyDecompApp::APPisUserFeasible(const double*, int, double)':
>>> src/dippy/DippyDecompApp.cpp:409: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:409: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp: In member function 'virtual int
>>> DippyDecompApp::generateCuts(const double*, DecompCutList&)':
>>> src/dippy/DippyDecompApp.cpp:439: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:439: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:463: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:469: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:459: warning: unused variable 'value'
>>> src/dippy/DippyDecompApp.cpp: In member function 'virtual int
>>> DippyDecompApp::APPheuristics(const double*, const double*,
>>> std::vector<DecompSolution*, std::allocator<DecompSolution*> >&)':
>>> src/dippy/DippyDecompApp.cpp:502: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:502: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp: In member function 'virtual int
>>> DippyDecompApp::generateInitVars(DecompVarList&)':
>>> src/dippy/DippyDecompApp.cpp:552: warning: deprecated conversion from
>>> string constant to 'char*'
>>> cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
>>> Ada/C/ObjC but not for C++
>>> src/dippy/DippyDecompApp.cpp: In member function 'void
>>> DippyDecompApp::createModels()':
>>> src/dippy/DippyDecompApp.cpp:24: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:35: warning: implicit conversion shortens
>>> 64-bit value into a 32-bit value
>>> src/dippy/DippyDecompApp.cpp:38: warning: implicit conversion shortens
>>> 64-bit value into a 32-bit value
>>> src/dippy/DippyDecompApp.cpp:44: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:50: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:56: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:87: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:93: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:99: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:105: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:152: warning: implicit conversion shortens
>>> 64-bit value into a 32-bit value
>>> src/dippy/DippyDecompApp.cpp:152: warning: implicit conversion shortens
>>> 64-bit value into a 32-bit value
>>> src/dippy/DippyDecompApp.cpp:154: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:170: warning: implicit conversion shortens
>>> 64-bit value into a 32-bit value
>>> src/dippy/DippyDecompApp.cpp:185: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:185: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:194: warning: implicit conversion shortens
>>> 64-bit value into a 32-bit value
>>> src/dippy/DippyDecompApp.cpp:199: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:205: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:211: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:241: warning: comparison between signed and
>>> unsigned integer expressions
>>> src/dippy/DippyDecompApp.cpp:247: warning: implicit conversion shortens
>>> 64-bit value into a 32-bit value
>>> src/dippy/DippyDecompApp.cpp:254: warning: comparison between signed and
>>> unsigned integer expressions
>>> src/dippy/DippyDecompApp.cpp:263: warning: implicit conversion shortens
>>> 64-bit value into a 32-bit value
>>> src/dippy/DippyDecompApp.cpp:263: warning: implicit conversion shortens
>>> 64-bit value into a 32-bit value
>>> src/dippy/DippyDecompApp.cpp:266: warning: comparison between signed and
>>> unsigned integer expressions
>>> src/dippy/DippyDecompApp.cpp:280: warning: format '%d' expects type
>>> 'int', but argument 2 has type 'size_t'
>>> src/dippy/DippyDecompApp.cpp:280: warning: format '%d' expects type
>>> 'int', but argument 2 has type 'size_t'
>>> src/dippy/DippyDecompApp.cpp:285: warning: implicit conversion shortens
>>> 64-bit value into a 32-bit value
>>> src/dippy/DippyDecompApp.cpp:19: warning: unused variable 'len'
>>> src/dippy/DippyDecompApp.cpp: In member function 'virtual
>>> DecompSolverStatus DippyDecompApp::solveRelaxed(int, const double*,
>>> DecompVarList&)':
>>> src/dippy/DippyDecompApp.cpp:348: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:348: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:358: warning: implicit conversion shortens
>>> 64-bit value into a 32-bit value
>>> src/dippy/DippyDecompApp.cpp: In member function 'virtual bool
>>> DippyDecompApp::APPisUserFeasible(const double*, int, double)':
>>> src/dippy/DippyDecompApp.cpp:409: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:409: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp: In member function 'virtual int
>>> DippyDecompApp::generateCuts(const double*, DecompCutList&)':
>>> src/dippy/DippyDecompApp.cpp:439: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:439: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:453: warning: implicit conversion shortens
>>> 64-bit value into a 32-bit value
>>> src/dippy/DippyDecompApp.cpp:463: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:469: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:459: warning: unused variable 'value'
>>> src/dippy/DippyDecompApp.cpp: In member function 'virtual int
>>> DippyDecompApp::APPheuristics(const double*, const double*,
>>> std::vector<DecompSolution*, std::allocator<DecompSolution*> >&)':
>>> src/dippy/DippyDecompApp.cpp:502: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:502: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:516: warning: implicit conversion shortens
>>> 64-bit value into a 32-bit value
>>> src/dippy/DippyDecompApp.cpp: In member function 'virtual int
>>> DippyDecompApp::generateInitVars(DecompVarList&)':
>>> src/dippy/DippyDecompApp.cpp:552: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyDecompApp.cpp:564: warning: implicit conversion shortens
>>> 64-bit value into a 32-bit value
>>> cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
>>> Ada/C/ObjC but not for C++
>>> In file included from src/dippy/DippySolve.cpp:6:
>>> src/dippy/DippyDecompAlgo.h: In constructor
>>> 'DippyAlgoMixin::DippyAlgoMixin(UtilParameters*, PyObject*)':
>>> src/dippy/DippyDecompAlgo.h:31: warning: 'DippyAlgoMixin::m_utilParam'
>>> will be initialized after
>>> src/dippy/DippyDecompAlgo.h:24: warning:   'PyObject*
>>> DippyAlgoMixin::pDownLB'
>>> src/dippy/DippyDecompAlgo.h:39: warning:   when initialized here
>>> src/dippy/DippySolve.cpp: In function 'PyObject* Solve(PyObject*,
>>> PyObject*)':
>>> src/dippy/DippySolve.cpp:148: warning: unused variable 'size'
>>> cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
>>> Ada/C/ObjC but not for C++
>>> In file included from src/dippy/DippySolve.cpp:6:
>>> src/dippy/DippyDecompAlgo.h: In constructor
>>> 'DippyAlgoMixin::DippyAlgoMixin(UtilParameters*, PyObject*)':
>>> src/dippy/DippyDecompAlgo.h:31: warning: 'DippyAlgoMixin::m_utilParam'
>>> will be initialized after
>>> src/dippy/DippyDecompAlgo.h:24: warning:   'PyObject*
>>> DippyAlgoMixin::pDownLB'
>>> src/dippy/DippyDecompAlgo.h:39: warning:   when initialized here
>>> src/dippy/DippySolve.cpp: In function 'PyObject* Solve(PyObject*,
>>> PyObject*)':
>>> src/dippy/DippySolve.cpp:148: warning: unused variable 'size'
>>> cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
>>> Ada/C/ObjC but not for C++
>>> src/dippy/DippyModule.cpp: In function 'void init_dippy()':
>>> src/dippy/DippyModule.cpp:23: warning: unused variable 'pMod'
>>> cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
>>> Ada/C/ObjC but not for C++
>>> src/dippy/DippyModule.cpp: In function 'void init_dippy()':
>>> src/dippy/DippyModule.cpp:23: warning: unused variable 'pMod'
>>> cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
>>> Ada/C/ObjC but not for C++
>>> src/dippy/DippyPythonUtils.cpp: In function 'void
>>> pyColDict_AsPairedVector(PyObject*, std::vector<std::pair<int, double>,
>>> std::allocator<std::pair<int, double> > >&, std::map<PyObject*, int,
>>> std::less<PyObject*>, std::allocator<std::pair<PyObject* const, int> > >)':
>>> src/dippy/DippyPythonUtils.cpp:192: warning: comparison between signed
>>> and unsigned integer expressions
>>> src/dippy/DippyPythonUtils.cpp:193: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyPythonUtils.cpp: In function 'int
>>> pyColDict_AsPackedArrays(PyObject*, std::map<PyObject*, int,
>>> std::less<PyObject*>, std::allocator<std::pair<PyObject* const, int> > >,
>>> int**, double**)':
>>> src/dippy/DippyPythonUtils.cpp:230: warning: comparison between signed
>>> and unsigned integer expressions
>>> src/dippy/DippyPythonUtils.cpp:231: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyPythonUtils.cpp: In function 'CoinPackedMatrix*
>>> pyConstraints_AsPackedMatrix(PyObject*, std::map<PyObject*, int,
>>> std::less<PyObject*>, std::allocator<std::pair<PyObject* const, int> > >,
>>> std::map<PyObject*, int, std::less<PyObject*>,
>>> std::allocator<std::pair<PyObject* const, int> > >)':
>>> src/dippy/DippyPythonUtils.cpp:261: warning: unused variable 'lb'
>>> src/dippy/DippyPythonUtils.cpp:261: warning: unused variable 'ub'
>>> cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
>>> Ada/C/ObjC but not for C++
>>> src/dippy/DippyPythonUtils.cpp: In function 'PyObject*
>>> pyTupleList_FromDoubleArray(const double*, PyObject*)':
>>> src/dippy/DippyPythonUtils.cpp:23: warning: implicit conversion shortens
>>> 64-bit value into a 32-bit value
>>> src/dippy/DippyPythonUtils.cpp: In function 'void
>>> pyColDict_AsPairedVector(PyObject*, std::vector<std::pair<int, double>,
>>> std::allocator<std::pair<int, double> > >&, std::map<PyObject*, int,
>>> std::less<PyObject*>, std::allocator<std::pair<PyObject* const, int> > >)':
>>> src/dippy/DippyPythonUtils.cpp:181: warning: implicit conversion
>>> shortens 64-bit value into a 32-bit value
>>> src/dippy/DippyPythonUtils.cpp:192: warning: comparison between signed
>>> and unsigned integer expressions
>>> src/dippy/DippyPythonUtils.cpp:193: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyPythonUtils.cpp: In function 'int
>>> pyColDict_AsPackedArrays(PyObject*, std::map<PyObject*, int,
>>> std::less<PyObject*>, std::allocator<std::pair<PyObject* const, int> > >,
>>> int**, double**)':
>>> src/dippy/DippyPythonUtils.cpp:217: warning: implicit conversion
>>> shortens 64-bit value into a 32-bit value
>>> src/dippy/DippyPythonUtils.cpp:230: warning: comparison between signed
>>> and unsigned integer expressions
>>> src/dippy/DippyPythonUtils.cpp:231: warning: deprecated conversion from
>>> string constant to 'char*'
>>> src/dippy/DippyPythonUtils.cpp: In function 'CoinPackedMatrix*
>>> pyConstraints_AsPackedMatrix(PyObject*, std::map<PyObject*, int,
>>> std::less<PyObject*>, std::allocator<std::pair<PyObject* const, int> > >,
>>> std::map<PyObject*, int, std::less<PyObject*>,
>>> std::allocator<std::pair<PyObject* const, int> > >)':
>>> src/dippy/DippyPythonUtils.cpp:258: warning: implicit conversion
>>> shortens 64-bit value into a 32-bit value
>>> src/dippy/DippyPythonUtils.cpp:268: warning: implicit conversion
>>> shortens 64-bit value into a 32-bit value
>>> src/dippy/DippyPythonUtils.cpp:285: warning: implicit conversion
>>> shortens 64-bit value into a 32-bit value
>>> src/dippy/DippyPythonUtils.cpp:261: warning: unused variable 'lb'
>>> src/dippy/DippyPythonUtils.cpp:261: warning: unused variable 'ub'
>>> ld: warning: directory not found for option
>>> '-L/Users/jenkins/slave/workspace/all-1.7.4-macosx-x86_64-clang500.2.76/1.7.4/build/lib'
>>> ld: warning: directory not found for option
>>> '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin11/4.6.2'
>>> ld: warning: directory not found for option
>>> '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin11/4.6.2/../../..'
>>> ld: warning: directory not found for option
>>> '-L/Users/jenkins/slave/workspace/all-1.7.4-macosx-x86_64-clang500.2.76/1.7.4/build/lib'
>>> ld: library not found for -lgfortran
>>> collect2: ld returned 1 exit status
>>> ld: warning: directory not found for option
>>> '-L/Users/jenkins/slave/workspace/all-1.7.4-macosx-x86_64-clang500.2.76/1.7.4/build/lib'
>>> ld: warning: directory not found for option
>>> '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin11/4.6.2'
>>> ld: warning: directory not found for option
>>> '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin11/4.6.2/../../..'
>>> ld: warning: directory not found for option
>>> '-L/Users/jenkins/slave/workspace/all-1.7.4-macosx-x86_64-clang500.2.76/1.7.4/build/lib'
>>> ld: library not found for -lgfortran
>>> collect2: ld returned 1 exit status
>>> lipo: can't open input file: /var/tmp//cclF0Brz.out (No such file or
>>> directory)
>>> error: Setup script exited with error: command 'llvm-g++-4.2' failed
>>> with exit status 1
>>>
>>> You may know what is wrong again?
>>>
>>> Out of curiosity, why can't all programs be set up with a "python
>>> setup.py"? I suppose that requires additional effort for the computer
>>> scientist who makes the program?
>>>
>>> Again, thank you for responding to the previous mails!
>>>
>>> Romain
>>>
>>>
>>> Le 28 janv. 2014 à 01:21, Ted Ralphs a écrit :
>>>
>>> The reason you are still getting the key error is because of the sudo
>>> command. sudo logs you in as another user who does not inherit your
>>> environment variables. You need to do
>>>
>>> sudo COIN_INSTALL_DIR=... python setup.py
>>>
>>> Alternatively, you could use virtualenv or Homebrew Python to avoid sudo.
>>>
>>> For some reason, you are still getting the source distribution rather
>>> than the binary, but I guess the reason is probably that you are using an
>>> older version of OS X and/or Python.
>>>
>>> Everything should work easily on Linux. To avoid issues with not being
>>> admin, you can use virtualenv. I don't believe there could be an
>>> incompatibility with a particular flavor of Linux if you are building from
>>> source. With binaries you may not have compatibility because of the version
>>> of libc installed or something like that. But in general, I've never met a
>>> Linux machine that Dip wouldn't build and install on out of the box.
>>>
>>> Cheers,
>>>
>>> Ted
>>>
>>>
>>> On Mon, Jan 27, 2014 at 12:06 PM, Romain Montagné <
>>> romain.montagne at polymtl.ca> wrote:
>>>
>>>> Hello,
>>>>
>>>> I tried downloading dippy on my computer at the lab (GERAD) with some
>>>> help, but new problems arose: the technician told me they were due to the
>>>> fact that
>>>>
>>>> - I am not admin
>>>>
>>>> - there seems to be incompatibilities between dippy and Oracle linux 6.3
>>>>
>>>> Does that make any sense?
>>>>
>>>>
>>>> I tried again on my mac-os, because it seems much simpler with
>>>> easy_install as you advised:
>>>>
>>>> dhcp-10-231-192-228:~ romainmontagne$ uname -a
>>>> Darwin dhcp-10-231-192-228 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug
>>>> 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64 %my
>>>> mac os is 64 bits after all
>>>>
>>>>
>>>> dhcp-10-231-192-228:~ romainmontagne$ cd
>>>> /Users/romainmontagne/Documents/Coin
>>>> dhcp-10-231-192-228:Coin romainmontagne$ ls %the binaries are in this
>>>> directory
>>>> bin include lib share
>>>>
>>>>
>>>> dhcp-10-231-192-228:Coin romainmontagne$ export
>>>> COIN_INSTALL_DIR=/Users/romainmontagne/Documents/Coin %like you told
>>>> me to do
>>>> dhcp-10-231-192-228:Coin romainmontagne$ sudo easy_install coinor.dippy
>>>> Password:
>>>> Searching for coinor.dippy
>>>> Reading http://pypi.python.org/simple/coinor.dippy/
>>>> Best match: coinor.dippy 1.9.8
>>>> Downloading
>>>> https://pypi.python.org/packages/source/c/coinor.dippy/coinor.dippy-1.9.8.tar.gz#md5=7d14f5b85b1ebb3dcfd9538dd207ca9b
>>>> Processing coinor.dippy-1.9.8.tar.gz
>>>> Running coinor.dippy-1.9.8/setup.py -q bdist_egg --dist-dir
>>>> /tmp/easy_install-Q6hWNr/coinor.dippy-1.9.8/egg-dist-tmp-D_QuHi
>>>> Traceback (most recent call last):
>>>>   File "/usr/bin/easy_install-2.7", line 10, in <module>
>>>>     load_entry_point('setuptools==0.6c12dev-r85381', 'console_scripts',
>>>> 'easy_install')()
>>>>   File
>>>> "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py",
>>>> line 1712, in main
>>>>     with_ei_usage(lambda:
>>>>   File
>>>> "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py",
>>>> line 1700, in with_ei_usage
>>>>     return f()
>>>>   File
>>>> "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py",
>>>> line 1716, in <lambda>
>>>>     distclass=DistributionWithoutHelpCommands, **kw
>>>>   File
>>>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py",
>>>> line 152, in setup
>>>>     dist.run_commands()
>>>>   File
>>>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py",
>>>> line 953, in run_commands
>>>>     self.run_command(cmd)
>>>>   File
>>>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py",
>>>> line 972, in run_command
>>>>     cmd_obj.run()
>>>>   File
>>>> "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py",
>>>> line 211, in run
>>>>     self.easy_install(spec, not self.no_deps)
>>>>   File
>>>> "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py",
>>>> line 446, in easy_install
>>>>     return self.install_item(spec, dist.location, tmpdir, deps)
>>>>   File
>>>> "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py",
>>>> line 476, in install_item
>>>>     dists = self.install_eggs(spec, download, tmpdir)
>>>>   File
>>>> "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py",
>>>> line 655, in install_eggs
>>>>     return self.build_and_install(setup_script, setup_base)
>>>>   File
>>>> "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py",
>>>> line 930, in build_and_install
>>>>     self.run_setup(setup_script, setup_base, args)
>>>>   File
>>>> "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py",
>>>> line 919, in run_setup
>>>>     run_setup(setup_script, args)
>>>>   File
>>>> "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/sandbox.py",
>>>> line 62, in run_setup
>>>>     lambda: execfile(
>>>>   File
>>>> "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/sandbox.py",
>>>> line 105, in run
>>>>     return func()
>>>>   File
>>>> "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/sandbox.py",
>>>> line 64, in <lambda>
>>>>     {'__file__':setup_script, '__name__':'__main__'}
>>>>   File "setup.py", line 15, in <module>
>>>>   File
>>>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/UserDict.py",
>>>> line 23, in __getitem__
>>>>     raise KeyError(key)
>>>> KeyError: 'COIN_INSTALL_DIR'
>>>>
>>>>
>>>>
>>>> Can't get rid of the key error...
>>>>
>>>> What is weird is that my mac os uses 64 bits, but in Python, if I type
>>>> platform.architecture(), it returns "32 bits". Any chance the problem comes
>>>> from there?
>>>>
>>>> Thanks again!
>>>>
>>>> Romain
>>>>
>>>>
>>>>
>>>>
>>>> Le 26 janv. 2014 à 23:01, Ted Ralphs a écrit :
>>>>
>>>> Hi Romain,
>>>>
>>>> Yes, that would be an issue. I guess that Dip should build easily out
>>>> of the box if you want to use OS X.
>>>>
>>>> Cheers,
>>>>
>>>> Ted
>>>>
>>>>
>>>> On Sun, Jan 26, 2014 at 10:54 PM, Romain Montagné <
>>>> romain.montagne at polymtl.ca> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> Thank you for the very quick and detailed response.
>>>>>
>>>>> It still doesn't work, I think its because I'm using a 32 bit macosx
>>>>> (and not 64), and I did not find such a binary distribution. I will try
>>>>> tomorrow on a linux platform and keep you posted.
>>>>>
>>>>> Best regards,
>>>>>
>>>>> Romain
>>>>>
>>>>>
>>>>>
>>>>> Le 26 janv. 2014 à 21:39, Ted Ralphs a écrit :
>>>>>
>>>>> Hi Romaine,
>>>>>
>>>>> What command are you using to install---easy_install or pip? I
>>>>> uploaded a binary package for OSX, but I think it's built with Homebrew.
>>>>> Somehow, you are ending up with a source distribution---this is either
>>>>> because you are using pip or because there is no binary matching your
>>>>> version of Python. In either case, the solution is to install Dip somewhere
>>>>> then set the environment variable COIN_INSTALL_DIR to the location of the
>>>>> installation. To install COIN, you can either download a binary
>>>>> distribution for OSX from here:
>>>>>
>>>>>
>>>>> http://www.coin-or.org/download/binary/CoinAll/COIN-OR-1.7.4-macosx-x86_64-clang500.2.76.tgz
>>>>>
>>>>> or you can build Dip yourself, according to the quick start
>>>>> instructions here:
>>>>>
>>>>> https://projects.coin-or.org/Dip/
>>>>>
>>>>> After installing, just set COIN_INSTALL_DIR to the location of the
>>>>> installation directory and then everything should work. I'll try to make
>>>>> the error message a bit more informative.
>>>>>
>>>>> I will also try to build and upload a binary package for the system
>>>>> Python on OSX, which would mean installing with easy_install should then
>>>>> work out of the box.
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Ted
>>>>>
>>>>>
>>>>> On Sun, Jan 26, 2014 at 9:22 PM, Stuart Mitchell <
>>>>> stu at stuartmitchell.com> wrote:
>>>>>
>>>>>> I think you should contact the dippy devs micheal or Ted for this
>>>>>> problem
>>>>>> On 27 Jan 2014 10:21, "Romain Montagné" <romain.montagne at polymtl.ca>
>>>>>> wrote:
>>>>>>
>>>>>>> Thank you. I hate to continue bothering you, but i get the following
>>>>>>> error in my terminal:
>>>>>>>
>>>>>>>
>>>>>>> Downloading/unpacking coinor.dippy
>>>>>>>   Downloading coinor.dippy-1.9.8.tar.gz (2.1MB): 2.1MB downloaded
>>>>>>>   Running setup.py egg_info for package coinor.dippy
>>>>>>>     Traceback (most recent call last):
>>>>>>>       File "<string>", line 16, in <module>
>>>>>>>       File
>>>>>>> "/var/folders/tz/vj_t06957xgfs3mq910ny_zh0000gn/T/pip-build/coinor.dippy/setup.py",
>>>>>>> line 15, in <module>
>>>>>>>         coin_install_dir = os.environ['COIN_INSTALL_DIR']
>>>>>>>       File
>>>>>>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/UserDict.py",
>>>>>>> line 23, in __getitem__
>>>>>>>         raise KeyError(key)
>>>>>>>     KeyError: 'COIN_INSTALL_DIR'
>>>>>>>     Complete output from command python setup.py egg_info:
>>>>>>>     Traceback (most recent call last):
>>>>>>>
>>>>>>>   File "<string>", line 16, in <module>
>>>>>>>
>>>>>>>   File
>>>>>>> "/var/folders/tz/vj_t06957xgfs3mq910ny_zh0000gn/T/pip-build/coinor.dippy/setup.py",
>>>>>>> line 15, in <module>
>>>>>>>
>>>>>>>     coin_install_dir = os.environ['COIN_INSTALL_DIR']
>>>>>>>
>>>>>>>   File
>>>>>>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/UserDict.py",
>>>>>>> line 23, in __getitem__
>>>>>>>
>>>>>>>     raise KeyError(key)
>>>>>>>
>>>>>>> KeyError: 'COIN_INSTALL_DIR'
>>>>>>>
>>>>>>> ----------------------------------------
>>>>>>> Command python setup.py egg_info failed with error code 1 in
>>>>>>> /var/folders/tz/vj_t06957xgfs3mq910ny_zh0000gn/T/pip-build/coinor.dippy
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> It's killing me to not find the solution. Have you ever seen this
>>>>>>> error?
>>>>>>>
>>>>>>> Romain
>>>>>>>
>>>>>>>
>>>>>>> Le 26 janv. 2014 à 19:54, Stuart Mitchell a écrit :
>>>>>>>
>>>>>>> I think coinor.dippy is what you want.
>>>>>>> On 27 Jan 2014 03:18, "Romain Montagné" <romain.montagne at polymtl.ca>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Thanks for the tip. However I have been struggling trying to
>>>>>>>> install DIPPY. When i "pip install dippy", I think it downloads this
>>>>>>>> package: https://pypi.python.org/pypi/Dippy , which evidently
>>>>>>>> isn't what I need!
>>>>>>>>
>>>>>>>> Any suggestions?
>>>>>>>>
>>>>>>>> Thanks!
>>>>>>>>
>>>>>>>> Romain
>>>>>>>>
>>>>>>>> Le 14 juil. 2013 à 19:48, Stuart Mitchell a écrit :
>>>>>>>>
>>>>>>>> Yeah this is a problem.
>>>>>>>>
>>>>>>>> To fully solve this problem you need a branch and price framework,
>>>>>>>> I can suggest DIPPY
>>>>>>>> http://www.optimization-online.org/DB_FILE/2011/02/2921.pdf
>>>>>>>>
>>>>>>>> Stu
>>>>>>>>
>>>>>>>>
>>>>>>>> On Sat, Jul 13, 2013 at 7:51 AM, Romain Montagné <
>>>>>>>> romain.montagne at polymtl.ca> wrote:
>>>>>>>>
>>>>>>>>> Hello Stuart,
>>>>>>>>>
>>>>>>>>> Thanks to your different examples available online (optimization
>>>>>>>>> with Pulp), I have learned so much. In particular, your example of the
>>>>>>>>> Cutting Stock Problem using Column Generation has helped me a lot
>>>>>>>>> understand column generation.
>>>>>>>>>
>>>>>>>>> However, there is a point that remains mysterious: you solve the
>>>>>>>>> Relaxed Master Problem and the SubProblem until the SubProblem's objective
>>>>>>>>> is positive. Then, you solve the Master Problem one last time, but this
>>>>>>>>> time with Integrity constraints. However it is not guaranteed that, at this
>>>>>>>>> point, solving the Master Problem with Integrity constraints will give you
>>>>>>>>> the optimal solution. Let me clarify my point with a trivial example:
>>>>>>>>>
>>>>>>>>> Consider the following Cutting Stock Problem:
>>>>>>>>> -You have big rolls of standard width 90 cm
>>>>>>>>> -You can cut it into small rolls of widths 30 cm or 45 cm
>>>>>>>>> -You have the following demand: you need to produce one 30cm roll,
>>>>>>>>> and one 45cm roll
>>>>>>>>> -You simply want to minimize the amount of big rolls used
>>>>>>>>>
>>>>>>>>> The obvious optimal solution would be to cut one big roll using
>>>>>>>>> the pattern P0=[1,1].
>>>>>>>>>
>>>>>>>>> If you start the column generation algorithm using the patterns
>>>>>>>>> P1= [3,0] and P2= [0,2], solving the first subproblem gives a positive
>>>>>>>>> reduced cost, which means the relaxed Master Problem is optimal: indeed,
>>>>>>>>> using 0.5 of P2 and 0.333 of P1 gives an objective equal to 0.83. However,
>>>>>>>>> solving the Master Problem with the integrity constraints gives an
>>>>>>>>> objective equal to 2 (two big rolls are cut, one of P1, the other of P2).
>>>>>>>>>
>>>>>>>>> The conclusion of this is that the column generation approach as
>>>>>>>>> described in your example gives the optimal solution for the Relaxed Master
>>>>>>>>> Problem. I suppose obtaining the optimal solution for the Master Problem
>>>>>>>>> with integrity constraints requires some sort of sophisticated branching
>>>>>>>>> scheme...
>>>>>>>>>
>>>>>>>>> How do you deal with this point? What do you generally tell your
>>>>>>>>> students regarding this?
>>>>>>>>>
>>>>>>>>> Thank you for your help.
>>>>>>>>>
>>>>>>>>> Best regards,
>>>>>>>>>
>>>>>>>>> Romain
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Le 26 mai 2013 à 00:20, Stuart Mitchell a écrit :
>>>>>>>>>
>>>>>>>>> No you don't have too its just easier for debugging.
>>>>>>>>> On 26 May 2013 13:27, "Romain Montagné" <
>>>>>>>>> romain.montagne at polymtl.ca> wrote:
>>>>>>>>>
>>>>>>>>>> Hello Stuart,
>>>>>>>>>>
>>>>>>>>>> I am an OR student at Polytechnique Montreal, I discovered Pulp a
>>>>>>>>>> few weeks ago and I must say, I am absolutely thrilled by its simplicity
>>>>>>>>>> and effectiveness. Thank you! I am very grateful.
>>>>>>>>>>
>>>>>>>>>> As you say in one of your papers, using python is a relief
>>>>>>>>>> compared to "the agony of C++" !
>>>>>>>>>>
>>>>>>>>>> I have a question though, why is it necessary to write the
>>>>>>>>>> problems' data in an lp. file ? (e.g. :
>>>>>>>>>> prob.writeLP("BeerDistributionProblem.lp"))
>>>>>>>>>>
>>>>>>>>>> I have tried to solve the problem without writing this line, and
>>>>>>>>>> it works, so I was wondering why you do that. Is it easier for the solver
>>>>>>>>>> to read it this way or something?
>>>>>>>>>>
>>>>>>>>>> Thank you very much for you help, and for your contribution to
>>>>>>>>>> Operations Research!
>>>>>>>>>>
>>>>>>>>>> Best Regards,
>>>>>>>>>>
>>>>>>>>>> Romain
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Stuart Mitchell
>>>>>>>> PhD Engineering Science
>>>>>>>> Extraordinary Freelance Programmer and Optimisation Guru
>>>>>>>> www.stuartmitchell.com
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Dr. Ted Ralphs
>>>>> Associate Professor, Lehigh University
>>>>> (610) 628-1280
>>>>> ted 'at' lehigh 'dot' edu
>>>>> coral.ie.lehigh.edu/~ted
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Dr. Ted Ralphs
>>>> Associate Professor, Lehigh University
>>>> (610) 628-1280
>>>> ted 'at' lehigh 'dot' edu
>>>> coral.ie.lehigh.edu/~ted
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Dr. Ted Ralphs
>>> Associate Professor, Lehigh University
>>> (610) 628-1280
>>> ted 'at' lehigh 'dot' edu
>>> coral.ie.lehigh.edu/~ted
>>>
>>>
>>>
>>
>>
>> --
>> Dr. Ted Ralphs
>> Associate Professor, Lehigh University
>> (610) 628-1280
>> ted 'at' lehigh 'dot' edu
>> coral.ie.lehigh.edu/~ted
>>
>>
>>
>
>
> --
> Dr. Ted Ralphs
> Associate Professor, Lehigh University
> (610) 628-1280
> ted 'at' lehigh 'dot' edu
> coral.ie.lehigh.edu/~ted
>
>
>


-- 
Dr. Ted Ralphs
Associate Professor, Lehigh University
(610) 628-1280
ted 'at' lehigh 'dot' edu
coral.ie.lehigh.edu/~ted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/dip/attachments/20140206/9f4e1d9c/attachment-0001.html>


More information about the Dip mailing list