Chances of 2 agents going to the same stand.

All topics related to questions in Pedestrian Dynamics
Ken8891
Posts: 22
Joined: Thursday 08 December, 2016 - 04:13

Chances of 2 agents going to the same stand.

Post by Ken8891 »

Hi,

Could there be a chance for 2 different agent entering from 2 different entry going into the same stand?

Let's say I have 5 standsections.
1. Entry1 to standsection3
2. Entry2 to standsection3

Best Regards
Kenneth
marlies
Posts: 301
Joined: Monday 17 January, 2011 - 09:28

Re: Chances of 2 agents going to the same stand.

Post by marlies »

Hi Kenneth,

I'm not sure I did understand your question correctly, but I prepared a small example for you. See the attached model file. Is that what you were looking for?

The agent route starts with an activity entry. In the activity entry you'll find a 70/30 distribution over the two entries.
The assignment in the activity stands, just makes sure that agents get there individual seats.

To find these settings, please check out:
- Modeling > Agent Input > Activities > Entry > Locations
- Modeling > Agent Input > Activities > Stands > Locations

Also have a look at:
- Modeling > Agent Input > Generators > Ingress Generator > NrAgents in the arrivallist. This setting calculates all the available seats and let the generator create no more agents than there are seats avaialble.

Succes. Kind Regards, Marlies
Attachments
StadiumMultipleEntries.mod
(185.7 KiB) Downloaded 463 times
Ken8891
Posts: 22
Joined: Thursday 08 December, 2016 - 04:13

Re: Chances of 2 agents going to the same stand.

Post by Ken8891 »

Hi,

My Nr Agents is GetCrowdSizeInputData(1,1).

My objective is to have 5 entrys entering and goes to the 5 stand section.

2 entrys from the west and 3 entrys from the east. The 2 entrys will goes to standsection 1 to 3. And the 3 entrys from the east will goes to standsection 3 to 5.

The NR Agents will change according to the database.

Best Regards
Kenneth
Attachments
My Stands got 5 Stand section.
My Stands got 5 Stand section.
1499322748394-1610165861.jpg (883.75 KiB) Viewed 20184 times
1499322695813457712243.jpg
1499322695813457712243.jpg (1.23 MiB) Viewed 20184 times
marlies
Posts: 301
Joined: Monday 17 January, 2011 - 09:28

Re: Chances of 2 agents going to the same stand.

Post by marlies »

Hi Kenneth,

From your post I understand that you have more or less two groups:
WestStands and EastStands.

See attached for an example model of how you could implement that in (I think) the easiast way. In the model, please have a look at:

