Esempio n. 1
0
def main():
    simulation = Simulation()
    city = City.from_numbers(600, 100).assign_bikes_randomly()

    time = time_of_number_of_days(7)
    simulation.simulate(city, time)

    ResultWriter.write_to_excel(simulation.get_stations_data(),
                                "stations_states.xlsx")
    ResultWriter.write_to_excel(simulation.get_breaking_bikes_data(),
                                "bikes_breaking.xlsx")
Esempio n. 2
0
    def test_working(self):
        city = City.from_numbers(100, 10).assign_bikes_randomly()
        time = time_of_number_of_days(3)
        simulaiton = Simulation()

        simulaiton.simulate(city, time)

        broken_bikes = simulaiton.get_breaking_bikes_data()
        trips_history = simulaiton.get_stations_data()

        res_stations_changes = station_changes.StationChanges(
            trips_history).find_stations_changes()
        scores = bikes_scoring.BikesScoring(res_stations_changes).score_bikes()