I want to get a particular solution (assuming it exists) of a system of inequalities, with 4 variables, having that those variables can take only certain values. What I have so far is:
a, b, c, d = var('a', 'b', 'c', 'd')
assume(a >= 1 and a <= 8) assume(b >= 4 and b <= 512) assume(c >= 2 and c <= 128) assume(d, 'integer')
eq1 = (SRC / a) * b <= 418
eq2 = (((SRC / a) * b) / c) / d <= 200
eq3 = ((SRC / a) * b) / c <= 480
res = solve([eq1, eq2, eq3], a, b, c, d=1)
for i in res:
print(i)
The first result I obtain is:
[a < 0, 0 < c, -d > 0, 25*a*c*d - 8*b > 0, -15*a*c + 2*b > 0]
As you can see, a < 0
, but I have stated that a
must be greater than 1
. Why this happens?
How can I obtain a particular solution (if it exists)?