[PPL-devel] Restoring dimensions
Mario Mendez
mario at cs.unm.edu
Mon Jul 4 23:32:33 CEST 2005
Hi all,
I'm working with your PPL library by using the Prolog interface,
although my question is generic. Say we have a 3D polyhedron P defined
by (for example): [A > 0, A + B < 3, C=4]
Now we project *ppl_Polyhedron_remove_space_dimensions* over {A,C}
getting P': [ 3>A>0, C=4 ].
Later on we want to intersect the projected eq.system P'(that might be
altered during the program) with P. The problem is that our 'C' is
VAR(2) in P but VAR(1) in P' so a call to
*ppl_Polyhedron_add_constraints_and_minimize*
adding to P the Constraint System of P' produces an undesired output->
...
A = '$VAR'(0),B = '$VAR'(1), C = '$VAR'(2),
ppl_new_Polyhedron_from_constraints(nnc,[A>0,A+B<3,C=2],Poly1),
ppl_new_Polyhedron_from_Polyhedron(nnc,Poly1,nnc,Poly2),
ppl_Polyhedron_remove_space_dimensions(Poly2,[B]),
ppl_Polyhedron_get_minimized_constraints(Poly2,Poly2_Cons),
ppl_Polyhedron_add_constraints_and_minimize(Poly1,Poly2_Cons),!,
...
no
, although the original system is solvable
How can we add dimensions to P' so the intersection with P saves the
original information about B? Note that B is not the first dimension (so
we cannot use *concatenate_assign* nor the last one (so we cannot use
*add_space_dimension*. An "ad-hoc" solution might store the deleted
indexes and then make a version of the Constraint System of P' with all
the VAR(X) renumbered according to that information, so a call to
*add_constraints* makes sense, but I wonder if there's an alternative
just using the API.
Thanks!
PS: Assume that the projection is mandatory
Mario
More information about the PPL-devel
mailing list