Dear Attila,
You cannot add inequalities to an existing polytope, this is simply not the right way to look at a polymake object. Once you created an object, the properties (like INEQUALITES) you specified become immutable. This is necessary because polymake computes other properties from the given properties via
rules, and stores them for further usage. Hence, the system of properties of an object needs to stay consistent.
The way to go is to create a new polytope with a new matrix of inequalities consisting of the original inequalities and a new set of inequalities. Here is an example:
Say, you want to cut off the part below the hyperplane H1:x1+x2+x3=1.
Code: Select all
$H1=new Vector(-1,1,1,1);
$p_new=new Polytope(INEQUALITIES=>cube(3)->FACETS/$H1);
Notice that you must take care of the AFFINE_HULL if your polytope is not fulldimensional. In that case you should write
Code: Select all
$p_new=new Polytope(INEQUALITIES=>$p->FACETS/$H1,EQUATIONS=>$p->AFFINE_HULL);
PS: I tried to highlight the semantics of inequalities in the
tutorial on polytopes. I hope it is more prominent now. Thanks for the hint!