0
votes

Is there a way to add agents through pedSource but give them nominal values for added parameters?

We have different parameters within a specific agent that are in a DB and want them to be initialized when agent is created in population.

We tried doing it using the advanced option in pedSource but the "from DB " option does not have our added parameters, only the default ones for pedestrian agent.

1

1 Answers

1
votes

good to see you here :-)

Sounds like you need to create your own Agent Type to be used for your pedestrians. Create a new agent type and set it up to be used as pedestrians as below: enter image description here

Next, make your PedSource object create these MyPeds and not the default peds: enter image description here

Now, you can add your parameters to MyPed as you like. Let's say it has 1 param myParam. To load values from the dbase, also create a MyPed population (drag in the MyPed class onto Main), set it as below: enter image description here

Last, you need to tell the source object to add any MyPed created to your new population as it will fill the params: enter image description here

hope this helps