We are using the same "compare" function in two separate calls to QSort - one is to sort spawners by arrival date and one to sort fish by length every day. Needless to say they are not getting sorted by length. This is a major bug.
I fixed this in a version of the code on my Linux machine: DunhamSteelhead-insalmo-65e5126. The key statements in TroutModelSwarm are to replace the QSort statements with these:
We are using the same "compare" function in two separate calls to QSort - one is to sort spawners by arrival date and one to sort fish by length every day. Needless to say they are not getting sorted by length. This is a major bug.
I fixed this in a version of the code on my Linux machine: DunhamSteelhead-insalmo-65e5126. The key statements in TroutModelSwarm are to replace the QSort statements with these:
[QSort sortObjectsIn: spawners using: M(compareArrivalTime:)];
[QSort sortObjectsIn: liveFish using: M(compare:)];