statevisualizermulti-agentdiscrete-space

Trouble with visualizer.pl


I'm trying to use visualizer.pl to visualize the dynamics of multi-state system

my function file:

f1 := x2
f2 := x1+x2*x3
f3 := x3^2+x1+x2+1

I used the following command as mentioned in "readme.txt" 

perl visualizer.pl -p 1.txt 3 3

since prime := 3 and num_nodes :=3

but I got this error

educ@educ-VirtualBox:~/Desktop/visualizer$ perl visualizer.pl -p 1.txt 3 3

Errors found in the input file. See below for description:


ERROR: Incorrect start of function declaration in function 1.

Errors with input file..ending program at visualizer.pl line 162, > line 1.

State Space Visualizer Version 1.0 beta ------------------------------------- The State Space Visualizer is a tool for the visualization of the dynamics of multi-state, discrete models of biological networks.

More information about package:

https://web.archive.org/web/20110815084457/http://dvd.vbi.vt.edu/tutorial.html

https://web.archive.org/web/20120320172453if_/http://dvd.vbi.vt.edu/visualizer.zip


Solution

  • Use = to separate your functions, and remove spaces around the =. Your input file should thus be:

    f1=x2
    f2=x1+x2*x3
    f3=x3^2+x1+x2+1
    

    I know that it's not consistent with the readme, but it's consistent with the content of visualizer.pl, and it works.

    If, once that's done, the script visualizer.pl fails with:

    sh: 1: kghostview: not found

    You can fix it by installing ghostview (sudo apt install gv on Debian), and replacing the line system("kghostview out.ps &"); by system("gv out.ps &"); at the end of visualizer.pl.