polyhedral cone

Questions and problems about using polymake go here.
gleelee
Posts: 2
Joined: 01 Dec 2015, 21:57

polyhedral cone

Postby gleelee » 01 Dec 2015, 22:13

One investigates the solution set of Sv(x)=0, where S represents a matrix and v(x) represents the flux vector, v(x)>=0 .So the set of all possible solutions defines a convex polyhedral cone.
s=[[-1,1,0,0,0,0,0,0,0,0,0,1],[-1,1,1,-1,1,1,0,0,0,0,0,0],[1,-1,-1,0,0,0,0,0,0,0,0,0],[0,0,1,-1,1,0,0,0,1,-1,1,0],[0,0,0,1,-1,-1,0,0,0,0,0,0],[0,0,0,0,0,1,-1,1,0,0,0,0],[0,0,0,0,0,0,-1,1,1,-1,1,1],[0,0,0,0,0,0,1,-1,-1,0,0,0],[0,0,0,0,0,0,0,0,0,1,-1,-1]]

Should I use that,
polytope > $s=new Matrix<Rational>([[0,-1,1,0,0,0,0,0,0,0,0,0,1],[0,-1,1,1,-1,1,1,0,0,0,0,0,0],[0,1,-1,-1,0,0,0,0,0,0,0,0,0],[0,0,0,1,-1,1,0,0,0,1,-1,1,0],[0,0,0,0,1,-1,-1,0,0,0,0,0,0],[0,0,0,0,0,0,1,-1,1,0,0,0,0],[0,0,0,0,0,0,0,-1,1,1,-1,1,1],[0,0,0,0,0,0,0,1,-1,-1,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,-1,-1]]);

polytope > $p=new Cone<Rational> (INEQUALITIES=>$s);

Now I want to get the the minimal set of generating vectors Ei. Ei are the edges of the cone. Each solution flux vector v(x) can be represented as a linear combination of the Ei with nonnegative coefficients Ji. i is index.

I want use print $p->RAYS; but failed. Could you tell me why? Many thanks!

blorenz
Developer
Posts: 139
Joined: 10 Jan 2011, 17:21

Re: polyhedral cone

Postby blorenz » 02 Dec 2015, 11:21

Hi,

The cone you defined is in fact a linear subspace, hence there are no rays but there is a non-empty lineality section:

Code: Select all

polytope > print $p->LINEALITY_SPACE; 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1/2 -1/2 1 1/2 -1/2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1/2 -1/2 1 0 0 0 0 0 0 1/2 -1/2 1
You mentioned v(x)>=0, so you probably wanted to intersect this subspace with the positive orthant. You can achieve this by appending a unit matrix to the inequalities:

Code: Select all

polytope > $p=new Cone<Rational> (INEQUALITIES=>$s/unit_matrix(13)); polytope > print $p->RAYS; 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 1
Best,
Benjamin

gleelee
Posts: 2
Joined: 01 Dec 2015, 21:57

Re: polyhedral cone

Postby gleelee » 02 Dec 2015, 19:12

Thank you very much for your prompt reply! It really helps me a lot. Nice day!


Return to “Helpdesk”