1. Member
Join Date
Aug 2016
Posts
5
Rep Power
0

Simulation program

Hello, my final project consists on developing a road traffic simulation based on mathematical model .
the inputs of this one are : the network, arrival rate of vehicles to each lane ,matrix which contain the probability of passing from a queue to another, the plan of traffic lights(green periode,red period,) .
I have difficulty to define them, esppacially the network
Can someone help me.

2. Senior Member
Join Date
Mar 2013
Location
Greece
Posts
183
Rep Power
8

Re: Simulation program

Well the information you provide are not enough to give you a more detailed answer, but you could simulate the whole thing with a graph. The graph will simulate the network. The network will consist of Nodes and links. Each Node will be a location in the network and each link will connect two Nodes. Now you can add as many variables as you want on this model, for example, you could say that each link (lane) will have a delay of 5 Sec (lights) and it can allow only up to 10 cars and so on.. At least this is how I imagine the entire project. The use of Graph will help you later to apply existing algorithms of finding the best way to reach a node from a certain node etc..

If you want more help, you could post some code of what you have tried until now or give us more details about the entire project.

3. Member
Join Date
Aug 2016
Posts
5
Rep Power
0

Re: Simulation program

The network must be configurable in terms of number of noads and links .
Also,the road segment can contain one,two or three lanes,so i think that the use of graph is not appropriate in this case.

4. Senior Member
Join Date
Mar 2013
Location
Greece
Posts
183
Rep Power
8

Re: Simulation program

The network must be configurable in terms of number of noads and links .

Also,the road segment can contain one,two or three lanes,so i think that the use of graph is not appropriate in this case.

Of course I don't want to force you to use my idea and I can't really say that it is the best way to processed with the project, but I can see some benefits to doing so

5. Member
Join Date
Aug 2016
Posts
5
Rep Power
0

Re: Simulation program

Second,how can I define the distance between two nodes (in meter for example)?

6. Re: Simulation program

7. Senior Member
Join Date
Mar 2013
Location
Greece
Posts
183
Rep Power
8

Re: Simulation program

Good question.. It depends on what you want to do. Your network graph can be very abstract if you only put cities as nodes, but actually if you want to make it more detailed you will have to but as nodes cities, streets, etc. You spoke about 'arrival rate', 'traffic lights (green period, red period)' and about lanes. So I visualize it like a real situation, where for example, we will be in a road stoped in the lights and the green period will be 10 seconds and we will have 3 lanes. In 10 seconds only 5 cars have time to go thought the road before the lights turn to red. So the access of the link in a specific period of time will be 5 chars (max) of each lane (simultaneous access because each lane is independent from the others). So if a link (road) has N number of Queues (lanes), K, L and M number of vehicles are going to be removed in each period of time from each queue where these numbers have a max value depends on the road specification like my example above.

Second,how can I define the distance between two nodes (in meter for example)?
You can do that while defining the links in your graph. Let's just say that you manage to create all the nodes as entities. Then you want to make the links between them. If you want to connect the Node A to Node B you could do something like A.makeLink(B,150) which will say that there is a directional link between node A and Node B and the distance of those is 150meters.

PS. I am really sorry for my English. If there is something that you still don't understand, just ask and I will try to explain it better :P

8. Member
Join Date
Aug 2016
Posts
5
Rep Power
0

Re: Simulation program

You can do that while defining the links in your graph. Let's just say that you manage to create all the nodes as entities. Then you want to make the links between them. If you want to connect the Node A to Node B you could do something like A.makeLink(B,150) which will say that there is a directional link between node A and Node B and the distance of those is 150meters.
So I have prepare a conception to my program?

9. Member
Join Date
Aug 2016
Posts
5
Rep Power
0

Re: Simulation program

Originally Posted by Norm
I published the problem in other forum in order to gain the time

10. Senior Member
Join Date
Mar 2013
Location
Greece
Posts
183
Rep Power
8

Re: Simulation program

But of course.. I believe you have to prepare all the entities first like nodes and links with all their properties and then to connect them. Now how are you going to create all the nodes and the links are on another matter. I believe you could make a file for the nodes and a file with the links to all properties inside and create a method that reads these files and prepare the objects. After that you will make all the connections with the same way.

11. Re: Simulation program

Originally Posted by mora10
I published the problem in other forum in order to gain the time
https://coderanch.com/wiki/660346/Wi...-Posting-Sites

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•