Giter Site home page Giter Site logo

mdp-planner-chip-production's Introduction

Industrial API composition via Policy-based techiques - Chip Supply Chain Case Study

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.

How to replicate the experiments

The experiments can be replicated either using Docker or from source code. We suggest to use Docker.

Configuration file

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
}

Use the Docker image

  1. Build the image from the Dockerfile:
docker build -t mdp_controller .
  1. Run a new container and open a terminal from the created image:
docker run mdp_controller bash
  1. 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).

From the source code

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

mdp-planner-chip-production's People

Contributors

iaiamomo avatar luusi avatar marcofavorito avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.