Create polyhedron for given matrix A and vector b
P(A,b)={x∣ A.x ≤ b}
I have to create a polyhedron with this inputs
but in sage inequalities like this
A.x + b >= 0
, how to convert
$Ax \leq b \iff Ax - b \leq 0 \iff (-A)x + b \geq 0.$
So if you have $(A, b)$ such that $Ax \leq b$ is your polyhedron, then the pair $(A', b)$, where $A'=-A$, is such that $A'x + b \geq 0$ is also your polyhedron.
Asked: 2021-12-30 19:58:55 +0200
Seen: 289 times
Last updated: Jan 01 '22
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.
Welcome to Ask Sage! Thank you for your question.