Skip to content

Interface definition between coordination algorithms and environments. Includes a dummy algorithm and environment as example.

Notifications You must be signed in to change notification settings

RealVNF/common-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

common-utils

Interface definition between coordination algorithms and environments. Includes a dummy environment as example.

Project structure

  • src/spinterface: Interface definition between the scale and place algorithm and the environment.
  • src/dummy-env: Dummy environment/simulation implementation.

Interface definition

The main interface definition is described by the SimulatorInterface class.

The interface is guided by the gym interface (gmy.Env), The init() aligns to the reset() function of gym and resets and initializes the environment with all necessary information including a seed. The apply() function reflects gym's step() method: It sends a placement description for all nodes and sets the new routing/scheduling.

To pass the information, we utilizes two data classes:

  • SimulatorAction to pass the scaling and placement to the environment.
  • simulatorState to report back the current State of the environment.

Installation

Requires Python 3.6 and (recommended) venv.

python setup.py install

Usage

Interface

To use the interface you need to use this module and import the needed classes:

from spinterface import SimulatorAction, SimulatorInterface, SimulatorState

Dummy environment

To use the dummy environment use:

from dummy_env import DummySimulator as Simulator

Acknowledgement

This project has received funding from German Federal Ministry of Education and Research (BMBF) through Software Campus grant 01IS17046 (RealVNF).

About

Interface definition between coordination algorithms and environments. Includes a dummy algorithm and environment as example.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages