Ask Your Question
0

How do I find a solution of a set of inequalities?

asked 2013-02-05 08:36:44 +0100

anonymous user

Anonymous

updated 2015-01-14 11:48:31 +0100

FrédéricC gravatar image

Help with coding please. I'm completely new to Sage.

I have a model system written in Python and I need to do recursively call a subroutine to determine the existence of a solution of a set of inequalities. We have a primitive subroutine written, but I'd rather not reinvent the wheel.

Mathematica can do it easily It takes two calls "Resolve[Exists[ {set of variables}, {set of inequalities}. The output is either True or False.

I tried to research calling Mathematica from my python code, but it seems like a big detour technical from my actual research. The same for Matlab. I need to call on an external symbolic calculus program, have the answer returned to python and continue computing. Sage seems perfect for this. The introduction video says that anything Mathematica can do, sage should be able to do it too. Here's my question: HOW?

I know you can import sage from any python script, but what packages do I import? What commands do I use?

For example, if the following set is my symbols: {g1 g2 g3 t11 t12 t21 t32 k11 k21 k22 k31} for this set of inequalities { k11 > g1t11 && k11 < g1t12 && 0 < g1t11 && k11 > 0 && k21 > g2t21 && (k21 + k22) < g2t21 && 0 < g2t21 && k22 < 0 && k31 > g3t32 && k31 > g3t32 && 0 < g1t11 && k11 > g1t11 && (k11k11) < (k11 + k11)g1*t11}.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2013-02-05 08:38:26 +0100

Oh, i'm using REDHAT linux, python version 2.7

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-02-05 08:36:44 +0100

Seen: 463 times

Last updated: Feb 05 '13