optional SCIP integer constraint solver (Ticket #10879)

53 views
Skip to first unread message

S

unread,
Apr 21, 2011, 1:03:55 AM4/21/11
to sage-devel
Hi,

I noticed that Martin started work on a SCIP wrapper for SAGE.
http://trac.sagemath.org/sage_trac/ticket/10879

I wanted to add two other ideas for interfacing with SCIP that are
written in python:

Numberjack
http://4c110.ucc.ie/numberjack/

python-zibopt
http://code.google.com/p/python-zibopt/

I'd love to use SCIP through SAGE, but am a newbie with SAGE so I
don't know how to help out.

Best, Shawn

Martin Albrecht

unread,
Apr 21, 2011, 5:07:20 AM4/21/11
to sage-...@googlegroups.com
On Thursday 21 April 2011, S wrote:
> Hi,

Hi,

> I noticed that Martin started work on a SCIP wrapper for SAGE.
> http://trac.sagemath.org/sage_trac/ticket/10879

> I wanted to add two other ideas for interfacing with SCIP that are
> written in python:
>
> Numberjack
> http://4c110.ucc.ie/numberjack/
>
> python-zibopt
> http://code.google.com/p/python-zibopt/

I knew python-zibopt but I didn't know Numberjack which looks interesting. The
reason I didn't go for python-zibopt is:

- we wanted a SCIP interface which matches our generic MIP interface such that
you can use SCIP wherever MIP is used in Sage (I could have written that on
top of python-zibopt I guess, but that would have meant more overhead)

- I wanted more constraints than python-zibopt offers. It only does MIP but I
want to access all the constrains SCIP has to offer (non-linear constraints
etc.)

- Finally, it was a good way for me to learn the API (and some internals) of
SCIP :)



> I'd love to use SCIP through SAGE, but am a newbie with SAGE so I
> don't know how to help out.

Sage is meant to be easy to get into in so let's test that :) What is your
interest? Do you want to add optional packages for Numberjack & python-zibopt
or are you happy with improving the current SCIP interface? If you want to
help out with the latter here are some ideas :)

- If you run Linux of some sort: just try it out, does it install okay for
you, does it work?
- If you run OSX and know your way around C you could help to fix the SIGSEGV
we see there
- You could read the documentation and improve it (i.e. provide documentation
patches for our SCIP interface)
- You could provide feedback what kind of interface would be nice to have,
i.e. how we can improve the interface

Cheers,
Martin

--
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://martinralbrecht.wordpress.com/
_jab: martinr...@jabber.ccc.de

Harald Schilly

unread,
Apr 21, 2011, 6:02:46 AM4/21/11
to sage-...@googlegroups.com
On Thursday, April 21, 2011 7:03:55 AM UTC+2, S wrote:

python-zibopt
   http://code.google.com/p/python-zibopt/

It's only for scip 1.2, we target scip 2.x !

H

S

unread,
Apr 21, 2011, 12:25:25 PM4/21/11
to sage-devel


On Apr 21, 2:07 am, Martin Albrecht <martinralbre...@googlemail.com>
wrote:
> - I wanted more constraints than python-zibopt offers. It only does MIP but I
> want to access all the constrains SCIP has to offer (non-linear constraints
> etc.)

Yes, me too! I too want to take advantage of some of the constraint
programming aspects of SCIP, such as expressing ALLDIFFERENT
constraints, which is a real chore with pure MIP expressions.

> What is your interest?

Ultimately, I want to use SCIP and SAGE to answer Operations Research
questions at the school district that I work at.
I am happy to contribute to learn the API and to help SAGE become a
good math programming language. I have read up on PuLP and Coopr some
as well, but I really like how SAGE does so much more than numerical
optimization.

> Do you want to add optional packages for Numberjack & python-zibopt or are you happy with improving the current SCIP interface?

It would probably be easier for me to work on the interface.

> - If you run Linux of some sort: just try it out, does it install okay for you, does it work?

I will try this but have win32 OS, so I will have to do all this
through virtualbox -- is it possible to install SCIP this way?
(I can try and find out too.)

