Subject | Hash | Author | Date (UTC) |
---|---|---|---|
Traffic gets automatically generated. | cf494715e0b70515fbc1b354a54168e5df10b687 | Jan Allersma | 2018-01-16 19:02:04 |
Remove obsolete files. | dc6595a0c5691acdd426aebb3eba135988ac9388 | Jan Allersma | 2018-01-11 12:49:58 |
hallo | aae977040cd511a72ee3558ac95249edf820f6c9 | XCBouke | 2018-01-10 12:47:49 |
Work done during lecture. | 7a0518a31a21e7ee0be11bc0966647acae129a94 | Jan Allersma | 2018-01-10 12:40:34 |
Traffic queues now implemented on all traffic. | bcf0ece12b63e87894a2f9d1138145353054fbab | Jan Allersma | 2018-01-08 21:37:25 |
Pedestrian don't think they're cars anymore! Also small code cleanup. | 7c6e2978497442330d56fd334cf8b33e73c7525a | Jan Allersma | 2018-01-08 20:53:51 |
Cars send signal once they're waiting, not before they're waiting. | 49fda0804f0e056fe6a060ff13bd1c10408f696e | Jan Allersma | 2018-01-08 15:57:41 |
Assessment | 8ad5b23b821e160483b919f0f375313ec6dc79be | Jan Allersma | 2017-12-20 11:37:13 |
TrafficLights working..? | 7f12d9c9d44a2fa556d15e075723ec9c11c8b468 | Jan Allersma | 2017-12-19 15:22:32 |
Add lights and fully working train. | ee0e851a1b482f162918f8723fc0c62d257aff83 | Jan Allersma | 2017-12-18 16:59:33 |
Commit after fixing issues during lecture | 93b7f5e88a7a4427867054ebabe0505963b14da0 | Jan Allersma | 2017-12-13 12:49:55 |
Some more fixes :D | 09f121a8de8ef6f49abbf0a52b0e9d9c033ade58 | Jan Allersma | 2017-12-09 15:09:38 |
Also added additional waypoints for 106. | 1567c42fbaa689848d2ca2620e37bb83bb30eaf4 | Jan Allersma | 2017-12-07 13:40:56 |
Fixed some bugs (See TestResultsSimulator.txt for more info). | 7c4466770f8b4da0af1156856a40b32cd11b6d37 | Jan Allersma | 2017-12-07 13:31:04 |
Werk van Simulator na testen 05/12/17. | 80af7ffb5438b855a2e73fb185ba66c1cd50efe3 | Jan Allersma | 2017-12-05 09:45:11 |
Nieuwe plattegrond toegevoegd. | b520f51bdd4a4d25e5d1a54cd094cf3b4632a369 | Jan Allersma | 2017-12-02 14:19:52 |
More Waypoints! | 465108ac6a127bbda26b40989fd6a68cd3e00aad | Jan Allersma | 2017-11-30 12:52:22 |
Added voetganger. | dad12c3d2eb2a7160838c3495e4a7a2d382e493f | Jan Allersma | 2017-11-30 12:32:35 |
Added all waiting waypoints for 1xx. | bbba002738e0a26b085673400c76329d3055d8ba | Jan Allersma | 2017-11-29 12:00:37 |
Simulation now working correctly for ID's 101, 102 and 103. | 1bc2fb65bb75b3a1f63cf7690472152fe1f32564 | Jan Allersma | 2017-11-28 16:22:53 |
File | Lines added | Lines deleted |
---|---|---|
simulatie/traffic.py | 15 | 12 |
File simulatie/traffic.py changed (mode: 100644) (index 9102094..ae17a3c) | |||
1 | 1 | import sys | import sys |
2 | import time | ||
3 | from random import randint | ||
2 | 4 | ||
3 | 5 | import connection | import connection |
4 | 6 | import trafficModel as tm | import trafficModel as tm |
... | ... | def spawnVehicle(index, amount, dirRequests): | |
9 | 11 | pyg.spawnVehicle(index, dirRequests) | pyg.spawnVehicle(index, dirRequests) |
10 | 12 | ||
11 | 13 | while True: | while True: |
12 | print("Vehicle internal ID:") | ||
13 | vehicle = raw_input() | ||
14 | #print("Amount of vehicles:") | ||
15 | #aantal = raw_input() | ||
16 | print("Direction Reqeust:") | ||
17 | direction = raw_input() | ||
18 | #ui = list(ui) | ||
19 | if direction == None or direction == "": | ||
20 | #print([connection.lights[int(vehicle)], connection.lights[1] + 1, 2]) | ||
21 | spawnVehicle(int(vehicle), 1, None) | ||
14 | time.sleep(5) | ||
15 | vehicle = random.randint(0, 28) | ||
16 | amount = random.randint(1, 4) | ||
17 | |||
18 | if vehicle == 5 or vehicle == 10: | ||
19 | direction = random.randint(1, 2) | ||
20 | direction = direction * 2 | ||
21 | spawnVehicle(vehicle, amount, [direction]) | ||
22 | elif vehicle == 28: | ||
23 | spawnVehicle(vehicle, 1, None) | ||
24 | elif 22 <= vehicle <= 27: | ||
25 | pass # Transforms shouldn't be spawned. | ||
22 | 26 | else: | else: |
23 | #print([connection.lights[int(vehicle)], connection.lights[1] + 1, int(direction)]) | ||
24 | spawnVehicle(int(vehicle), 1, [int(direction)]) | ||
27 | spawnVehicle(vehicle, amount, None) | ||
25 | 28 | ||
26 | 29 | sys.exit() | sys.exit() |