https://github.com/realvnf/common-utils
Interface definition between coordination algorithms and environments. Includes a dummy algorithm and environment as example.
https://github.com/realvnf/common-utils
algorithms coordination environment interface management nfv orchestration python simulation
Last synced: 10 months ago
JSON representation
Interface definition between coordination algorithms and environments. Includes a dummy algorithm and environment as example.
- Host: GitHub
- URL: https://github.com/realvnf/common-utils
- Owner: RealVNF
- Created: 2019-06-30T09:10:34.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-03-19T17:45:29.000Z (almost 5 years ago)
- Last Synced: 2023-03-06T04:17:51.072Z (almost 3 years ago)
- Topics: algorithms, coordination, environment, interface, management, nfv, orchestration, python, simulation
- Language: Python
- Size: 89.8 KB
- Stars: 2
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](https://www.python.org/downloads/release/) and (recommended) [venv](https://docs.python.org/3/library/venv.html).
```bash
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](https://www.bmbf.de/)) through Software Campus grant 01IS17046 ([RealVNF](https://realvnf.github.io/)).