import java.applet.Applet; import java.awt.*; import java.awt.event.*; import java.applet.*; import java.awt.geom.*; import java.math.*; /**This class operates our annealing routine which flows any given configuration towards a minimum. Basically, we start with a configuration and test several nearby configurations. If the configuration can move to a lower energy configuration that we've tested, it makes the move. So many little steps are taken that the result looks like a flow. This class has nothing to do with the proof. It is just for fun.**/ public class Anneal implements Runnable { int halt; Manager M; public Anneal() {} public Anneal(Manager MM) { this.M=MM; halt=0; } /**This is the main routine**/ public void run() { halt=1; double E=M.C.ENERGY.getParameter(); double test0=Energy.minEnergy(E); while(halt==1) { M.P.Z[0]=replace(E,M.P.Z[0],M.C.CC1.active); double test=Energy.energy(E,M.P.Z[0]); if(test