Пример #1
0
def mixed_system(setup_lad, setup_pcd_sector, setup_mixed_assets,
                 setup_capacity_lookup, setup_clutter_lookup,
                 setup_simulation_parameters):

    system = NetworkManager(setup_lad, setup_pcd_sector, setup_mixed_assets,
                            setup_capacity_lookup, setup_clutter_lookup,
                            setup_simulation_parameters)

    return system
Пример #2
0
def high_demand_system(setup_lad, setup_pcd_sectors2, setup_assets,
                       setup_capacity_lookup_table2, setup_clutter_lookup,
                       setup_simulation_parameters2):

    system = NetworkManager(setup_lad, setup_pcd_sectors2, setup_assets,
                            setup_capacity_lookup_table2, setup_clutter_lookup,
                            setup_simulation_parameters2)

    return system
Пример #3
0
    def test_Manager(self, setup_lad, setup_pcd_sector, setup_assets,
                     setup_capacity_lookup, setup_clutter_lookup,
                     setup_simulation_parameters):

        Manager = NetworkManager(setup_lad, setup_pcd_sector, setup_assets,
                                 setup_capacity_lookup, setup_clutter_lookup,
                                 setup_simulation_parameters)

        for pcd_sector in Manager.postcode_sectors.values():
            if pcd_sector.id == 'CB11':
                assert pcd_sector._calculate_site_density_macrocells() == 0.5
            if pcd_sector.id == 'CB12':
                assert pcd_sector._calculate_site_density_macrocells() == 0.5
Пример #4
0
        for pcd_sector in pcd_sectors:
            pcd_sector_id = pcd_sector["id"]
            pcd_sector["population"] = (
                population_by_scenario_year_pcd[pop_scenario][year]
                [pcd_sector_id])
            pcd_sector["user_throughput"] = (
                user_throughput_by_scenario_year[throughput_scenario][year])

        budget = simulation_parameters['annual_budget']
        service_obligation_capacity = simulation_parameters[
            'service_obligation_capacity']

        if year == BASE_YEAR:
            # Run initial simulation
            system = NetworkManager(lads, pcd_sectors, assets,
                                    capacity_lookup_table, clutter_lookup,
                                    simulation_parameters)

        # Decide what to build this year
        interventions_built, budget, spend = decide_interventions(
            intervention_strategy, budget, service_obligation_capacity, system,
            year, simulation_parameters)

        # Add new assets to existing system assets
        assets += interventions_built

        # Run simulation with built assets
        system = NetworkManager(lads, pcd_sectors, assets,
                                capacity_lookup_table, clutter_lookup,
                                simulation_parameters)