In the source code for both the spherecharges and TSP problem, a suspend/resume
functionality is built in. This allows you to temporarily interrupt an optimisation
run, then maybe adjust your optimisation parameters in genetic.input, and
finally resume the optimisation with the new settings.
Also, it is useful to save the last population state during a nightly run that
you want to inspect in the next morning.
The state of the population is saved into a file lastgen.gen, which contains the last generation, with each chromosome's bitstring printed on one line. That same line also shows the elite status of the chromosome, a text representation and its objective value.
Normally, you can interrupt a program by pressing [Ctrl]-[c]. To suspend your tsp or spherecharges run, press [Ctrl]-[z]. The population will first complete the current select/mutate/crossover for all members and then write the file and stop the program.
Resume from the previous run by calling the program as follows:
[labsc@oeleboeter:problems/tsp]$ tsp genetic.input resume
or
[labsc@oeleboeter:problems/spherecharges]$ spherecharges genetic.input resume
The first output on your screen should tell that the file lastgen.gen was just read in. Verify that this works! (Set the print on screen option to 1 in genetic.input.)