Overview of VANET Project 11 on Quadstone Paramics

  • Slides: 17
Download presentation
Overview of VANET Project (11’) on Quadstone Paramics Perspective Jae-Myeong Lee HMCL

Overview of VANET Project (11’) on Quadstone Paramics Perspective Jae-Myeong Lee HMCL

VANET Project • VANET is shorten word of Vehicular Ad-hoc Network. • Ad-hoc Network

VANET Project • VANET is shorten word of Vehicular Ad-hoc Network. • Ad-hoc Network means a special-purpose network. • The goal is simulation of VANET with simulator. • There is no simulator for VANET simulation. • Therefore we used two simulators, and each of them can simulate only one thing. • These simulators are: Quadstone Paramics and NS-2 • Quadstone Paramics is a traffic simulator, to simulate vehicles’ moving. • NS-2 is a network Simulator, to simulate VANET. • We made them interact each other with IPC. • IPC(Interprocess Communication): a technique for comm. between different processes, which is supported by OS(MS-Windows).

Understanding Paramics • Quadstone Paramics is developed by Quadstone, Inc. • Mid-scale traffic simulator

Understanding Paramics • Quadstone Paramics is developed by Quadstone, Inc. • Mid-scale traffic simulator • can simulate large area • also can simulate details, in vehicular level. • Non-freeware : commercial software. requires license key • Quadstone Paramics comprises: • Analyzer • Analyzes simulation result • Designer • Design road network • Modeller • Configure road network, and simulate in GUI vehicle • Processor • Simulator, non-GUI • Viewer • Simulation viewer, GUI • We use Modeller and Processor. ▲ Modeller, during simulation

Understanding Paramics(Cont. ) • Network means network of nodes, which is graph of roads.

Understanding Paramics(Cont. ) • Network means network of nodes, which is graph of roads. • Network is a bidirectional graph in default, also can be unidirectional graph. we’re using unidirectional. Zone 1 • A network may include: • Nodes, are vertices of road graph • Links, are edges of road graph … … • Links are straight line basically, also can be arc line. Zone 2 • Zones, are special areas where a car enters or leaves • Entrance of our network, or a parking lot • Loop Detectors or Detectors • VMS Beacons or Beacons loop road(link) • VMS: Visual Messaging System • A network is stored as files into a directory. VMS in Maryland, US

Our project scenario • Our project is pretty simple: • In default, all vehicles

Our project scenario • Our project is pretty simple: • In default, all vehicles travel around the network, in shortest path. (Paramics vehicles’ default behavior) • We collect the traffic information from: • Loop Detectors • RSE(Road Side Equipment)s into a server. • Server analyze the traffic information and calculates average speed in each links. (*In real world, it is an separated computer, but in our project, server code is in Paramics plug-in C project ) • Vehicles decide routing path depending on server information. (Not shortest path! Minimized-travel-time path!)

Our project scenario (Cont. ) • Explanation of some technical terms : • Loop

Our project scenario (Cont. ) • Explanation of some technical terms : • Loop Detectors • Equipment installed on the road, which detects and collects vehicles’ speed. It has two sensors, to sense vehicle’s entry and exit. • Mechanism of Loop Detectors in Paramics: Paramics Simulator Loop’s entrance sensor Loop’s exit sensor 100 m Node #1 07: 05: 01 Loop #1 Link #1 Node #2 07: 05: 06 A car plug-in isexit moving. Loop’s Calculate User entrance car’s sensor calls speed sensor qpg_DTL_xxx(Loop detects from detects distance the exiting. theand entry. API)time to get gap Instructions: statistics of vehicle speed, when needed. avgspeed=qpg_DTL_xxx(); User Plug-In 72

Our project scenario (Cont. ) • Explanation of some technical terms : • Loop

Our project scenario (Cont. ) • Explanation of some technical terms : • Loop Detectors • But, we don’t use Paramics-managing speed statistics. • To make easy to do what we want • We make a callback handler for “Enter to loop” event. • And when it is called: • Get the vehicle’s real speed by calling qpg_VHC_speed() • Send vehicle speed to server with Loop #.

