Updates:
        Status: Fixed
        Labels: Solvers

Comment #2 on issue 2078 by asmeurer: Solve fails or hangs on a simple pair of simultaneous linear equations in sympy 0.6.7
http://code.google.com/p/sympy/issues/detail?id=2078

All three scenarios run just fine (and speedily) in the git master for me:


In [63]: S, V, P, T, a, c, b, M, N = symbols('S, V, P, T, a, c, b, M, N')

In [64]:     e1 = c + c*N + M*S - P*V*a + M*P*V*a
   ....:     e2 = N*V + P*V*b - T*V*a - M*P*V*b - N*T*V*a
   ....:     print solve([e1, e2], [M, N])
   ....:
{M: (-c + P*V*a + P*b*c - P*T*V*a**2)/(S + P*V*a + P*b*c - S*T*a - P*T*V*a**2), N: (S*T*a - P*S*b - P*b*c + P*T*V*a**2)/(S + P*V*a + P*b*c - S*T*a - P*T*V*a**2)}

In [65]: S, V, P, T, a, C_p, b, M, N = symbols('S, V, P, T, a, C_p, b, M, N')

In [66]:     e1 = C_p + C_p*N + M*S - P*V*a + M*P*V*a
   ....:     e2 = N*V + P*V*b - T*V*a - M*P*V*b - N*T*V*a
   ....:     print solve([e1, e2], [M, N])
   ....:
{M: (-C_p + C_p*P*b + P*V*a - P*T*V*a**2)/(S + C_p*P*b + P*V*a - S*T*a - P*T*V*a**2), N: (S*T*a - C_p*P*b - P*S*b + P*T*V*a**2)/(S + C_p*P*b + P*V*a - S*T*a - P*T*V*a**2)}

In [67]: S, V, P, T, a, C_p, b, M, N = symbols('S, V, P, T, a, C_p, b, M, N')

In [68]:     e1 = C_p + C_p*N + M*S - P*V*a # + M*P*V*a
   ....:     e2 = N*V + P*V*b - T*V*a - M*P*V*b - N*T*V*a
   ....:     print solve([e1, e2], [M, N])
   ....:
{M: (-C_p + C_p*P*b + P*V*a - P*T*V*a**2)/(S + C_p*P*b - S*T*a), N: (S*T*a - C_p*P*b - P*S*b + V*a*b*P**2)/(S + C_p*P*b - S*T*a)}

I separately bisected the both bad ones down to one of

330ff3b874150c944572f93928fec7e9fa991fee
90d277ba9cde9d1ea39fdbc96cdd5f59413bcb1c
0d5b52c4bd6f6c3b17a46194c0e6d162ecd1348c
e82d96293972eb726f602c0c34494ba47a1a113d
a53205c18034081d94a8afed9bee98a5a9e40c2c
c03c3c8ae523ffb18d94239d3a3b4df6e345c7a2
2bd38a1fc1ce6ab5196762b7a8d63fe1de492306
70353e95f7ad581431fd98865f8e8cd5072425c5
4b0b1578320e121cd1a4e391eabc0023fc6996c2
f43d709cdf3d81443b345a3f63cb704a97f94d17
13a5b105d552f5173a23c3f815c241a9c2ba9894
97c86e97ef829e6f61b5aa6a85f890126177a9cb
279b655190e3810510228af11381076597e75c59
f32769fc3e5a72efc946c81bda4376120e19b201
31c9aa43ffc7bc031493fc4ea27b74dc50c4d035
950969b65017a227a41d5f45ca33ca96139cebc6
dd24673398dc1c55f221b26022851148394a2512

which I think just means it has been fixed in the new polys somewhere. So if you want to take advantage of that, you should work off of the git master. See the GettingTheBleedingEdge page on the wiki.

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to