starling_sim.basemodel.agent.stations.vehicle_sharing_station
Module Contents
Classes
Station dedicated to a shared vehicle system |
- class starling_sim.basemodel.agent.stations.vehicle_sharing_station.VehicleSharingStation(simulation_model, agent_id, origin, capacity, stock_generation=None, **kwargs)
Bases:
starling_sim.basemodel.agent.stations.station.Station
Station dedicated to a shared vehicle system
- SCHEMA
- check
- __str__()
Give a string display to the simulation element
- create_station_based_vehicles(stock_generation)
- get_store()
Returns the station’s store :return:
- nb_products()
Returns the number of products in store :return:
- get_from_store(agent)
Requests a product from the station’s store :param agent: requesting agent :return: StationRequest object
- static check(product)
Tests the type of the product according to the type of store This method must be extended for specific stations :param product: product to be tester :return:
- return_to_store(agent, product)
Tries to return a product in the station’s store :param agent: agent returning product :param product: returned product :return: StationRequest object
- set_products(products)
Sets the products contained in the store :param products: list of products, type is not checked :return:
- loop_()
This method represents the life cycle of an agent.
The loop process will be added to the simulation environment after the agent creation. Agents may perform actions that have a duration. They must then yield other processes such as waiting or moving, and will resume at the end of their action.
The loop must be extended to represent a specific behavior, using possibly inherited methods.