Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi mode clean #20

Open
wants to merge 44 commits into
base: communication-edit
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
10e5c4a
change innpt and .ini file
Jul 18, 2024
926b41a
simple read of bus file
Jul 18, 2024
b8bf97b
add merge path in TrafficSP file (step3)
Jul 22, 2024
ea13648
change od_pairs to od_pairs_set
Jul 24, 2024
9695014
success in compling
SLZ0106 Jul 26, 2024
071a8b7
Merge remote-tracking branch 'origin/communication-edit' into multi-m…
SLZ0106 Jul 30, 2024
5f673ab
Add multi-mode transfer logic in kernel_trafficSimulation func, add L…
SLZ0106 Jul 30, 2024
682eab0
fix some error
SLZ0106 Aug 1, 2024
5b46eea
fix TODO
SLZ0106 Aug 1, 2024
fc228d4
complete the multimode logic in transfer people to new auto & update …
SLZ0106 Aug 2, 2024
13ef4c5
add bus line and how to read it and bus_sechedule
SLZ0106 Aug 3, 2024
f949d7c
add rewrite bus_sechedule
SLZ0106 Aug 3, 2024
b94cb23
add rewrite bus_sechedule_2
SLZ0106 Aug 5, 2024
5c84e85
Modify person class and related logic
YiboZh Aug 5, 2024
4a966e7
small fix
YiboZh Aug 5, 2024
87e6abf
initial person waiting for bus and transfer points in b18InitCUDA_n
SLZ0106 Aug 5, 2024
a4f7e8b
fix input error
SLZ0106 Aug 6, 2024
ec8f476
fix logic in adding new vehicle
YiboZh Aug 6, 2024
9cbbbd3
Merge remote-tracking branch 'refs/remotes/origin/multi-mode-clean' i…
YiboZh Aug 6, 2024
12af848
dumb solution for routting wrapper
SLZ0106 Aug 6, 2024
bc7bdcb
upload bus_schedule
SLZ0106 Aug 6, 2024
8a5b46a
add travel mode from input
SLZ0106 Aug 6, 2024
c9a2ba7
input travel_modes&corresponding od_pairs
SLZ0106 Aug 6, 2024
cb869d2
initialize trafficPersonVec
SLZ0106 Aug 6, 2024
6486cc3
Find possible buslines based on start/end intersection and bus schedule
YiboZh Aug 7, 2024
bd49d65
initialization
SLZ0106 Aug 7, 2024
ddb10c5
Modify findBuses and pass busRoutes into cuda init
YiboZh Aug 7, 2024
08d7a1c
Small fix of function call
YiboZh Aug 7, 2024
e561dd6
Small fix and added some TODOs
YiboZh Aug 7, 2024
66f69c5
add bus departure time
SLZ0106 Aug 7, 2024
22c9ecd
fix logic in adding passengers to bus
SLZ0106 Aug 8, 2024
aeb56f8
fix logic in adding passengers to bus_2
SLZ0106 Aug 8, 2024
cc71e84
add routing inputs
SLZ0106 Aug 9, 2024
4bc2106
add output in simulator.cpp
SLZ0106 Aug 9, 2024
6b71e7f
fix input bug
SLZ0106 Aug 10, 2024
ed4c23c
Move logic of randomVehicle to cu file and apply
YiboZh Aug 10, 2024
ed020d9
small fix
YiboZh Aug 10, 2024
88f3f3f
fix input_2
SLZ0106 Aug 10, 2024
9b3d76a
Fix intersection to bus logic
YiboZh Aug 11, 2024
7d1eff9
add normal dep_time to init_CUDA and kernel
SLZ0106 Aug 13, 2024
20581e3
change init person waiting
SLZ0106 Aug 14, 2024
9a5b0ac
add bus route in convertPath
SLZ0106 Aug 23, 2024
4e54f60
fix SP covert path
SLZ0106 Aug 24, 2024
1b25ab5
Replace LNode* passenger at intersection to DNode*
YiboZh Aug 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions LivingCity/0_people5to12.csv

This file was deleted.

9 changes: 8 additions & 1 deletion LivingCity/bTraffic/bPMTrafficPerson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,12 @@ void BPMTrafficPerson::randomPerson(int p, BTrafficPeople &people,
people.T[p] = 2.0f + 3.0f * (((float)qrand()) / RAND_MAX); //time heading 2.0-3s
}


if (carType == 2) { //bike car
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Luze, what's this for? Did you add this when we need a bike? Should we delete this for now? AFAIK our simulation is not using this cpp file

people.a[p] = 0.1f + ((float)qrand()) / RAND_MAX;//acceleration .1-1.1m/s2
people.b[p] = 0.1f + ((float)qrand()) / RAND_MAX;//break .1-1.1m/s2
people.T[p] = 2.0f + 3.0f * (((float)qrand()) / RAND_MAX); //time heading 2.0-3s
}
//people.a[p] *= (deltaTime*deltaTime/cellSize);//to cells/dTdT
//people.b[p] *= (deltaTime*deltaTime/cellSize);//to cells/dTdT
//people.T[p] *= deltaTime;// to dT
Expand Down Expand Up @@ -500,11 +506,12 @@ void BPMTrafficPerson::generateB2018TrafficPeople(
int odNumPeople = RoadGraphB2018::demandB2018[d].num_people;
uint src_vertex = RoadGraphB2018::demandB2018[d].src_vertex;
uint tgt_vertex = RoadGraphB2018::demandB2018[d].tgt_vertex;
int mode = RoadGraphB2018::demandB2018[d].mode; // Get the mode

for (int p = 0; p < odNumPeople; p++) {
float goToWork = midTime + LC::misctools::genRand(start_time - midTime,
end_time - start_time); //6.30-9.30 /// GOOOD ONE
int car_type = 0; // all normal cars??
int car_type = mode; // Use the mode as car type or handle accordingly

randomPerson(numPeople, people,
src_vertex, tgt_vertex, goToWork, car_type);
Expand Down
Loading