Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
VIGNET Pierre
cadbiom
Commits
de59035e
Commit
de59035e
authored
Jun 13, 2017
by
VIGNET Pierre
Browse files
Add docstring and update readme
parent
4185c8dc
Changes
3
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
de59035e
...
...
@@ -18,28 +18,59 @@ the distribution packages library (or similar, depending on your operating syste
*
libxml2-dev
*
libxslt1-dev
*
libgraphviz-dev
*
pkg-config (fix errors when installing pygraphviz and when config is not loaded...)
*
python-glade2
*
python-gtk2
Fix errors when installing pygraphviz and when config is not loaded:
*
pkg-config
For Matplotlib installation:
*
libpng12-dev
*
libfreetype6-dev
You can install these dependencies with the following command (on Debian systems):
sudo apt-get install python-gtksourceview2 python2.7-dev libxml2-dev libxslt1-dev libxslt1-dev libgraphviz-dev pkg-config python-glade2 python-gtk2
sudo apt-get install python-gtksourceview2 python2.7-dev libxml2-dev libxslt1-dev \
libxslt1-dev libgraphviz-dev pkg-config python-glade2 python-gtk2 libpng12-dev libfreetype6-dev
## Python requirements
Before using
`cadbiom`
library, the following Python packages
have to
be installed from pypi repository:
When
`cadbiom`
library
is installed
, the following Python packages
will
be installed from pypi repository:
*
lxml
*
networkx
*
pygraphviz
*
matplotlib
*
numpy
*
pycryptosat
### SAT solver
Note: Cadbiom software requires a SAT solver which is
proposed as a Python wrapper by an independant library (pycryptosat).
For now, pycryptosat is not on pypi; so we use a fork from
[
Cryptominisat repository
](
https://github.com/msoos/cryptominisat/tree/5.0.1
)
Here you will find the installation of pycryptosat package:
git clone https://gitlab.irisa.fr/0000B8EG/pycryptosat/tree/5.0.1_cmake_dev
mkdir build
cd build && cmake ../
make python_interface_install
### Cadbiom
If you want to install the library with its GUI, and command line,
after the git clone step, just do:
make install
---
For the library itself:
...
...
@@ -134,6 +165,9 @@ The gui package exposes the command `cadbiom` to the current context.
models have the same topology, nodes & edges
attributes/roles. .. note:: You can export a graphml
file for the 2 models.
model_infos Model informations. Get number of nodes, edges,
centralities (degree, closeness, betweenness). ..
note:: You can export a graphml file for model.
### compute_macs:
...
...
@@ -226,6 +260,21 @@ Usage in scripts:
{u'nodes': True, u'edges': True, u'topology': True}
### model_infos
usage: cadbiom_cmd model_infos [-h] [--graph] [--json] [--output [OUTPUT]]
model_file
positional arguments:
model_file
optional arguments:
-h, --help show this help message and exit
--graph
--json
--output [OUTPUT]
## Graphical User Interface
Usage:
...
...
command_line/cadbiom_cmd/solution_repr.py
View file @
de59035e
...
...
@@ -329,7 +329,7 @@ def get_places_from_condition(condition):
def
parse_condition
(
condition
,
all_nodes
,
inhibitors_nodes
):
"""
"""
Return valid paths according the given logical formula and nodes.
"""
...
...
@@ -409,8 +409,13 @@ def parse_condition(condition, all_nodes, inhibitors_nodes):
def
parse_event
(
event
):
"""
"""
Decompile logical formula in event's name.
:param: Event string.
:type: <event string>
:return: A dict of events and their conditions.
:rtype: <dict>
keys: event's names; values: logical formula attached (condition)
"""
def
treeToExprDefaultsList
(
tree
):
...
...
library/README.md
View file @
de59035e
...
...
@@ -18,28 +18,59 @@ the distribution packages library (or similar, depending on your operating syste
*
libxml2-dev
*
libxslt1-dev
*
libgraphviz-dev
*
pkg-config (fix errors when installing pygraphviz and when config is not loaded...)
*
python-glade2
*
python-gtk2
Fix errors when installing pygraphviz and when config is not loaded:
*
pkg-config
For Matplotlib installation:
*
libpng12-dev
*
libfreetype6-dev
You can install these dependencies with the following command (on Debian systems):
sudo apt-get install python-gtksourceview2 python2.7-dev libxml2-dev libxslt1-dev libxslt1-dev libgraphviz-dev pkg-config python-glade2 python-gtk2
sudo apt-get install python-gtksourceview2 python2.7-dev libxml2-dev libxslt1-dev \
libxslt1-dev libgraphviz-dev pkg-config python-glade2 python-gtk2 libpng12-dev libfreetype6-dev
## Python requirements
Before using
`cadbiom`
library, the following Python packages
have to
be installed from pypi repository:
When
`cadbiom`
library
is installed
, the following Python packages
will
be installed from pypi repository:
*
lxml
*
networkx
*
pygraphviz
*
matplotlib
*
numpy
*
pycryptosat
### SAT solver
Note: Cadbiom software requires a SAT solver which is
proposed as a Python wrapper by an independant library (pycryptosat).
For now, pycryptosat is not on pypi; so we use a fork from
[
Cryptominisat repository
](
https://github.com/msoos/cryptominisat/tree/5.0.1
)
Here you will find the installation of pycryptosat package:
git clone https://gitlab.irisa.fr/0000B8EG/pycryptosat/tree/5.0.1_cmake_dev
mkdir build
cd build && cmake ../
make python_interface_install
### Cadbiom
If you want to install the library with its GUI, and command line,
after the git clone step, just do:
make install
---
For the library itself:
...
...
@@ -134,6 +165,9 @@ The gui package exposes the command `cadbiom` to the current context.
models have the same topology, nodes & edges
attributes/roles. .. note:: You can export a graphml
file for the 2 models.
model_infos Model informations. Get number of nodes, edges,
centralities (degree, closeness, betweenness). ..
note:: You can export a graphml file for model.
### compute_macs:
...
...
@@ -226,6 +260,21 @@ Usage in scripts:
{u'nodes': True, u'edges': True, u'topology': True}
### model_infos
usage: cadbiom_cmd model_infos [-h] [--graph] [--json] [--output [OUTPUT]]
model_file
positional arguments:
model_file
optional arguments:
-h, --help show this help message and exit
--graph
--json
--output [OUTPUT]
## Graphical User Interface
Usage:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment