{"id":13800369,"url":"https://github.com/stefanbschneider/mobile-env","last_synced_at":"2025-04-12T19:46:03.463Z","repository":{"id":44553198,"uuid":"349774513","full_name":"stefanbschneider/mobile-env","owner":"stefanbschneider","description":"An open, minimalist Gymnasium environment for autonomous coordination in wireless mobile networks.","archived":false,"fork":false,"pushed_at":"2024-11-19T19:53:54.000Z","size":3493,"stargazers_count":126,"open_issues_count":2,"forks_count":30,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-03T22:07:19.822Z","etag":null,"topics":["autonomous","cell-selection","cellular","coordination","environment","evaluation","gym","gymnasium","management","mobile","mobile-networks","multi-agent-reinforcement-learning","optimization","python","python3","reinforcement-learning","rllib","simulation","stable-baselines","wireless"],"latest_commit_sha":null,"homepage":"https://mobile-env.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stefanbschneider.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-20T16:13:48.000Z","updated_at":"2025-04-01T13:59:39.000Z","dependencies_parsed_at":"2024-01-16T18:58:02.949Z","dependency_job_id":"0f9e7a3f-b7d0-48aa-971a-b6323ee5522d","html_url":"https://github.com/stefanbschneider/mobile-env","commit_stats":{"total_commits":77,"total_committers":5,"mean_commits":15.4,"dds":0.6103896103896104,"last_synced_commit":"2d4d13dc48644ab2f2bd53df3a88126a93a2dd83"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanbschneider%2Fmobile-env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanbschneider%2Fmobile-env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanbschneider%2Fmobile-env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanbschneider%2Fmobile-env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefanbschneider","download_url":"https://codeload.github.com/stefanbschneider/mobile-env/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625491,"owners_count":21135513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autonomous","cell-selection","cellular","coordination","environment","evaluation","gym","gymnasium","management","mobile","mobile-networks","multi-agent-reinforcement-learning","optimization","python","python3","reinforcement-learning","rllib","simulation","stable-baselines","wireless"],"created_at":"2024-08-04T00:01:11.884Z","updated_at":"2025-04-12T19:46:03.439Z","avatar_url":"https://github.com/stefanbschneider.png","language":"Python","funding_links":[],"categories":["Lab","Research"],"sub_categories":["ready to use testbed (Docker, Vagrant etc.)","Diameter"],"readme":"[![CI](https://github.com/stefanbschneider/mobile-env/actions/workflows/python-package.yml/badge.svg)](https://github.com/stefanbschneider/mobile-env/actions/workflows/python-package.yml)\n[![PyPI](https://github.com/stefanbschneider/mobile-env/actions/workflows/python-publish.yml/badge.svg)](https://github.com/stefanbschneider/mobile-env/actions/workflows/python-publish.yml)\n[![Documentation](https://readthedocs.org/projects/mobile-env/badge/?version=latest)](https://mobile-env.readthedocs.io/en/latest/?badge=latest)\n[![Code Style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/stefanbschneider/mobile-env/blob/master/examples/demo.ipynb)\n\n\n# mobile-env: An Open Environment for Autonomous Coordination in Mobile Networks\n\nmobile-env is an open, minimalist environment for training and evaluating coordination algorithms in wireless mobile networks.\nThe environment allows modeling users moving around an area and can connect to one or multiple base stations.\nUsing the [Gymnasium](https://gymnasium.farama.org/) ([previously Gym](https://www.gymlibrary.dev/)) interface,\nthe environment can be used with any reinforcement learning framework (e.g., stable-baselines or Ray RLlib) or any custom (even non-RL) coordination approach.\nThe environment is highly configurable and can be easily extended (e.g., regarding users, movement patterns, channel models, etc.).\n\nmobile-env supports multi-agent and centralized reinforcement learning policies. It provides various choices for rewards and observations. mobile-env is also easily extendable, so that anyone may add another channel models (e.g. path loss), movement patterns, utility functions, etc.\n\nAs an example, mobile-env can be used to study multi-cell selection in coordinated multipoint.\nHere, it must be decided what connections should be established among user equipments (UEs) and base stations (BSs) in order to maximize Quality of Experience (QoE) globally.\nTo maximize the QoE of single UEs, the UE intends to connect to as many BSs as possible, which yields higher (macro) data rates.\nHowever, BSs multiplex resources among connected UEs (e.g. schedule physical resource blocks) and, therefore, UEs compete for limited resources (conflicting goals).\nTo maximize QoE globally, the policy must recognize that (1) the data rate of any connection is governed by the channel (e.g. SNR) between UE and BS and (2) QoE of single UEs not necessarily grows linearly with increasing data rate.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/36734964/139288123-7732eff2-24d4-4c25-87fd-ac906f261c93.gif\" width=\"65%\"/\u003e\n    \u003cbr\u003e\n    \u003csup\u003e\u003ca href=\"https://thenounproject.com/search/?q=base+station\u0026i=1286474\" target=\"_blank\"\u003eBase station icon\u003c/a\u003e by Clea Doltz from the Noun Project\u003c/sup\u003e\n\u003c/p\u003e\n\n**Try mobile-env:**\n\n- Part I: Customizing mobile-env and single-agent RL with stable-baselines3: [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/stefanbschneider/mobile-env/blob/master/examples/demo.ipynb)\n- Part II: Multi-agent RL on mobile-env with Ray RLlib: [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/stefanbschneider/mobile-env/blob/master/examples/rllib.ipynb)\n\nDocumentation and API: [ReadTheDocs](https://mobile-env.readthedocs.io/en/latest/)\n\n\n## Citation\n\n\nIf you use `mobile-env` in your work, please cite our paper ([author PDF](https://ris.uni-paderborn.de/download/30236/30237/author_version.pdf)):\n\n```\n@inproceedings{schneider2022mobileenv,\n  author = {Schneider, Stefan and Werner, Stefan and Khalili, Ramin and Hecker, Artur and Karl, Holger},\n  title = {mobile-env: An Open Platform for Reinforcement Learning in Wireless Mobile Networks},\n  booktitle={Network Operations and Management Symposium (NOMS)},\n  year = {2022},\n  publisher = {IEEE/IFIP},\n}\n```\n\nmobile-env is based on the underlying environment using in [DeepCoMP](https://github.com/CN-UPB/DeepCoMP), which is a combination of reinforcement learning approaches for dynamic multi-cell selection.\nmobile-env provides this underlying environment as open, stand-alone environment.\n\n\n## Installation\n\n### From PyPI (Recommended)\n\nThe simplest option is to install the latest release of `mobile-env` from [PyPI](https://pypi.org/project/mobile-env/) using pip:\n\n```bash\npip install mobile-env\n```\nThis is recommended for most users. mobile-env is tested on Ubuntu, Windows, and MacOS.\n\n### From Source (Development)\n\nAlternatively, for development, you can clone `mobile-env` from GitHub and install it from source.\nAfter cloning, install in \"editable\" mode (-e):\n\n```bash\npip install -e .\n```\n\nThis is equivalent to running `pip install -r requirements.txt`.\n\nIf you want to run tests or examples, also install the requirements in `tests`.\nFor dependencies for building docs, install the requirements in `docs`.\n\n## Example Usage\n\n```python\nimport gymnasium\nimport mobile_env\n\nenv = gymnasium.make(\"mobile-medium-central-v0\")\nobs, info = env.reset()\ndone = False\n\nwhile not done:\n    action = ... # Your agent code here\n    obs, reward, terminated, truncated, info = env.step(action)\n    done = terminated or truncated\n    env.render()\n```\n\n## Customization\n\nmobile-env supports custom channel models, movement patterns, arrival \u0026 departure models, resource multiplexing schemes and utility functions.\nFor example, replacing the default [Okumura–Hata](https://en.wikipedia.org/wiki/Hata_model) channel model by a (simplified) path loss model can be as easy as this:\n\n```python\nimport gymnasium\nimport numpy as np\nfrom mobile_env.core.base import MComCore\nfrom mobile_env.core.channel import Channel\n\n\nclass PathLoss(Channel):\n    def __init__(self, gamma, **kwargs):\n        super().__init__(**kwargs)\n        # path loss exponent\n        self.gamma = gamma\n\n    def power_loss(self, bs, ue):\n        \"\"\"Computes power loss between BS and UE.\"\"\"\n        dist = bs.point.distance(ue.point)\n        loss = 10 * self.gamma * np.log10(4 * np.pi * dist * bs.frequency)\n        return loss\n\n\n# replace default channel model in configuration\nconfig = MComCore.default_config()\nconfig['channel'] = PathLoss\n\n# pass init parameters to custom channel class!\nconfig['channel_params'].update({'gamma': 2.0})\n\n# create environment with custom channel model\nenv = gymnasium.make('mobile-small-central-v0', config=config)\n# ...\n```\n\n## Projects Using mobile-env\n\nIf you are using `movile-env`, please let us know and we are happy to link to your project from the readme. You can also open a pull request yourself.\n\n* [Mohammadreza Kouchaki and Vuk Marojevic, \"Actor-Critic Network for O-RAN Resource Allocation: xApp Design, Deployment, and Analysis\", 2022](https://arxiv.org/abs/2210.04604)\n* [Stefan Schneider, Ramin Khalili, Artur Hecker, Holger Karl, \"DeepCoMP: Self-Learning Dynamic Multi-Cell Selection for Coordinated Multipoint (CoMP)\", 2021](https://github.com/CN-UPB/DeepCoMP)\n\n\n## Contributing\n\nDevelopment: [@stefanbschneider](https://github.com/stefanbschneider) and [@stwerner97](https://github.com/stwerner97/)\n\n\nWe happy if you find `mobile-env` useful. If you have feedback or want to report bugs, feel free to [open an issue](https://github.com/stefanbschneider/mobile-env/issues/new). Also, we are happy to link to your projects if you use `mobile-env`.\n\nWe also welcome contributions: Whether you implement a new channel model, fix a bug, or just make a minor addition elsewhere, feel free to open a pull request!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanbschneider%2Fmobile-env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanbschneider%2Fmobile-env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanbschneider%2Fmobile-env/lists"}