> - You could read the documentation and improve it (i.e. provide documentation patches for our SCIP interface)

This sounds good, probably at my level of current ability as a
newbie.
I could also convert some other problems from PuLP to SAGE syntax to
add other examples to one of the tutorial websites
http://www.sagemath.org/doc/reference/sage/numerical/mip.html
http://www.sagemath.org/doc/thematic_tutorials/linear_programming.html#

> - You could provide feedback what kind of interface would be nice to have, i.e. how we can improve the interface

Definitely, I'll let you know once I get started.

On a slightly different topic:
I would also be interested in adding MIP support for other solvers
such as Gurobi.
I have Gurobi, but not CPLEXl; therefore without SCIP, I'm out of luck
solving MIP problems where CBC is too slow or are quadratic in
nature. PuLP provides a nice interface directly to the Gurobi API
which we could learn from, or another route is that Gurobi also
accepts LP files which SAGE can already create. Here is a video from
Gurobi ( http://www.gurobi.com/flash/shell-2011-02.html ) and where
they show how to the same an LP file could be read into Gurobi.

Thanks,

Shawn

S

unread,
Apr 21, 2011, 12:35:17 PM4/21/11
to sage-devel
I think the developer of zipopt plans on targeting the new version,
but hasn't yet.

Martin Albrecht

unread,
Apr 21, 2011, 3:00:47 PM4/21/11
to sage-...@googlegroups.com
> > > - If you run Linux of some sort: just try it out, does it install okay
> > for you, does it work?
>
> I will try this but have win32 OS, so I will have to do all this
> through virtualbox -- is it possible to install SCIP this way?
> (I can try and find out too.)

Yes, it should "just work" (TM) in your VirtualBox :)

> > - You could read the documentation and improve it (i.e. provide
> > documentation patches for our SCIP interface)
>
> This sounds good, probably at my level of current ability as a
> newbie.
> I could also convert some other problems from PuLP to SAGE syntax to
> add other examples to one of the tutorial websites
> http://www.sagemath.org/doc/reference/sage/numerical/mip.html
> http://www.sagemath.org/doc/thematic_tutorials/linear_programming.html#
>
> > - You could provide feedback what kind of interface would be nice to
> > have, i.e. how we can improve the interface
>
> Definitely, I'll let you know once I get started.
>
> On a slightly different topic:
> I would also be interested in adding MIP support for other solvers
> such as Gurobi.
> I have Gurobi, but not CPLEXl; therefore without SCIP, I'm out of luck
> solving MIP problems where CBC is too slow or are quadratic in
> nature. PuLP provides a nice interface directly to the Gurobi API
> which we could learn from, or another route is that Gurobi also
> accepts LP files which SAGE can already create. Here is a video from
> Gurobi ( http://www.gurobi.com/flash/shell-2011-02.html ) and where
> they show how to the same an LP file could be read into Gurobi.

I know Gurobi and IIRC there was some plan to add an interface to that too. I
think Harald Schilly did some work with the Gurobi interface but no-one worked
on a proper integration into Sage yet.

Nathann Cohen

unread,
Apr 25, 2011, 2:54:00 AM4/25/11
to sage-...@googlegroups.com

I know Gurobi and IIRC there was some plan to add an interface to that too. I
think Harald Schilly did some work with the Gurobi interface but no-one worked
on a proper integration into Sage yet.


I tried that a dozen of times -- my main problem is that I have no way to obtain a license for Gurobi. One needs to have one's computer on a university network, and the research lab I work in is not recognised as such. It works by running a program on your own computer, this program connects to their servers and build a licence file using information on your local hardware. For this reason even using sage.math is useless...

After several emails with them, they still stuck to the same lines, and I gave it up....

Though if their authentication system were to change .... ^^;

Nathann

S

unread,
Apr 26, 2011, 10:48:04 AM4/26/11
to sage-devel
Nathann,

If your university does have access, but your building does not you
could connect to their network through something like Cisco VPN.

Shawn
Reply all
Reply to author
Forward
0 new messages