Use TCP/IP to send data

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

Use TCP/IP to send data

Post by Ken8891 »

Hi,

I am building a egress scenario where I can send data using TCP/IP. I wants to be able to control the number of people to exit the stadium and walk to the entry/exit point. Is it possible to do it?

I understand that for ingress, I have to create a user table and at the agent generator, add the row and column to the "Nr Agents". Then when I send data using TCP/IP, I just have to send data to that row and column. Am I right?
Bram de Vries
Posts: 60
Joined: Thursday 08 January, 2015 - 13:29

Re: Use TCP/IP to send data

Post by Bram de Vries »

Dear Ken,

Can you give a little more detail about what you're trying to achieve? What kind of data do you want to sent to the model using TCP/IP?

For Egress, do you want to determine these amounts of people before the simulation starts or do you want to be able to adjusts these amounts during the simulation based on your data?

For Ingress I have the same question: do you want to determine the number of ingress agents before the simulation starts or do you want to alter this during the simulation?

Kind regards,

Bram
Ken8891
Posts: 22
Joined: Thursday 08 December, 2016 - 04:13

Re: Use TCP/IP to send data

Post by Ken8891 »

Hi Bram,

Thanks for the reply.

1. What I want to achieve.
To be able to send data from my own database to start the simulation.

2. What kind of data.
The data is the number of people from the database.

3. For Egress and Ingress: Before simulation or alter the number.
As my database will be constantly updating on the number of people entering, I want to be able to alter the number of people base on the data in my database.

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

Re: Use TCP/IP to send data

Post by marlies »

Hi Ken,

Sending and receiving messages via TCP/Ip sockets is possible in Pedestrian Dynamics. There are 4Dsript functions available to create sockets and connect the sockets to a server. And functions to make elements listen to specific sockets. Incoming messages will be handled by the OnMessage event handler of the element.

However, to use this function you'll need to:
- Have a Pedestrian Dynamics Developer installation and license. Using Pedestrian Dynamics Studio you won't have the required access to the atom editor.
- You'll also need to create you own 4DScripts to handle incoming messages in your model.

So, the main question for now is: which license type of Pedestrian Dynamics are you using?

Kind Regards,

Marlies
Post Reply