Last week I went to a concert headlined by one of my favourite bands: Tortoise. I'd never managed to catch them in concert before, so I was quite excited about this and seemingly the support acts were also decent enough.
Well, the bands certainly didn't disappoint. We missed the first band unfortunately, but the second band, Efterklang - what an odd name - were very good, despite never having heard any of their songs before. Their music was kind of like Sigur Ros' - most of it was quite relaxing, and they also had the most polite front-man I've ever had the pleasure to experience at a concert.
Tortoise themselves were everything I could have hoped for. Two drum kits on stage, musicians were constantly switching between instruments even during songs, and the sound quality was absolutely fantastic. They played for an hour, and I heard most of the songs I would have asked them to play if I could have.
Since they're one of my favourite bands and I'd never seen them in concert before, they would have had to do a pretty awful job to put me off them, so they're not really the main reason I've written about the concert. Instead, the realisation struck me while I was there that...well...perhaps I'm getting old.
The average age in the crowd was a bit above that of my own, but this didn't bother me too much as I'm not exactly au fait with most new music. Plonk me into the crowd of most of the bands playing Oxegen this year, for example, and I might not be able to even name their songs, let along sing along to them. No, the age of the crowd wasn't what inspired this realisation.
I suspect the demeanour of the crowd was the main factor. People were actually listening to the music, rather than shouting out lyrics. They weren't fighting for their lives, or fighting for fun - there was barely even any inter-crowd jostling! There were, at an estimate, around five hundred people there, and I'd be surprised if there were more than seven security men - an unbelievably small ratio compared to any concert I've been to.
In comparison to the last concert I was at - Radiohead in Marlay Park last year - the difference was unbelievable. It seems most concerts I go to these days, people barely even know the bands involved and just go for teh lulz. The atmosphere, crowd, and sound quality at the last Radiohead concert were all so awful that I didn't even bother going this year. Being a big fan, it pains me to say that I doubt I missed out on much, but say it I must.
Unfortunately, it seems I simply can't stand the young folk any more.
As the rudimentary graphics enabled me to see what was happening in the underlying model I'd designed, myself and my supervisor decided it was time to tackle several other aspects of the model, namely: the introduction of trucks, the ability for the vehicles to change lanes, and the ability to extract data from the model (or for the model to just shoot the data out). Since I ran into some problems with the first two, and have been working on them since, I'll talk about them.
Introducing other vehicles to the model didn't seem like too large a task, as I'd been working on the vehicle "factory" - just a class to generate a vehicle when one is needed - for a while before I switched focus to the graphics. Generating cars is no problem as they don't contain much data, but a Monte-Carlo simulation is used for the generation of trucks, and I was provided with a very sophisticated, and unfortunately hard to decipher, model to do this.
A fair bit of hacking and shenanigans were needed to squeeze this model into the code I was working on, but I got it in the end. There were some teething problems (mostly to do with me forgetting to initialise variables, and other silly things), but pretty soon I had some trucks driving around on screen with the cars. I've added a bit of colour so that smaller (2/3 axle) trucks can be separated from larger (4/5/6 axle) trucks.
Red blocks are the larger trucks, green represents smaller trucks, and black represents cars. The size of the truck on screen is also fairly representative of the size of the truck in the model (if you want to compare, all cars are 4.8 meters long).
Implementing lane-changing was a bit more troublesome, unfortunately. For a start, the code that I wrote was quite messy because the model from which I'm working inserts "virtual" cars to help in the calculation of acceleration, lane-changing, and such; we are not taking this approach. Therefore, there are several cases in which a car can find itself when it is changing lanes: the other lane may be empty, there may be a car in front, there may be a car behind, or there may be cars both in front and behind. Each case is quite different in terms of parameters, and as yet I haven't figured out an elegant solution.
Now, part of the reason I haven't found out an elegant solution is because I had a visit from my my project lead, Colin, during the week and after tweaking the model a bit, we discovered that my lane-changing was not just inelegant, it didn't actually work at all! Trucks and cars were crashing into each other, driving over the vehicle in front with no hesitation: it was bedlam.
After much deliberation, we suspected that it must be the vehicles were going on their merry way to the end of the road, and were not being passed proper pointers for the preceding vehicles. I began to overhaul the functions involved, and tracked down a few places where the simulation would fall apart. I'm finishing up fixing them today, and so far things seem to be working a lot better than they were previously, so it's a start anyway.
Since the non-existent initialisations and silly bugs in the lane-changing have caused me such grief, I'm on the look out for anything troublesome now. I had a very tricky problem during the week when the program was leaking lots and lots of memory over the course of it running, and it turned out that the memory leaks were actually originating from an add-on I'd installed to help me spot leaks in the program...D'oh.
A little more about my current job, then.
As mentioned, I'm currently working on a programming project in Civil Engineering in UCD. My job is mainly involved with code restructuring, rather than designing most of the algorithms or code myself, as the bulk of the programming has already been done to some extent or another. In its current form, however, the code doesn't do adequately what is required of it and is limited in several areas - this is where the fully trained computer science student steps in and, supposedly, fixes everything.
It's a novel situation for me as I've not worked on many large projects, and in all the large projects I have worked on I've been involved from the ground up and seen the code evolve; I've never been given a lot of code and then briefed on what it currently does, and what it should do instead. In this way, I'm taking this job as valuable experience and I'm happy to be working on a project that has an obvious practical use, as it's a break from the relatively small assignments from college.
I'm finding the work fairly intensive so far, as I'm not used to sitting in front of a computer first thing in the morning and programming through most of the day, and the routine of it took a bit of getting used to. It's also a mixed blessing that much of the code is already written, because it means that a lot of design decisions have been made (for better or worse) and I am carried along by the flow of these decisions. Because of this, it's a bit of a reality-check when I actually have to make a design decision myself, and perhaps takes longer than it normally would due to my brain being concerned with other things.
Still, I've been here for a bit over a month now, and things have been going well in terms of deadlines, so everyone's happy.
I mentioned before that my work was involved in making a traffic simulator - this is an example of what should be happening, and is essentially the base from which I'm working. Traffic inputs will either be simulated, or real data will be provided, and the model will step this traffic along the road, mixing with lane-changes and varying speeds. Once it is verified that the simulation can perform this realistically, much of the task is done and the next part of the project - the bridge loading simulation - will be continued.
Currently, I'm working on implementing a graphical interface to show what is happening each time-step in the underlying simulation. This was a primary concern of my supervisors, as data outputted from the model is very difficult to understand and analyse when only in number-form, and it is almost impossible to verify that the simulation is working properly when dealing only with this data.
To deal with this objective, I have been building on a small graphical interface provided to me, and have been able to get the graphics to represent - accurately enough - the progression of the simulation. It's not exactly Crysis, but it works:
At the moment, the model caters for one or two directional traffic, as well as any number of lanes in each direction - though the model only requires a maximum of four lanes in each direction. I have provisions for generating vehicles other than the cars shown in the picture, but haven't implemented these in the model yet, as I have been focusing on implementing the ability for vehicles to change lanes - a bit trickier than you might think...