I'm trying to solve the 'barnyard' problem with sympy with two equations for 3 variables (it's underconstrained). I want all possible solutions to be displayed, possibly by iterating
There are 20 heads and 56 legs, how many chicken, pigs and spiders are there? chickens = Symbol('chickens') pigs = Symbol('pigs') spiders = Symbol('spiders') solve([Eq(chickens+pigs+spiders, 20), Eq(2*chickens+4*pigs+8*spiders, 56)]) this works, but defines chickens and pigs in terms of spiders. I'm trying to have sympy display all the possible solutions by adding a few more expressions to the solver: soln = solve([Eq(chickens+y+z, 20), Eq(2*chickens + 4*y + 8*z, 56), Ge(chickens,0), Ge(y,0), Ge(z,0)]) , but I'm getting an error: NotImplementedError: only univariate inequalities are supported Am I doing something wrong? -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.