Implementation of a tool to compose Industral API of the manufacturing actorsvia Markov Decision Processes.
Results of the experiments can be found in chip_experimental_results. Some results referring to the computation of the composition MDP can be null as we serialize the MDP in a pickle file so we do not have to recompute it each time.
Graphical representations of the target and the composition MDP (xsmall
size) can be found in debug notebook.
The experiments can be replicated either using Docker or from source code. We suggest to use Docker.
The configuration file config.json containing basic information needed to run the experiments. An example with information of the key-value pairs is given below.
{
"mode": "automata", //type of the target, accepted values are ["automata", "ltlf"]
"size": "xsmall", //size of the case study, accepted values are ["xsmall", "small", "medium", "large"]
"gamma": 0.9, //gamma value for policy computation
"phase": 2, //in this case study such value is not used, you can skip this
"serialize": false, //if you want to save the composition in a pickle file, accepted value are [true, false], you can skip this
"version": "v5", //version of the case study, you can skip this
}
- Build the image from the Dockerfile:
docker build -t mdp_controller .
- Run a new container and open a terminal from the created image:
docker run mdp_controller bash
- Start the controller:
cd docs/notebooks
python3 main.py
Please note: the configuration file conf.json contains the basic information needed to run the experiments. The JSON key mode
accept the values [automata, ltlf]
, the key phase
accepts [1,2]
values (representing the assortment and manufacturing phases respectively), and the key size
accepts [small, manageable1, manageable2, complex]
values (related to the number of involved actors).
We assume the review uses a UNIX-like machine and that has Python 3.8 installed.
-
Set up the virtual environment. First, install Pipenv. Then:
pipenv install --dev
-
this command is to start a shell within the Python virtual environment (to be done whenever a new terminal is opened):
pipenv shell
-
Install the Python package in development mode:
pip install -e . # alternatively: # python setup.py develop
-
To use rendering functionalities, you will also need to install Graphviz. At this page you will find the releases for all the supported platform.
-
Run the Controller
cd docs/notebook python main.py