I'm working on a C interface to SCIP
and for that I need a bi-directional dictionary, that is a dictionary where
you can query in both directions X->Y and Y->X. Of course, a simple
implementation is quickly done using two dictionaries but I was wondering:
since this is a general data structure, maybe someone else already implemented
it nicely in Sage under a different name? ... building the car instead of re-
implementing bi-directional dictionaries.
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
> When you say C interface to SCIP, are you talking about a Cython
> interface ?
Indeed, a Cython interface to SCIP.
> Are you talking about an interface between SCIP and Sage ?
So far my interface supports:
- linear, XOR and AND constraints (SCIP is a constraint integer programming
solver, supporting many different kinds of constraints)
- parameter getting/setting ("limits/time" etc.)
- conversion from MixedIntegerLinearProgram
- conversion from MPolynomialSystem_gf2 (using AND and XOR or linear
constraints)
- returning all solutions not just the optimal solution
the interface so far is very SCIP-y insofar as it isn't very natural Sage
style: no operator overloading etc.
> I have just been finishing a patch using constraint generation, and I
> was thinking about changing a lot of things in the
> MixedIntegerLinearProgram constraint... I wanted to build a Cython
> class (a backend) for each solver (CPLEX, Coin, GLPK, gurobi perhaps
> too), so that it may be possible to use them directly through C calls,
> and perhaps having one "natural" way to work on constraint/variable
> generation through Sage.
I think that would be a good idea, since they all seem to have specialised
features. For instance, IIRC Harald told me that Gurobi allows to return those
constraints which conflict in an infeasible problem.