Interface definition between coordination algorithms and environments. Includes a dummy environment as example.
src/spinterface
: Interface definition between the scale and place algorithm and the environment.src/dummy-env
: Dummy environment/simulation implementation.
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.
Requires Python 3.6 and (recommended) venv.
python setup.py install
To use the interface you need to use this module and import the needed classes:
from spinterface import SimulatorAction, SimulatorInterface, SimulatorState
To use the dummy environment use:
from dummy_env import DummySimulator as Simulator
This project has received funding from German Federal Ministry of Education and Research (BMBF) through Software Campus grant 01IS17046 (RealVNF).