Oscar Rojo Avila
unread,Feb 17, 2025, 8:25:54 PMFeb 17Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to GAMA
Dear Gamma Community,I have a question regarding creating agents from a csv file. In particular, I have a csv with locations of charging stations, and I want to be able to dynamically add or remove stations depending on the number of bicycles in the system, which is a parameter in the simulation.Currently, I start the simulation with a stationary number of stations which is imported with the following function:‘’'
create chargingStation from: chargingStations_csv with: [
lat:: float(get(“center_y”)),
lon:: float(get(“center_x”))
]
‘’'Is there a way to specify which rows from the csv to use? For example, if I start the simulation with 10 stations, I want to read the first 10 rows from the csv, if then I need to add 3 stations more, I want the create function to read the 11-13th rows.If this isn’t possible, or if there is a better way of doing this, I´d really appreciate your feedback.