I haven't been blogging much about my work during the YSSP, but something has happened that seems worthy of mention. I had spent quite a bit of time this summer building a software edifice around a package called CGAL. CGAL was providing a solution for me to a problem called "Delaunay triangulation" which is related to one aspect of my project. Details are not important; the point is this. I came to the realization, about a week ago, that the CGAL library was not sufficient to the task. It was consuming way too much memory and taking way too much time, and it was just not going to get the job done. This was rather a crisis, because it was an essential building block in my project, and I was not aware of any other package that could do what it did at all.
What to do, what to do? I had no time to deal with it for a couple of days, because I was busy with Africa Day planning and preparation (see my previous post) and then the climate change negotiation simulation (see a couple of posts previous), so I just let the problem stew in the back of my mind until I finally had time to work again, this past Thursday. By then I had come up with an idea for a solution. I could get rid of CGAL completely in my design, do things in a completely different way (not involving Delaunay triangulation in the first place), and thereby sidestep the problem. I implemented the new way of doing things in one twelve-hour workday, and the new way turns out to be faster and better than the old way in every respect; it actually solves several other problems that had been bothering me as well.
The lesson I draw from this, and the reason I'm posting about this: it's worth the time to think and plan ahead. I tend to jump headfirst into implementing my ideas, but this episode has shown that it would sometimes be better if I took a few deep breaths first and asked: is the design I've come up with really the best design? Am I solving the right problem? Is there a different approach that might be better? Had I asked those questions, I might have saved myself about a week of work and a lot of heartache, and I would have an extra 100,000 or so runs of my model completed at this point.
For your amusement, here is a pretty picture generated by my model:
I could explain what this picture represents, but then I'd have to kill you. Eventually (once this research has been published) I'll post about it on ecoevoevoeco, but that's probably a long time from now...