Configure#
network_gym_env.Configure#
- class network_gym_env.Configure(id, NetworkGymSim, env_list=['custom'])[source]#
Environment Configure Component.
The “env_config” establishes a connection with the server and periodically dispatches the message “env-hello.”
Upon reception of an “env-start” signal, the “env_config” terminates its socket connection and initiates the “env_sim” simulator.
Upon launching, the “env_sim” establishes a connection with the server, utilizing the identical identification as the “env_config.” Subsequently, it commences the exchange of measurement/action messages with the client.
Following the conclusion of the “env_sim” simulation, the socket is closed, and the “env_config” reconnects.
From the server’s point, the “env_config” and “env_sim” are perceived as identical entities. The division between the “env_config” and “env_sim” components provides the advantage of facilitating straightforward expansion of the “env_sim” to other simulators (e.g., ns-3) or test environments, all the while utilizing the same underlying “env_config” code.
Initialize custom environment.
- Parameters:
id (int) – environment identity
NetworkGymSim (simulator) – network simulator
env_list (list[str]) – a list of supported environments, non-offical account can only use ‘custom’ as env name
Methods#
- network_gym_env.Configure.run(self)#
Run the environement configure.