ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 20 Oct 2019 13:22:58 +0200How to find common solution of inequalities in Sagehttps://ask.sagemath.org/question/48434/how-to-find-common-solution-of-inequalities-in-sage/ I have few inequalities:
3 x1 + 5 x2 + 2 x3 + 5 x4 + 7 x5 <= 28
2 x1 + 0 x2 + 0 x3 + 8 x4 <= 14
4 x4 + 5 x5 <= 22
3 x2 <= 2
3 x4 >= 1
How to find common solution in Sage ? xi' s are either 0 or 1. Sun, 20 Oct 2019 07:17:28 +0200https://ask.sagemath.org/question/48434/how-to-find-common-solution-of-inequalities-in-sage/Answer by tmonteil for <p>I have few inequalities: </p>
<p>3 x1 + 5 x2 + 2 x3 + 5 x4 + 7 x5 <= 28</p>
<p>2 x1 + 0 x2 + 0 x3 + 8 x4 <= 14 </p>
<p>4 x4 + 5 x5 <= 22 <br>
3 x2 <= 2 <br>
3 x4 >= 1</p>
<p>How to find common solution in Sage ? xi' s are either 0 or 1. </p>
https://ask.sagemath.org/question/48434/how-to-find-common-solution-of-inequalities-in-sage/?answer=48439#post-id-48439See https://doc.sagemath.org/html/en/thematic_tutorials/linear_programming.html#linear-programming and use the `binary=True` argument.Sun, 20 Oct 2019 13:22:58 +0200https://ask.sagemath.org/question/48434/how-to-find-common-solution-of-inequalities-in-sage/?answer=48439#post-id-48439