Closed elpht closed 5 months ago
It would be useful. You can just make a pull request with your fix, I'll review it (please check our contributing page before)
Or you can try to use a custom population with your deserialized genes like this one: https://github.com/giacomelli/GeneticSharp/issues/9#issuecomment-246120699
Closed by PR #120
I'm working on a GA that takes quite long to calculate the fitness of each chromosome due to the nature of the problem. Therefore, after generation ran I serialize the population (custom serializable population that I implemented) so that it's possible to resume later the algorithm even if the computer where it runs has to be switched off.
So far I managed to overcome all problems I found except one: when I instantiate a GA using a deserialized population and try to resume, the field
m_stopwatch
isn't initialized, thus causing an exception.Well, I could also have my own GA implementation, copying the one provided by the library and fixing the initialization of the Stopwatch, but I thought it would be pretty straightforward to modify the existing implementation to allow resuming the GA instance without being previously started. Would you see it senseful?