2.1.2 • Published 8 years ago

logml v2.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

Logml

js-standard-style npm downloads

Logml is a logical modelling framework based on the Boolean network theory where classic Boolean operators are replaced with fuzzy operators and where edges are tuned in order to adapt the speed and the strength of the signal that they transmit.

This tool is an adaptation of a methodology developed at Novadiscovery and freely accessible at:

Poret, A., Monteiro Sousa, C., Boissel, J.-P.: Enhancing boolean networks with fuzzy operators and edge tuning.arXiv:1407.1135 (2014)

Table of contents


Installation

Requirements

Fortran

For Linux, install gfortran

sudo apt-get update
sudo apt-get install gfortran

For OSX, Check that gcc (that comes with gfortran) has been correctly installed. If not, install it via brew:

brew install gcc

NodeJS

Just install the last stable version from https://nodejs.org, or use Node Version Manager

Logml

To install Logml, just run the following command :

npm install -g logml

Now you can use the logml command:

logml --help

Usage

The Logml modelling and simulation tool takes a logical graph (.graphml format) as input. The tool will automatically parse the graph and generate the corresponding code. The logical model is then executed and results are plotted via a dedicated web interface.

Logical graph

A logical graph is a special type of diagramatic structure in which entities are linked by logical relations symbolized by the logic operators: AND, OR and NOT.

We use for that the yED graph editor (which is freely available and runs on all major platforms), and the following graphical ontology:

npm.io

Please find bellow an example of a logical graph, which will be used throughout this tutorial:

npm.io

In order to ensure the proper functioning of Logml tool, the following instructions must be observed carefully during the creation of the logical graph in yED.

Annotation of nodes

Each node of the graph (entity) need to be annotated (in yED, right click on the node > properties > data) with its qualitative initial values (integers only, and between 0 and 5). The node initial states are defined as following:

AnnotationMeaning
v0=5full
v0=4much more
v0=3much
v0=2few
v0=1fewer
v0=0none

Please find below an example of node annotation:

npm.io

Annotation of edges

Each edge need to be annotated (in yED, right click on the edge > properties > general) with its qualitative p and q values (integers only, and between 0 and 5).

  • For each edges, p is the portion of its value which is updated at each iteration:
AnnotationMeaning
p=5instantaneous
p=4faster
p=3fast
p=2slow
p=1slower
p=0down
  • For each edges, q is the weakening of its value at each iteration:
AnnotationMeaning
q=5strong
q=4weaker
q=3weak
q=2faint
q=1fainter
q=0down

Please find below an example of edge annotation:

npm.io

Annotation of perturbed nodes

We can identify nodes that will be the subject of a disturbance by annotating (in yED, right click on the entity > properties > data) with:

  • the strength of the disturbance applied to the node. The disturbed states will be defined as following (integers only, and between 0 and 5):
AnnotationMeaning
pwd=5full
pwd=4much more
pwd=3much
pwd=2few
pwd=1fewer
pwd=0none
  • the interval of iterations at which disturbances begin and end respectively. The intervals will be defined as following (integers only, and between 0 and 100):

int=20,60: in this case, perturbations will start after 20% of iterations, and will stop after 60% of iterations.

An example of disturbance annotation is presented in the following screenshot:

npm.io

Run Logml

logml --help

    Usage: logml <input>

    Options:

		-h, --help             output usage information
    -V, --version          output the version number
    -d, --dolphin          Output an human readable version of the parsed graph
    -i, --iterations <n>   The number of iterations performed during a run
    -o, --output <folder>  The output folder
    -w, --watch            Watch for any changes and update the output (if input is a file)
    -v, --verbose          Print out informations on build (activate --verbose)
    -s, --server [port]    Create a plotting server (activate --verbose)
    -p, --open             Open url on start
    -f --faster            Prevent some size optimisation, faster, bigger (stronger)
    --output-edge          Output default vpop edges to csv stream
    --output-node          Output default vpop nodes to csv stream
    --input-edge <string>  Input vpop edges from csv file
    --input-node <string>  Input vpop nodes from csv file
    --silent               Prevent verbose mode

Example

We used the following Logml command with the example.graphml:

logml example.graphml -o ./tmp -wsvp

And we obtained the following output result:

npm.io


License: MIT - Novadiscovery

js-standard-style