Search found 178 matches

Go to advanced search

by joswig
28 Sep 2021, 10:23
Forum: General Discussion
Topic: how to define integer polytope by matrix representation
Replies: 6
Views: 279

Re: how to define integer polytope by matrix representation

Your example has a lineality space of positive dimension. polytope > $p = new Polytope(INEQUALITIES=>[[13,-6,0,-7,0,-9,0],[11,0,-8,0,-5,0,-6]],EQUATIONS=>[[-1,1,1,0,0,0,0],[-1,0,0,1,1,0,0],[-1,0,0,0,0,1,1]]); polytope > print $p->VERTICES; 1 -1/4 5/4 1 0 5/6 1/6 0 1 -1 0 0 -2/3 2/3 0 1 -1 0 0 -4/3 4...
by joswig
27 Sep 2021, 10:13
Forum: General Discussion
Topic: how to define integer polytope by matrix representation
Replies: 6
Views: 279

Re: how to define integer polytope by matrix representation

You can specify polyhedra in terms of INEQUALITIES and EQUATIONS.
Asking for VERTICES then triggers a dual convex hull computation.

Please see tutorial.

The web version of polymake runs in a sandbox. So, by design, you cannot read from or write to files.
by joswig
20 Aug 2021, 12:59
Forum: General Discussion
Topic: Mixed volume -> edge matrix is singular?
Replies: 4
Views: 4694

Re: Mixed volume -> edge matrix is singular?

polymake uses the normalized volume convention for mixed volumes (i.e., counting solutions of polynomial systems directly, as in the BKK theorem). You can see this, e.g., from polytope > print mixed_volume(cube(2,0),cube(2,0)); 2 The mixed volume of a polygon with itself equals the volume (i.e., are...
by joswig
09 Aug 2021, 09:45
Forum: Helpdesk
Topic: how to avoid ERROR: No random access
Replies: 5
Views: 3235

Re: how to avoid ERROR: No random access

Well, Vector and Array are random access data structures, i.e., you can use indices. And Set is not random access; pretty much as the error message says. These different data structures exist because they help make several kinds of functions fast: While vector and Array allow to access an element at...
by joswig
31 Jul 2021, 18:44
Forum: Helpdesk
Topic: Label the ground set of a matroid from 1 to n
Replies: 3
Views: 2764

Re: Label the ground set of a matroid from 1 to n

Internally, polymake will always use indices starting at zero. matroid > $F = fano_matroid; matroid > print $F->CIRCUITS; {0 1 6} {0 2 5} {0 3 4} {1 2 3} {1 4 5} {2 4 6} {3 5 6} {0 1 2 4} {0 1 3 5} {0 2 3 6} {0 4 5 6} {1 2 5 6} {1 3 4 6} {2 3 4 5} But you can use LABELS to make things look different...
by joswig
31 Jul 2021, 18:36
Forum: Helpdesk
Topic: how to use polymake other than command line?
Replies: 2
Views: 2714

Re: how to use polymake other than command line?

Yes to both questions. Even the command line provide full perl functionality. > sub myowncode($) { my ($arg)=@_; return cube($arg)->VOLUME; } > print myowncode(4); 16 Then you can store a sequence of commands as a text file and apply load_commands to execute that code line by line. For best experien...
by joswig
27 Jul 2021, 12:19
Forum: Helpdesk
Topic: Checking if two fans have the same support
Replies: 3
Views: 4321

Re: Checking if two fans have the same support

Indeed, currently polymake does not have such a function. Of course, it is absolutely desirable. We started to discuss the matter within the developer's team. There are several ways to implement this, all of which are computationally costly, except for small fans in very low dimensions. We are in th...
by joswig
11 Jun 2021, 17:16
Forum: Helpdesk
Topic: Stable intersection not contained in set-theoretic intersection
Replies: 6
Views: 3532

Re: Stable intersection not contained in set-theoretic intersection

That's a difficult question in the sense that these functions reside in Simon Hampe's extension atint, which became bundled a while ago. Thing is: no-one is currently working on that code.

Nonetheless, we will check. Just be a bit patient, please.
by joswig
02 Jun 2021, 09:23
Forum: Helpdesk
Topic: Issues solving an LP
Replies: 6
Views: 3971

Re: Issues solving an LP

polymake employs a homogeneous coordinate model. That is, here and elsewhere you need to ignore the leading "1" in the solution.
by joswig
20 May 2021, 09:29
Forum: Helpdesk
Topic: Issues solving an LP
Replies: 6
Views: 3971

Re: Issues solving an LP

There are two issues. (1) There is a small glitch in polymake's design of subobject properties (such as LP or MILP). The following works: > $x = lp2poly("untitled.lp"); > $obj= new Vector([1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]); > $x->MILP(LINEAR_OBJECTIVE=...

Go to advanced search

cron