- The settings of the 4 stand sections, each of them having a group name (tab General, setting Group) either West or East.
- The settings of the entryexits: these also have a group name to group the entries in west and east entries (which doesn't make much sense with just two entries :) but just to make clear how you could group your 5 entries).

Then go to Modeling > Agent Input
- In activities there are now 2 activities to model the entries and 2 activities to model the stands. Please note that for all these activities I selected the corresponding group name in the General tab of this activities. When you select a specific group in the setting Activity Group, you'll see that the list of available stands (or entries) in the tab Locations will change!
- Next is the step Activity Routes. Here you'll now find two routes, one for WestEntry --> weststands and one for EastEntry --> EastStands.
- Then go to generators > ingress generator > click edit. In the Arrival List you will now find an additional row: this is an adittional row to generate the east agents separately and assign them to the east route (setting Activity route is the only one that is different for the 2 lines!).

Your next step will be to determine the number of agents based also on the table (and not only the stands capacity) I'll come back to that later!

Regards, Marlies
Attachments
StadiumMultipleEntries_v2.mod
(218.55 KiB) Downloaded 468 times
Ken8891
Posts: 22
Joined: Thursday 08 December, 2016 - 04:13

Re: Chances of 2 agents going to the same stand.

Post by Ken8891 »

Hi,

What about if i got a center stand. And both east and west entry needs to go to the center stand?

The part of determining the number of agents based on the table and not the stands capacity is quite a important factor. I believe this will more or less solve my issue. Need this demo asap.

Thanks and best regards
Kenneth
Ken8891
Posts: 22
Joined: Thursday 08 December, 2016 - 04:13

Re: Chances of 2 agents going to the same stand.

Post by Ken8891 »

Hi,

I just tried to implement something like yours. I followed. But the crowds just went to 1 stand instead of distribute uniformly between the 2 stands.

And the crowd only use 1 stairs instead of the other.

How should I solve this 2 issue?
Attachments
1499332370920-1429619037.jpg
1499332370920-1429619037.jpg (1018.3 KiB) Viewed 20177 times
marlies
Posts: 301
Joined: Monday 17 January, 2011 - 09:28

Re: Chances of 2 agents going to the same stand.

Post by marlies »

Hi Kenneth,

Find attached an update of my model, where the number of agents to generate comes from the user table CrowdData.

To check what I did, please go to:

- Menu Modeling > User Tables, here you'll find a table CrowdData that contains a value for the west and east entry.
- Then go to Modeling > Agent Input > Generators. Click edit for one of the lines in the arrival list. Click in number of agents. Here you will find:

Code: Select all

 GetCrowdData(1, 2)
This is the code you can use to read a value from your user table. The parameters are (row, column) and the function is GET then following the name of your user table.
- The rest of the script in the field number of agents is to make sure that the number does not exceed the actual capacity of your stands.

To me it looks as if in your model at first all agents go to one section, then filling up the next section etc. Did you use determinefinaldestination in the CreationTrigger in the arrival list? :
Capture.JPG
Capture.JPG (123.25 KiB) Viewed 20169 times
Kind Regards, Marlies
Attachments
StadiumMultipleEntries_v3.mod
(212.42 KiB) Downloaded 477 times
Ken8891
Posts: 22
Joined: Thursday 08 December, 2016 - 04:13

Re: Chances of 2 agents going to the same stand.

Post by Ken8891 »

Hi Marlies,

Thanks for the demo and the reply. I had tried using the determine final destination. But the crowd still seems to be entering from the most right stairs and heading over to 1 part of the standsection rather than distributing evenly.

Is there any solutions to make the agents to use both of the stairs and enter the standsection evenly.

Best regards
Kenneth
Attachments
1499403472949110224274.jpg
1499403472949110224274.jpg (1.02 MiB) Viewed 20164 times
Ken8891
Posts: 22
Joined: Thursday 08 December, 2016 - 04:13

Re: Chances of 2 agents going to the same stand.

Post by Ken8891 »

Hi when I disable my stand layer. I found out this.
Attachments
1499405543006-1770212675.jpg
1499405543006-1770212675.jpg (324.88 KiB) Viewed 20163 times
Charles Lester
Posts: 2
Joined: Friday 07 July, 2017 - 17:00

Re: Chances of 2 agents going to the same stand.

Post by Charles Lester »

HI Kenneth,

Attached is the updated demo model. The agents are distributed over the west stands.
StandsDemo.png
StandsDemo.png (16.21 KiB) Viewed 20153 times
Each run will generate a different distribution of filled seats. The agents are evenly distributed through the west stand sections.

To accomplish this I changed the West stands Locations distribution script. The default stores the last assigned location and assigned agents until capacity is reached. The change skips the previous used location then assigns the agent to the next available stands, and then repeats the list.

You can copy past this altered script into your stands location distribution.
AgentInputStandsDemo.PNG
AgentInputStandsDemo.PNG (58.76 KiB) Viewed 20153 times
( Goto AgentInput, Activities tab, edit your stands activity, goto the Locations tab)

Code: Select all

{**Stands: Assign the stand sections in the given order based on their capacity**}  {**Note with this function it is only possible to assign the seat once!**}
do(
  var([atmC], vbAtom), 
  var([valID], vbValue, 0),
  
  if(
   Label([PD___Standsection], i) = 0,
   if(
     Or(
       Agent_GetEndDestination(i) <= 0,
       M(Agent_GetEndDestination(i)) <> atmMotherStandsection
     ),
     do( 
       var([valRow], vbValue, Max(1, AgentActivity_GetLastRowNumber(c))), {**Store last row number**}
       
       if(and(valRow>0,valRow < nRows(c)), inc(valRow,1), valRow := 1), {--Changed  }
       
       LoopUntil(
         Or(
           valID > 0,
           valRow > nRows(c)
         ),
         do(
           atmC := AgentActivity_GetActivityLocationByIndex(c, valRow),
           
           if(
             StandSection_GetCurSeat(atmC) < StandSection_GetCapacity(atmC),
             
             {**Capacity available. Return this ID**}
             do(
               valID := cell(valRow, AgentActivity_COLUMN_ID, c),
               
               {**Assign stand**}
               StandSection_AssignSeat(atmC, i),
               Label([PD___Standsection], i) := atmC
             ),
             
             {**Go to next row**}
             inc(valRow)
           )
         ),
         nRows(c)
       ),
       
       {**Update last row**}
       AgentActivity_SetLastRowNumber(c, valRow)
     ),
     valID := StandSection_GetID(Agent_GetEndDestination(i))
   ),  
   valID := StandSection_GetID(vtp(Label([PD___Standsection], i)))
  ),
    
  {**Return ID**}
  valID  
)
From the images of you model I think by using this script the agents will utilize both stairs and be evenly distributed.

Let me know if this helps!


Best Regards,
Charles
Attachments
StadiumMultipleEntries_v5.mod
(278.66 KiB) Downloaded 453 times
Post Reply