It's done now, and Plague is substantially faster than before - to put some numbers behind that, I used to get about 3fps with 400 sims, now I get 14fps.
The grid code has also been substantially tidied up which is nice because it used to be a bit convoluted. I'll be tidying up the remaining parts of the code tomorrow night. I'll upload v3.28 when thats done.
After that I'll retackle the problem again seeing how much I can pre-calculate and store as a data file so that calaculations at runtime are minimised. I'll also add an option (in the options menu) to calculate map LOS during map startup - at the moment stuff is only calculated on an as needed basis, which is nice, but pre-calculating leads to the fastest Plague experience when you are playing.