Hi Kevin,
Out of curiosity, did you get anywhere with 'interfacing' sympy equations
with optimization solvers? I am currently working on a generic solver
interface that uses sympy equations and variables for problem formulation.
I wondered if I am reinventing the wheel.
Best,
Niko
On
Thank you for your pointers. I'll take them under advisement as I move
forward with my project.
--
You received this message because you are subscribed to the Google Groups
sympy group.
To view this discussion on the web visit
https://groups.google.com/d/msg/sympy/-/8UeD91pTYGAJ.
To post to
I see.
Here's something that might be useful to you then: in the git master,
we there is an option to simplify() that let's you use a custom
measure function. simplify() tries various types of simplifications,
and returns the expression that gives the smallest value according to
the measure
Hullo Sympy Group,
In my code, I'd like to be able to specify symbols with a binary type,
something akin to:
* b = symbols('b', binary=True)*
This would let *b* assume only values from the set *{0, 1}*. I see the *
Boolean* class from which the *Symbol* class derives, but I believe that's
So you want to assume that b is a number modulo 2. To do this, you
can use the new Mod() object that was recently added. Note that this
was added after the latest release, so you'll have to use the git
version if you want to use it.
You define b = Symbol('b', integer=True), and use Mod(b, 2)
For this project, my end goal is to interface a series of Sympy equations
that I've built to an optimization solver. In the context of optimization,
binary variables usually represent a decision, and in the context of
solving, they represent a branch point. Branch points make it expensive
to