Secondary Fans using gfan

Questions and problems about using polymake go here.
simon
Posts: 13
Joined: 18 Mar 2012, 19:47

Secondary Fans using gfan

Postby simon » 18 Mar 2012, 19:52

Hello,

I'm trying to compute the secondary fan of a vector configuration as described e.g. in

http://www.polymake.org/doku.php/news/release_2_10

I have both polymake 2.11 and gfan 0.5 installed.
However, my installation of polymake does not know about a function "secondary_fan".

Maybe I have to tell polymake first about gfan?

Thanks in advance!

User avatar
joswig
Main Author
Posts: 282
Joined: 24 Dec 2010, 11:10

Re: Secondary Fans using gfan

Postby joswig » 27 Mar 2012, 09:53

You may have to do

Code: Select all

reconfigure "gfan.rules";
in application fan.

simon
Posts: 13
Joined: 18 Mar 2012, 19:47

Re: Secondary Fans using gfan

Postby simon » 27 Mar 2012, 12:19

ah sure! Thanks!

esche
Posts: 7
Joined: 27 Nov 2012, 20:30

Re: Secondary Fans using gfan

Postby esche » 01 Dec 2012, 00:55

Hi!

I have the same problem here. I use polymake 2.12 and gfan 0.5 in Mac OS X 10.6. The subroutine secondary_fan is undefined and I get the error message

Code: Select all

polytope > reconfigure "gfan.rules"; polymake: ERROR: there are no configuration actions associated with rulefile gfan.rules
Do you have some advice ? Thanks in advance.

esche

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

Re: Secondary Fans using gfan

Postby blorenz » 01 Dec 2012, 13:46

The gfan rules are within application fan and therefore you need to switch to that application before reconfiguring or using the secondary_fan function:

Code: Select all

application "fan"; reconfigure "gfan.rules"; $f = secondary_fan($m);
Ben

esche
Posts: 7
Joined: 27 Nov 2012, 20:30

Re: Secondary Fans using gfan

Postby esche » 02 Dec 2012, 13:57

Thanks a lot for the quick reply. Now, I have the next problem:

Code: Select all

$ptmat = new Matrix<Integer>([[1,0,0,0,0],[1,2,-1,-1,-1],[1,-1,2,-1,-1],[1,-1,-1,-1,-1],[1,0,0,1,0],[1,0,0,0,1]]); $P = new Polytope<Rational>(POINTS=>$ptmat); $Sigma = fan::secondary_fan($P->VERTICES); polymake: transforming /private/var/folders/NQ/NQnbaTxVHAecd8YXcj+MPE+++TI/-Tmp-/poly2028Taaaa0001.poly with upgrade-2.9.10.xslt polymake: transforming /private/var/folders/NQ/NQnbaTxVHAecd8YXcj+MPE+++TI/-Tmp-/poly2028Taaaa0001.poly with upgrade-2.10.xslt polymake: transforming /private/var/folders/NQ/NQnbaTxVHAecd8YXcj+MPE+++TI/-Tmp-/poly2028Taaaa0001.poly with upgrade-2.11.xslt polymake: transforming /private/var/folders/NQ/NQnbaTxVHAecd8YXcj+MPE+++TI/-Tmp-/poly2028Taaaa0001.poly with upgrade-2.12.xslt polymake: WARNING: encountered unknown property 'AMBIENT_DIM' in object SymmetricFan<Rational> Please be aware that all unknown properties are automatically removed from the data files. If you want to supply additional information with the objects, please use attachments or declare new properties in extension rules. polymake: WARNING: Creating backup file /private/var/folders/NQ/NQnbaTxVHAecd8YXcj+MPE+++TI/-Tmp-/poly2028Taaaa0001.poly.bak polymake: WARNING: encountered unknown property 'DIM' in object SymmetricFan<Rational>
Can you give me a hint what I am supposed to do here ?

esche

User avatar
joswig
Main Author
Posts: 282
Joined: 24 Dec 2010, 11:10

Re: Secondary Fans using gfan

Postby joswig » 03 Dec 2012, 11:59

Can you give me a hint what I am supposed to do here ?
Nothing.

polymake transformed your files into a new format. On the way it trashed the properties DIM and AMBIENT_DIM which became user functions. That's why you got a warning (but no error). No information lost in your data.

esche
Posts: 7
Joined: 27 Nov 2012, 20:30

Re: Secondary Fans using gfan

Postby esche » 03 Dec 2012, 22:17

I see. Then how do I get the 1-dimensional cones ? Or the maximal cones ? I seem to get an empty result which I know not to be true.

Code: Select all

print $Sigma->MAXIMAL_CONES; {}
esche

User avatar
joswig
Main Author
Posts: 282
Joined: 24 Dec 2010, 11:10

Re: Secondary Fans using gfan

Postby joswig » 06 Dec 2012, 12:24

OK, there is a bug in apps/fan/rules/gfan.rules.

Please replace the line 41 by

Code: Select all

gfan_print_matrix($tempfile,eliminate_denominators_entire_affine($M->minor(All,[1..$M->cols()-1])));
Sorry for the inconvenience.

esche
Posts: 7
Joined: 27 Nov 2012, 20:30

Re: Secondary Fans using gfan

Postby esche » 06 Dec 2012, 23:21

Thanks. Now I'm getting the following error message

Code: Select all

fan > $Sigma = fan::secondary_fan($P->VERTICES); polymake: used package gfan Gfan is a software package for computing Groebner fans and tropical varieties. Copyright by Anders Jensen http://www.math.tu-berlin.de/~jensen/software/gfan/gfan.html polymake: Creating tree /Users/esche/.polymake-macbundle/wrappers/core for automatically generated private C++/perl wrappers polymake: ERROR: Undefined subroutine &Polymake::fan::eliminate_denominators_entire_affine called at /Applications/polymake.app/Contents/MacOS/../Resources//polymake/share/polymake/apps/fan/rules/gfan.rules line 41.
esche


Return to “Helpdesk”