digital_comms.mobile_network package¶
Submodules¶
digital_comms.mobile_network.interventions module¶
Decide on interventions
-
digital_comms.mobile_network.interventions.decide_interventions(strategy, budget, service_obligation_capacity, system, timestep)¶ Given strategy parameters and a system return some next best intervention
Parameters: - strategy (str) – One of ‘minimal’, ‘macrocell’, ‘small_cell’ intervention strategies
- budget (int) – Annual budget in GBP
- service_obligation_capacity (float) – Threshold for universal mobile service, in Mbps/km^2
- system (ICTManager) – Gives areas (postcode sectors) with population density, demand
Returns: - 0: obj:list of obj:dict
Details of the assets that were built
Each containing the keys
- site_ngr: str
Unique site reference number
- frequency: str
Asset frequency (“700”, ..)
- technology: str
Asset technology (“LTE”, ..)
- bandwidth: str
Asset bandwith (“2x10MHz”, ..)
- build_date: int
Timestep when the asset was built
- pcd_sector: int
Id of the postcode sector where asset is located
- 1: int
Remaining budget
- 2: int
Total costs of intervention build step
Return type:
-
digital_comms.mobile_network.interventions.meet_demand(budget, available_interventions, timestep, system)¶
-
digital_comms.mobile_network.interventions.meet_service_obligation(budget, available_interventions, timestep, service_obligation_capacity, system)¶
digital_comms.mobile_network.model module¶
Cambridge Communications Assessment Model
-
class
digital_comms.mobile_network.model.ICTManager(lads, pcd_sectors, assets, capacity_lookup_table, clutter_lookup)¶ Bases:
objectModel controller class.
Represents local area districts and postcode sectors with their assets, capacities and clutters.
Parameters: - lads (
listofdict) –List of local area districts
- pcd_sectors (
listofdict) –List of postcode sectors (pcd)
- assets (
listofdict) –List of assets
- pcd_sector:
str - Code of the postcode sector
- pcd_sector:
- site_ngr:
int - Unique site reference number
- site_ngr:
- technology:
str - Abbreviation of the asset technology (LTE, 3G, 4G, ..)
- technology:
- frequency:
str - Frequency of the asset (800, 2600, ..)
- frequency:
- bandwidth:
str - Bandwith of the asset (2x10MHz, ..)
- bandwidth:
- build_date:
int - Build year of the asset
- build_date:
- capacity_lookup_table (dict) –
Dictionary that represents the capacity of an asset configuration as a function of population density, per district type
- clutter_lookup (list of tuple) –
Each element represents TODO
- lads (
-
class
digital_comms.mobile_network.model.LAD(data)¶ Bases:
objectLocal area district.
Represents an area to be modelled, contains data for demand characterisation and assets for supply assessment.
Parameters: data (dict) – Metadata and info for the LAD
-
add_asset(asset)¶ Add an asset to postcode sector
Parameters: asset (TODO) – TODO
-
add_pcd_sector(pcd_sector)¶ Add a postcode sector to the local area district.
Parameters: pcd_sector (PostcodeSector) – Representation of a postcode sector that needs to be added to the local area district
-
capacity()¶ Calculate mean capacity from all nested postcode sectors
Returns: Mean capacity of the local area district Return type: obj Notes
Function returns 0 when no postcode sectors are configured to the LAD.
-
coverage()¶ Calculate coverage as the proportion of the population able to obtain the specified capacity threshold
Returns: Coverage in the local area district Return type: obj Notes
Function returns 0 when no postcode sectors are configured to the LAD.
-
demand()¶ Calculate demand per square kilometer (Mbps km^2) from all nested postcode sectors
Returns: Demand of the local area district Return type: obj Notes
Function returns 0 when no postcode sectors are configured to the LAD.
-
population¶ obj – Sum of all postcode sectors populations in the local area district
-
population_density¶ obj – The population density in the local area district
-
-
class
digital_comms.mobile_network.model.PostcodeSector(data, assets, capacity_lookup_table, clutter_lookup)¶ Bases:
objectRepresents a Postcode sector to be modelled
-
capacity_margin¶ obj – Capacity margin per postcode sector in Mbps
-
demand¶ obj – The demand in capacity per km^2 TODO Double check
Notes
- 0.02 Mbps per user during busy hours
- 100 population
- 0.8 penetration
/ 10 km^2 area
= ~0.16 Mbps/km^2 area capacity demand
-
population_density¶ obj – The population density in persons per square kilometer (km^2)
-
threshold_demand(SERVICE_OBLIGATION_CAPACITY)¶ Calculate capacity required to meet a service obligation.
Parameters: SERVICE_OBLIGATION_CAPACITY (int) – The required service obligation in Mb/s Returns: The threshold demand in Mbps/km^2 Return type: int Notes
Effectively calculating Mb/s/km^2 from Mb/s/user
- E.g.
- 100 people in this area * 0.8 penetration proportion * 0.3 market share * 2 Mb/s/person service obligation / 10 km^2 area = ~4.8 Mbps/km^2
-
-
digital_comms.mobile_network.model.interpolate(x0, y0, x1, y1, x)¶ Linear interpolation between two values
Parameters: Returns: Interpolated y-value
Return type:
-
digital_comms.mobile_network.model.lookup_capacity(lookup_table, clutter_environment, frequency, bandwidth, site_density)¶ Use lookup table to find capacity by clutter environment geotype, frequency, bandwidth and site density
Parameters: Returns: The capacity for the asset in TODO
Return type: Example
>>> lookup_table = { ("Urban", "800", "2x10MHz"): [ (0, 1), (1, 2), ], ("Urban", "2600", "2x10MHz"): [ (0, 3), (3, 5), ] } >>> lookup_capacity(lookup_table, "Urban", "2600", "2x10MHz", 3) 5
Notes
Returns a capacity of 0 when the site density is below the specified range. Interpolates between values between the lower and upper bounds. Returns the maximum capacity when the site density is higher than the uppper bound.
Raises: KeyError– If combination is not found in the lookup table.
-
digital_comms.mobile_network.model.lookup_clutter_geotype(clutter_lookup, population_density)¶ Return geotype based on population density
Parameters: - clutter_lookup (list of tuple) –
Lookup table that represents geographical types and their population density sorted by population_density_upper_bound ascending.
- population_density (int) – The population density in persons per square kilometer, that needs to be looked up in the clutter lookup table
Returns: Geotype match for population_density
Return type: Example
>>> clutter_lookup = [ (5, "Urban") ] >>> lookup_clutter_geotype(clutter_lookup, 0) "Urban"
Notes
Returns lowest boundary if population density is lower than the lowest boundary. Returns upper boundary of a region if population density is within a region range. Returns upper boundary if population density is higher than the highest boundary.
- clutter_lookup (list of tuple) –