network_slicing Adapter#

#

class network_gym_client.envs.network_slicing.Adapter(config_json)[source]#

network_slicing environment adapter.

Parameters:

Adapter (network_gym_client.adapter.Adapter) – the base class

Initialize the adapter.

Parameters:

config_json (json) – the configuration file

Methods#

network_gym_client.envs.network_slicing.Adapter.get_observation(self, df)#

Prepare observation for network_slicing env.

This function should return the same number of features defined in the get_observation_space().

Parameters:

df (pd.DataFrame) – the network stats measurements

Returns:

spaces – observation spaces

network_gym_client.envs.network_slicing.Adapter.get_reward(self, df)#

Prepare reward for the network_slicing env.

Parameters:

df (pd.DataFrame) – network stats measurements

Returns:

spaces – reward spaces

network_gym_client.envs.network_slicing.Adapter.get_policy(self, action)#

Prepare the network policy for network_slicing env.

Parameters:

action (spaces) – the action from RL agent

Returns:

json – the network policy

Reward Methods#

No reward function yet.

Additional Methods#

network_gym_client.envs.network_slicing.Adapter.get_action_space(self)#

Get action space for network_slicing env.

Returns:

spaces – action spaces

network_gym_client.envs.network_slicing.Adapter.get_observation_space(self)#

Get observation space for network_slicing env.

Returns:

spaces – observation spaces

network_gym_client.envs.network_slicing.Adapter.get_rbg_size(self, bandwidth)#

Compute the resource block group size based on the bandwith (RB number).

This code is coppied from ns3. PF type 0 allocation RBG

Parameters:

bandwidth (int) – the resouce block number

Returns:

int – the resouce block group size