tutorial on LP

Questions and problems about using polymake go here.
babulnath
Posts: 6
Joined: 12 May 2011, 07:51

tutorial on LP

Postby babulnath » 12 May 2011, 07:56

I have been able to install polymake and run many of the tutorial exercises. But the Linear program exercise does not run. It gives me the following error :-
ERROR: reference to an undeclared variable $self at /usr/local/share/polymake/perllib/Polymake/Core/PlainFile.pm line 248
How should I correct it ?

paffenholz
Developer
Posts: 211
Joined: 24 Dec 2010, 13:47

Re: tutorial on LP

Postby paffenholz » 12 May 2011, 11:16

Could you please give the commands that lead to the error, or point to the tutorial that contains the failing commands?

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

Re: tutorial on LP

Postby joswig » 12 May 2011, 13:31

... and, of course, the polymake version, the operating system etc.

babulnath
Posts: 6
Joined: 12 May 2011, 07:51

Re: tutorial on LP

Postby babulnath » 12 May 2011, 13:53

I am using polymake 2.9.9 which I compiled from the source.
My operating system is Ubuntu 9.04 Jaunty Jackalope.
the lines that give the error are:
$ polymake linear_program.poly MAXIMAL_VALUES
polymake: ERROR: reference to an undeclared variable $self at /usr/local/share/polymake/perllib/Polymake/Core/PlainFile.pm line 248.
Here I am not using polymake interactively. However even in the interactive mode the result is the same.

babulnath
Posts: 6
Joined: 12 May 2011, 07:51

Re: tutorial on LP

Postby babulnath » 12 May 2011, 13:56

the linear_program.poly is as follows:

OBJECTIVES
0 1 1 1

INEQUALITIES
0 1 0 0
0 0 1 0
0 0 0 1
1 -1 0 0
1 0 -1 0
1 0 0 -1
5/2 -1 -1 -1
8 -1 17 0

paffenholz
Developer
Posts: 211
Joined: 24 Dec 2010, 13:47

Re: tutorial on LP

Postby paffenholz » 12 May 2011, 15:02

The property OBJECTIVES does not exist, and the function that transforms your plain text file into the new file format accordingly fails. The given error message is maybe not very clear ...

If you want to use polymake in compatibility mode than your file should define the property LINEAR_OBJECTIVE, and you can ask for LP.MAXIMAL_VALUE at the comand line (no "S" at the end). The prefix "LP." is necessary as linear programs have been redesigned to be a proper subobject with their own properties that may occur multiple times in a polymake object.

babulnath
Posts: 6
Joined: 12 May 2011, 07:51

Re: tutorial on LP

Postby babulnath » 13 May 2011, 02:21

Thanks so much Herr Paffenholz. I will try now as you have directed.

babulnath
Posts: 6
Joined: 12 May 2011, 07:51

Re: tutorial on LP

Postby babulnath » 13 May 2011, 07:55

I tried. But it is still giving the same error. I think it has something to do with the
local variable in Perl. In subroutine PlainFile the value of the variable $self is undefined.

User avatar
gawrilow
Main Author
Posts: 423
Joined: 25 Dec 2010, 17:40

Re: tutorial on LP

Postby gawrilow » 13 May 2011, 08:22

In subroutine PlainFile the value of the variable $self is undefined.
Indeed, this corner or PlainFile.pm has been left unattended for a while. If you want to use this functionality, please apply the patch attached below:

Code: Select all

cd /usr/local/share/polymake sudo patch -p0 <.../PlainFile.patch
Attachments
PlainFile.patch
(2.08 KiB) Downloaded 476 times

babulnath
Posts: 6
Joined: 12 May 2011, 07:51

Re: tutorial on LP

Postby babulnath » 13 May 2011, 08:38

Thank you very much.


Return to “Helpdesk”