Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jiabin DAI
KomplexpraktikumNSM_Jiabin DAI_Zihan WANG_2022s
Commits
5050d83a
Commit
5050d83a
authored
Jul 12, 2022
by
DaiJiabin
Browse files
done
parent
086dd605
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
out/clang-release/src/InteractingVehicle.o
View file @
5050d83a
No preview for this file type
out/clang-release/src/libveins_project.so
View file @
5050d83a
No preview for this file type
simulations/results/General-#0.sca
View file @
5050d83a
This diff is collapsed.
Click to expand it.
simulations/results/General-#0.vci
View file @
5050d83a
This diff is collapsed.
Click to expand it.
simulations/results/General-#0.vec
View file @
5050d83a
This diff is collapsed.
Click to expand it.
simulations/task01.rou.xml
View file @
5050d83a
...
...
@@ -4,6 +4,6 @@
-->
<routes
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"http://sumo.dlr.de/xsd/routes_file.xsd"
>
<flow
id=
"f_0"
begin=
"0.00"
departSpeed=
"
max
"
color=
"255,32,0"
from=
"-gneE1"
to=
"-gneE0"
end=
"120.00"
probability=
"0.
3
0"
/>
<flow
id=
"f_1"
begin=
"0.00"
departSpeed=
"
max
"
color=
"0,60,255"
from=
"-gneE2"
to=
"-gneE0"
end=
"120.00"
probability=
"0.
3
0"
/>
<flow
id=
"f_0"
begin=
"0.00"
departSpeed=
"
0.00
"
color=
"255,32,0"
from=
"-gneE1"
to=
"-gneE0"
end=
"120.00"
probability=
"0.
5
0"
/>
<flow
id=
"f_1"
begin=
"0.00"
departSpeed=
"
0.00
"
color=
"0,60,255"
from=
"-gneE2"
to=
"-gneE0"
end=
"120.00"
probability=
"0.
5
0"
/>
</routes>
src/InteractingVehicle.cc
View file @
5050d83a
...
...
@@ -198,17 +198,6 @@ void InteractingVehicle::handleMessage(cMessage *msg)
else
{
updateDistance
(
vehicleRecordLowPriority
,
otherVehicleId
,
hisDistance
,
hisTime
);
}
// Algorithms for part II
// =========================
// visualization_TimeDiff(myTime, hisTime, threshold);
// visualization_GivenTime(myTime, givenTime);
// =========================
// Algorithms for part III
// =========================
// If I need to perform the speed control, i.e., I'm the closest one to the intersection
double
closestDistanceOtherSide
=
0
;
double
closestTime
=
0
;
int
mapSize
=
0
;
...
...
@@ -231,13 +220,17 @@ void InteractingVehicle::handleMessage(cMessage *msg)
mapSize
=
vehicleRecordHighPriority
.
size
();
}
if
(
tanValue
==
0
){
if
(
mapSize
!=
1
){
if
(
mapSize
>
1
){
// getParentModule()->bubble(std::to_string(mapSize).c_str());
visualization_Brake
(
mobility
,
iMsg
,
myTime
,
closestTime
,
threshold
,
stopped
);
}
else
{
// getParentModule()->bubble(std::to_string(mapSize).c_str());
traciVehicle
->
setSpeed
(
storedSpeed
);
if
(
stopped
)
{
// getParentModule()->bubble(":)");
traciVehicle
->
setSpeed
(
storedSpeed
);
stopped
=
false
;
}
}
}
return
;
...
...
src/libveins_project.so
View file @
5050d83a
No preview for this file type
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment