Getting the edge connected two nodes(junctions) in veins? - omnet++

I have a list of junction. i want to get edges between these junctions in order to change vehicles route. my question is how to get the edge between two nodes(junctions) in veins?

Related

Navigation algorithm

I am working on an autonomous boat able to sail across a given route, mapped as an array of waypoints.
The robot runs several nodes (threads) handling navigation and performing sensor fusion, one of those being the Path Planner.
The on-board computer, a Raspberry Pi, has stored several terrain profile maps (GIS altitude datasets) shaped as squares and listed in a map as upper corner lat/lon and lower lat/lon. The idea is to avoid groundings and coastlines while passing through the waypoints in the given route.
Basically every X seconds the path planner checks the boat GPS position and finds in which region it is located to load the corresponding map and define the best route (adding intermediate waypoints) using an artificial potential field navigation system; the computation is dynamically performed once for every region.
Despite being quite lightweight (the path planner is run once a while, as it takes 75% processor power to perform calculations), this approach comes with two main drawbacks:
The map regions may overlap and the boat will have troubles deciding which map to load;
There may be the case where the last intermediate waypoint falls on the edge of a region, so the robot will be "blind" while a path planner update is triggered and a new intermediate route calculated.
Do you have any idea on how to define a better algorithm? Thank you

Frequency of connections between nodes represented by the edge thickness

I have a directed graph where some two nodes are connected by multiple edges.
However I would like the two connected nodes to be visualised with only one edge with a property specifying the number of edges between them and possibly a relative edge thickness.
What query do I have to use to achieve this?
If you are referring to the neo4j browser web ui, there is no command to customize the visualization in that way.
In particular, the Cypher query language is only for performing DB operations, and does not have a way to directly affect visualizations.

using Roiroad function in venis

I have a mobility model created by SUMO with area around 2 KM * 2 Km for real map.
I want to compute the results for only part of this model. I read that I can use roiroad or roirect.
Roirect take (x1,y1-x2,y2) as Traci coordination, however, I want to use roiroad to take exactly the cars in specific road.
My question is: if the roiroad function take a string of road name , from where in sumo that I can get this value.
should I construct the map again with Netconvert and using --output-street-names
Edges in SUMO always have an ID. It is stored in the id="..." attribute of the <edge> tag. If you convert a network from some other data format (say, OpenStreetMap) to SUMO's XML representation, you have the option to try and use an ID that closely resembles the road name the edge represents (this is the option you mentioned). The default is to allocate a numeric ID.
Other than by opening the road network XML file in a text editor, you can also find the edge ID by opening the network in the SUMO GUI and right clicking on the edge (or by enabling the rendering of edge IDs in the GUI).
Note that, depending on the application you simulate, you will need to make sure that you have no "gaps" in the Regions Of Interest (ROIs) you specify. When a vehicle is no longer in the ROI its corresponding node is removed from the network simulation. Even if the same vehicle later enters another (or the same) ROI, a brand new node will be created. This is particularly important when specifying edges as ROI (via the roiRoads parameter). Keep in mind that SUMO uses edges not just to represent streets, but also to represent lanes crossing intersections. If you do not specify these internal edges, your ROIs will have small gaps at every intersection.
Note also that up until OMNeT++ 5.0, syntax highlighting of the .ini file in the IDE will (mistakenly) display a string containing a # character as if it were a comment. This is just a problem with the syntax highlighting. The simulation will behave as expected. For example, setting the roiRoads parameter to "-5445204#1 :252726232_7 -5445204#2" in the Veins 4.4 example as follows...
...will result in a Veins simulation where only cars on one of the following three edges are simulated:
on the edge leading to the below intersection; or
on the edge crossing the below intersection; or
on the edge leaving the below intersection.

working with Region of interest in Omnet++ ( veins)

I am working with simple scenario application using veins. I want to compute
different measurements. I used realistic map using SUMO, and the trips of vehicles are generated randomly using randomTrips.py.
I think that the results are not accurate since the measurement (ex: packet delivery probability) should be computed for the vehicles that are in the same area or range, not exist in different area.
Based on my reading:
1- I have to use O/D Matrices, however, I don't want to back again to sumo
2- configuring a "Region of Interest (ROI)" for the TraCIScenarioManager.
My question:
How I can specify rectangular area as ROIs and only vehicles in these areas will be simulated in OMNeT++, from which file I have to change?
thank you in advanced

For an iPhone map application, how do I create the graphs?

I want to make an application that is basically Google Maps for indoor places such as malls or airports. I know I have to create a graph from the floorplan and use a shortest-path-finding-algorithm to plot the shortest route from one location to another.
How do I represent a mall or airport as a graph? Do I make each store or gate or something as a node and the walkways as edges? Or do I have to be much more specific, such as making a node every 5-10 feet? How specific do I need to be and what should I make the nodes and edges?
I suggest perceiving the floor plan as a grid, where each cell represents x square meters. Place a node on each cell that lies within an accessibly area. The edges are between each neigbouring cell and all have a cost of x.
The advantage of this approach is that you can efficently lay this out in memory (you can put this in a matrix, rather than having to use adiecency lists or such). For pathfinding you can use a simple A* implementation that uses the Euclidian distance between two points as a heuristic.
There are a few different problems you want to solve here. First, there is the structural relation between two places, and second there is the geometrical one. Shortest path relies partly on the geometry, and partly on the structure. Eg. a pathway need not be the straight line. For the structure, you could represent the mall stores and gates as nodes, and the pathway as edges. Put the actual distance between nodes as the "weight" of the edge and use Dijstra's algorihtm to find the shortest path.
If you just need to present the results textually like "Go to A, then go to B", or on a metro (underground) style topological map, this is fine. But if you want to show the results on a geometrically accurate representation of the floor, you need to make the connection between the structure and the geometry stronger. I would suggest that you augment the structure described above with addition nodes everywhere the path takes a turn, and marking to nodes with x,y-coordinates as well as a bool for whether it is an intermediate node or not. Make only the true nodes selectable as source and destination, but use the whole graph for Dijkstra. When drawing the results on screen, iterate over the nodes in the shortest path and use their coordinates to draw a piecewise straight line from source to destination.

Resources