if (debug) reportTime ("Wrote schedule in ", start);
if (debug) reportTime ("Wrote schedule, capacities, and capabilities in ", start);
  private void run() {    ClientComms.initialize();    System.out.println ("Scheduler ready to schedule problems posted to " +                        ClientComms.getHost());    while (true) {      Exception error = getProblem();      if ((error != null) || (problem == null)) {        releaseLock();        try { Thread.sleep (waitInterval); } catch (Exception e) {}      } else {        try {          Date grandStart = new Date ();          System.out.println ("Starting to schedule " + problem +                              " at " + grandStart);          boolean canceled = ackProblem (1, null);          releaseLock();          if (canceled) {            System.out.println ("Canceled " + problem);            problem = null;            continue;          }          if (debug) System.out.println ("Did ack.");          timeOps = new TimeOps();          Date start = new Date();          error = readSpecs();          if (error != null)            throw error;          if (debug) System.out.println ("Read specs.");          error = readData();          if (error != null)            throw error;          if (debug)            reportTime ("Scheduler read data in ", start);          start = new Date();          specs.initializeData (data);          data.initialize (specs);          error = setupGA();          if (error != null)            throw error;          if (debug) reportTime ("Set up ga in ", start);          canceled = false;          start = new Date();          canceled = ga.execute (data, specs);          if (canceled)            System.out.println ("Canceled " + problem);          if (debug) {            reportTime ("GA finished, ran in ", start);            specs.reportTiming ();          }          start = new Date();          if (! canceled) {            writeSchedule();            writeCapacities();            writeCapabilities();          }          if (debug) reportTime ("Wrote schedule in ", start);          ackProblem (100, null);          reportTime ("Finished scheduling at " + new Date() +                      ", it took ", grandStart);        } catch (Exception e) {          ackProblem (100, e);          System.out.println ("Aborted scheduling, message is: " +                              e.getMessage());          e.printStackTrace();          try { Thread.sleep (waitInterval); } catch (Exception eee) {}        }        problem = null;      }    }  }