leaf

Simulator for modeling energy consumption in cloud, fog, and edge computing environments ๐ŸŒฑ

https://github.com/dos-group/leaf

Science Score: 33.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • โ—‹
    CITATION.cff file
  • โ—‹
    codemeta.json file
  • โ—‹
    .zenodo.json file
  • โœ“
    DOI references
    Found 1 DOI reference(s) in README
  • โœ“
    Academic publication links
    Links to: arxiv.org, ieee.org
  • โœ“
    Committers with academic emails
    1 of 2 committers (50.0%) from academic institutions
  • โ—‹
    Institutional organization owner
  • โ—‹
    JOSS paper metadata
  • โ—‹
    Scientific vocabulary similarity
    Low similarity (14.8%) to scientific vocabulary

Keywords

edge-computing energy-consumption fog-computing modeling simulation
Last synced: 5 months ago · JSON representation

Repository

Simulator for modeling energy consumption in cloud, fog, and edge computing environments ๐ŸŒฑ

Basic Info
Statistics
  • Stars: 114
  • Watchers: 13
  • Forks: 14
  • Open Issues: 0
  • Releases: 6
Topics
edge-computing energy-consumption fog-computing modeling simulation
Created about 5 years ago · Last pushed almost 2 years ago
Metadata Files
Readme License

README.md

LEAF PyPI version Supported versions License

LEAF is a simulator for analytical modeling of energy consumption in cloud, fog, or edge computing environments. It enables the modeling of simple tasks running on a single node as well as complex application graphs in distributed, heterogeneous, and resource-constrained infrastructures. LEAF is based on SimPy for discrete-event simulation and NetworkX for modeling infrastructure or application graphs.

Please have a look at out examples and visit the official documentation for more information on this project.

This Python implementation was ported from the original Java protoype. All future development will take place in this repository.

โš™๏ธ Installation

You can install the latest release of LEAF via pip:

$ pip install leafsim

Alternatively, you can also clone the repository (including all examples) and set up your environment via:

$ pip install -e .

๐Ÿš€ Getting started

LEAF uses SimPy for process-based discrete-event simulation and adheres to their API. To understand how to develop scenarios in LEAF, it makes sense to familiarize yourself with SimPy first.

```python import simpy from leaf.application import Task from leaf.infrastructure import Node from leaf.power import PowerModelNode, PowerMeter

Processes modify the model during the simulation

def placetaskafter2seconds(env, node, task): """Waits for 2 seconds and places a task on a node.""" yield env.timeout(2) task.allocate(node)

node = Node("node1", cu=100, powermodel=PowerModelNode(maxpower=30, staticpower=10)) task = Task(cu=100) powermeter = PowerMeter(node, callback=lambda m: print(f"{env.now}: Node consumes {int(m)}W"))

env = simpy.Environment()

register our task placement process

env.process(placetaskafter2seconds(env, node, task))

register power metering process (provided by LEAF)

env.process(power_meter.run(env)) env.run(until=5) ```

Which will result in the output:

0: Node consumes 10W 1: Node consumes 10W 2: Node consumes 30W 3: Node consumes 30W 4: Node consumes 30W

For other examples, please refer to the examples folder.

๐Ÿƒ What can I do with LEAF?

LEAF enables high-level simulation of computing scenarios, where experiments are easy to create and easy to analyze. Besides allowing research on scheduling and placement algorithms on resource-constrained environments, LEAF puts a special focus on:

  • Dynamic networks: Simulate mobile nodes which can join or leave the network during the simulation.
  • Power consumption modeling: Model the power usage of individual compute nodes, network traffic, and applications.
  • Energy-aware algorithms: Implement dynamically adapting task placement strategies, routing policies, and other energy-saving mechanisms.
  • Scalability: Model the execution of thousands of compute nodes and applications in magnitudes faster than real time.

Please visit the official documentation for more information and examples on this project.

๐Ÿ“– Publications

If you use LEAF in your research, please cite our paper:

Philipp Wiesner and Lauritz Thamsen. "LEAF: Simulating Large Energy-Aware Fog Computing Environments" In the Proceedings of the 2021 5th IEEE International Conference on Fog and Edge Computing (ICFEC). IEEE. 2021 [arXiv preprint] [video]

Bibtex: @inproceedings{WiesnerThamsen_LEAF_2021, author={Wiesner, Philipp and Thamsen, Lauritz}, booktitle={2021 IEEE 5th International Conference on Fog and Edge Computing (ICFEC)}, title={{LEAF}: Simulating Large Energy-Aware Fog Computing Environments}, year={2021}, pages={29-36}, doi={10.1109/ICFEC51620.2021.00012} }

๐Ÿ’š Projects using LEAF

Owner

  • Name: DOS Group at TU Berlin
  • Login: dos-group
  • Kind: organization
  • Location: Technische Universitรคt Berlin

Distributed and Operating Systems group at Technische Universitรคt Berlin

GitHub Events

Total
  • Watch event: 8
  • Fork event: 3
Last Year
  • Watch event: 8
  • Fork event: 3

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 41
  • Total Committers: 2
  • Avg Commits per committer: 20.5
  • Development Distribution Score (DDS): 0.024
Past Year
  • Commits: 1
  • Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Philipp Wiesner w****r@t****e 40
Lauritz Thamsen l****n@m****g 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 1
  • Total pull requests: 8
  • Average time to close issues: about 3 hours
  • Average time to close pull requests: 7 days
  • Total issue authors: 1
  • Total pull request authors: 2
  • Average comments per issue: 6.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 5
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Muhammad-Fahimullah (1)
Pull Request Authors
  • birnbaum (6)
  • kenan991 (2)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 22 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 2
  • Total versions: 9
  • Total maintainers: 1
pypi.org: leafsim

Simulator for modeling energy consumption in cloud, fog, and edge computing environments

  • Versions: 9
  • Dependent Packages: 0
  • Dependent Repositories: 2
  • Downloads: 22 Last month
Rankings
Dependent packages count: 7.3%
Stargazers count: 7.7%
Dependent repos count: 11.8%
Forks count: 12.0%
Average: 13.3%
Downloads: 27.8%
Maintainers (1)
Last synced: 6 months ago

Dependencies

setup.py pypi
  • networkx *
  • numpy *
  • pandas *
  • simpy *
  • tqdm *
.github/workflows/main.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/publish.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • pypa/gh-action-pypi-publish release/v1 composite
examples/smart_city_traffic/analysis/environment.yml pypi