Author Archive: chaotictoejam

VANETSim: Updating INET and VEINS progress

I am currently updating INET and VEINS to their current versions in my VANETSim project. INET updated to Commit b32e1dcf3239a44c23a9920fdc2d877f96a01c83 VEINS updated to Commit fb5c0dbef5c6909722c374a247e98b4eaf15a633 As this will be a major change to the master when completed I created a new branch named oldinet. Please be prepared for any development you make off of the master currently to look at changes in oldinet if there is a bug etc. Again this is a working project. It is directly related to my dissertation and research, I do not guarantee this to be working all the time as it is a resource…
Read more

Find All Missing Dates in a SQL Table

I have a table of Exchange Rate Histories that I maintain. There is a job that pulls Exchange Rate Information from Google and populates in this table everyday. Sometimes data is not available/the job is missed for various reasons, in this case I need to find all missing dates for each currency in the SQL table. In the example below I am finding all missing dates in the table but you can update this to look in smaller segments.

  SQL script to find all missing dates for each currency in the SQL table.

Setting Speed Limit for Roads in SUMO and OMNET++

To make road simulations more accurate you may want to set speed limits for your simulations. In order to set the speed limit for roads you can edit the values in you edge file, in the example below the speed is set to 14m/s which is 50km/h. Example in Edge File

In the routing example below the max speed is set to 70 m/s which is 252 km/hr. Example in Route File

 

Implement ATOI (C++)

An interview question I have been asked a good number of times is to Implement ATOI (convert a string to an integer). You can start off really simple and loop through a string, but you need to be able to catch negatives and then handle the case that the string passed is invalid NULL or contains non-numeric characters). The following implementation handles these cases. The point though in the end is to understand the question and build off of it. My philosophy in an interview is to start off simple and build on top. Trying to think of everything at…
Read more

Creating a Simple SUMO Network and Simulation

Creating a Simple SUMO Network A SUMO network file describes the traffic-related part of a map, the roads and intersections the simulated vehicles run along or across. At a coarse scale, a SUMO network is a directed graph. Nodes, usually named “junctions” in SUMO-context, represent intersections, and “edges” roads or streets. Note that edges are unidirectional. Specifically, the SUMO network contains the following information: every street (edge) as a collection of lanes, including the position, shape and speed limit of every lane, traffic light logic referenced by junctions, junctions, including their right of way regulation, connections between lanes at junctions…
Read more

How To Work With Active Directory (C#)

Active Directory is a little tricky when starting out. The recent project I worked on required me to add users (based on their NTAccounts) to a group. These users were not users of the machine, and therefore could not be found with UserPrincipal.FindByIdentity() for the machine you were adding the user on. What I knew about these users as that they had a Windows NTAccount and the domain they belonged to. First I wanted to receive a datatables of NTAccount users from the active directory. I set up a Directory security class, which contains the directory’s group name and server I wanted…
Read more