Our project scenario (Cont. ) • Explanation of some technical terms : • RSE(Road

Our project scenario (Cont. ) • Explanation of some technical terms : • RSE(Road Side Equipment)s • Equipment installed on the road side, which communicates cars with wireless network(DSRC) • Paramics doesn’t support RSE, because it doesn’t have any network simulation features. • So, we must implement RSE in plug-in code, while expressing its position with Loop Detector. • RSE in concepts: Road RSE

Our project scenario (Cont. ) • Explanation of some technical terms : • Calculation

Our project scenario (Cont. ) • Explanation of some technical terms : • Calculation of speed with RSEs (in unidirectional): Node #1 Link #3 Node #3 Link #1 Node #2 RSE#01 Link D(distance) #2 Link #5 Node #5 RSE#02 Link #6 Link #4 Node #6 Matched We can Calculate Vehicle #5’s speed from D and (T 2 T 1) V# Time (sec. ) 1 2 5 T 1 7 4 9 5 V# Time (sec. ) 2 10 3 12 5 T 2 10 16

Paramics API Programming • Already we knew, Paramics supports User Plug-ins. • Plug-ins are

Paramics API Programming • Already we knew, Paramics supports User Plug-ins. • Plug-ins are standard Windows DLL executables, which exports callback functions • A plug-in interacts with Paramics via Paramics APIs. • Paramics APIs have four types: • Callback Type (qpx_xxx) (e. g. : qpx_NET_post. Open) • A plugin-defined function, where Paramics notifies a event to. We can just receive event notification, cannot influence simulation. • Override Type (qpo_xxx) (e. g. : qpo_RTM_decision) • A plugin-defined function, which overrides default Paramics action. • Setter Type (qps_xxx) (e. g. : qps_GUI_printf) • An API to set something’s value or status. • Getter Type (qpg_xxx) (e. g. : qpg_NET_nodes) • An API to get something’s value or status.

Paramics API Programming (Cont. ) • API Naming Convention: • qp%_XXX_Word() • % :

Paramics API Programming (Cont. ) • API Naming Convention: • qp%_XXX_Word() • % : Type of API (x = callback, o = override, s = setter, g = getter) • XXX : Category of API • • • BCN: Beacon (VMS Beacon) BUS: Bus vehicle BSR: Bus Route CFG: Configuration CLK: Clock DRW: Drawing (* Modeller Graphics) EDT: Editor LNK: Link NDE: Node NET: Network … • Word: Action of API • Example: qpg_LNK_name() : get name of a link

Paramics API Programming (Cont. ) • We can look up APIs we need, in

Paramics API Programming (Cont. ) • We can look up APIs we need, in Programmer Reference Manual Example: qpg_CFG_simulation. Time (Getter of, Configuration, Current Simulation Time) Syntax float qpg_CFG_simulation. Time(void); Description This function returns the current simulation time in seconds.

Paramics API Programming (Cont. ) • Simple plug-in code, prints “Hello World!”: • #include

Paramics API Programming (Cont. ) • Simple plug-in code, prints “Hello World!”: • #include <Programmer. h> // Paramics API void qpx_NET_post. Open() { qps_GUI_printf(“Hello World!n”); // prints message to GUI } • [Explanation] • Programmer. h : header file for Paramics APIs • qpx_NET_post. Open : callback function, which is called after network load completion • qps_GUI_printf : printf function, in Paramics API

Paramics API Programming (Cont. ) • Handling Network Objects • Almost network objects (such

Paramics API Programming (Cont. ) • Handling Network Objects • Almost network objects (such as Node, Link, Loop Detectors) has index #. (But, vehicle has no index, just has unique ID(car #)) • Their index is put with sequential number in based-1. • e. g. : 10 Nodes in network → each nodes’ indexes are 1, 2, 3, …, 10. • Network Objects are expressed in pointer type. • NODE *, LINK *, VEHICLE *, … • We cannot dereference their pointers, just can pass them to APIs. • Because, Their internal are undocumented and private. (Example - definition of NODE: typedef struct NODE_s NODE; // no definition of struct NODE_s ) • Practice : Get Length of Link #11 • LINK *lp = qpg_NET_link. By. Index( 11 ); // get object from index if(lp) qps_GUI_printf(“Link #11 length = %dn”, qpg_LNK_length(lp) );

Paramics API Programming (Cont. ) • Our plug-in’s Visual C++ project named “Traffic. Plugin”.

Paramics API Programming (Cont. ) • Our plug-in’s Visual C++ project named “Traffic. Plugin”. • Our C-language project includes: • • • Traffic. Plugin. c: Main plugin code Shared. Queue. c: Shared circular array FIFO(queue) code Server. c: Implementation of server(traffic analyzer) Server. Caller. c: Wrapper Functions of Server Interface Packet. IO. c: NS 2 packet reading functions matrix. c: Functions related to adjacency matrix processing. • Adjacency matrix : One of graph expressions in matrix array • filter. c: (unused – temporary code) • Server/*. c: (unused – temporary code)

On the next time… • Look in detail • NS-2 Explanation • Analyze project

On the next time… • Look in detail • NS-2 Explanation • Analyze project source code • Functions • Tricks we used • Algorithms • Simulation demo • Explain what we do in this year

Thank You! Any Questions?

Thank You! Any Questions?