Package: mobile-env
mobile-env: An Open Environment for Autonomous Coordination in Mobile Networksmobile-env is an open, minimalist environment for training and evaluating coordination algorithms in wireless mobile networks.
The environment allows modeling users moving around an area and can connect to one or multiple base stations.
Using theGymnasium(previously Gym) interface,
the environment can be used with any reinforcement learning framework (e.g., stable-baselines or Ray RLlib) or any custom (even non-RL) coordination approach.
The environment is highly configurable and can be easily extended (e.g., regarding users, movement patterns, channel models, etc.).mobile-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.As an example, mobile-env can be used to study multi-cell selection in coordinated multipoint.
Here, 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.
To maximize the QoE of single UEs, the UE intends to connect to as many BSs as possible, which yields higher (macro) data rates.
However, BSs multiplex resources among connected UEs (e.g. schedule physical resource blocks) and, therefore, UEs compete for limited resources (conflicting goals).
To 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.Base station iconby Clea Doltz from the Noun ProjectTry mobile-env:Documentation and API:ReadTheDocsCitationIf you usemobile-envin your work, please cite our paper (author PDF):@inproceedings{schneider2022mobileenv,
  author = {Schneider, Stefan and Werner, Stefan and Khalili, Ramin and Hecker, Artur and Karl, Holger},
  title = {mobile-env: An Open Platform for Reinforcement Learning in Wireless Mobile Networks},
  booktitle={Network Operations and Management Symposium (NOMS)},
  year = {2022},
  publisher = {IEEE/IFIP},
}mobile-env is based on the underlying environment using inDeepCoMP, which is a combination of reinforcement learning approaches for dynamic multi-cell selection.
mobile-env provides this underlying environment as open, stand-alone environment.InstallationFrom PyPI (Recommended)The simplest option is to install the latest release ofmobile-envfromPyPIusing pip:pipinstallmobile-envThis is recommended for most users. mobile-env is tested on Ubuntu, Windows, and MacOS.From Source (Development)Alternatively, for development, you can clonemobile-envfrom GitHub and install it from source.
After cloning, install in "editable" mode (-e):pipinstall-e.This is equivalent to runningpip install -r requirements.txt.If you want to run tests or examples, also install the requirements intests.
For dependencies for building docs, install the requirements indocs.Example Usageimportgymnasiumimportmobile_envenv=gymnasium.make("mobile-medium-central-v0")obs,info=env.reset()done=Falsewhilenotdone:action=...# Your agent code hereobs,reward,terminated,truncated,info=env.step(action)done=terminatedortruncatedenv.render()Customizationmobile-env supports custom channel models, movement patterns, arrival & departure models, resource multiplexing schemes and utility functions.
For example, replacing the defaultOkumura–Hatachannel model by a (simplified) path loss model can be as easy as this:importgymnasiumimportnumpyasnpfrommobile_env.core.baseimportMComCorefrommobile_env.core.channelimportChannelclassPathLoss(Channel):def__init__(self,gamma,**kwargs):super().__init__(**kwargs)# path loss exponentself.gamma=gammadefpower_loss(self,bs,ue):"""Computes power loss between BS and UE."""dist=bs.point.distance(ue.point)loss=10*self.gamma*np.log10(4*np.pi*dist*bs.frequency)returnloss# replace default channel model in configurationconfig=MComCore.default_config()config['channel']=PathLoss# pass init parameters to custom channel class!config['channel_params'].update({'gamma':2.0})# create environment with custom channel modelenv=gymnasium.make('mobile-small-central-v0',config=config)# ...Projects Using mobile-envIf you are usingmovile-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.Mohammadreza Kouchaki and Vuk Marojevic, "Actor-Critic Network for O-RAN Resource Allocation: xApp Design, Deployment, and Analysis", 2022Stefan Schneider, Ramin Khalili, Artur Hecker, Holger Karl, "DeepCoMP: Self-Learning Dynamic Multi-Cell Selection for Coordinated Multipoint (CoMP)", 2021ContributingDevelopment:@stefanbschneiderand@stwerner97We happy if you findmobile-envuseful. If you have feedback or want to report bugs, feel free toopen an issue. Also, we are happy to link to your projects if you usemobile-env.We 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!