Commit dadc1313 authored by Tobias Meuser's avatar Tobias Meuser
Browse files

Working version for WoWMoM

parent edf3c56d
......@@ -21,7 +21,8 @@
package de.tudarmstadt.maki.simonstrator.api.component.vehicular.information;
public enum AvailableInformationAttributes {
POSITION("position"), DATE("date"), VALUE("value"), OWNER("owner"), EDGE("edge"), TTL("ttl");
POSITION("position"), DATE("date"), VALUE("value"), OWNER("owner"), EDGE("edge"), TTL("ttl"), EXPECTED_DURATION(
"duration"), STANDARD_DEVIATION_DURATION("sd_duration");
private final String attributeID;
......
......@@ -37,7 +37,7 @@ import de.tudarmstadt.maki.simonstrator.api.component.vehicular.roadnetwork.Road
*
*/
public class SimplePathDetectionAlgorithm implements PathDetectionAlgorithm {
private static final double ABORT_THRESHOLD = 0.001d;
private static final double ABORT_THRESHOLD = 0.0001d;
@Override
public List<ProbabilisticRoadNetworkRoute> findAllRoutes(RoadNetwork pNetwork, RoadNetworkEdge pCurrentPosition,
......@@ -59,7 +59,8 @@ public class SimplePathDetectionAlgorithm implements PathDetectionAlgorithm {
for (RoadNetworkEdge accessibleEdge : accessibleEdges) {
if (accessibleEdge.isUsable()) {
double travelTime = accessibleEdge.getLength() / accessibleEdge.getMaxSpeed();
double travelTime = VehiclePathTrackerFactory.getVehiclePathTracker()
.getTravelTime(roadNetworkPath.getEdge(), accessibleEdge);
double probability = VehiclePathTrackerFactory.getVehiclePathTracker()
.getTransitionProbability(roadNetworkPath.getEdge(), accessibleEdge);
......
......@@ -37,4 +37,11 @@ public interface VehiclePathTracker {
*/
double getTransitionProbability(RoadNetworkEdge pStart, RoadNetworkEdge pOut);
/**
* @param pStart
* @param pOut
* @return
*/
double getTravelTime(RoadNetworkEdge pStart, RoadNetworkEdge pOut);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment