ackProblem (100, (error == null) ? null : error.getMessage());
ackProblem (100, error);
  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 {        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 (debug && (error == null)) System.out.println ("Read specs.");        if (error == null)          error = readData();        if (debug && (error == null))          reportTime ("Scheduler read data in ", start);        start = new Date();        if (error == null) {          specs.initializeData (data);          data.initialize (specs);          error = setupGA();        }        if (debug && (error == null)) reportTime ("Set up ga in ", start);        canceled = false;        if (error == null)          try {            start = new Date();            canceled = ga.execute (data, specs);            if (canceled)              System.out.println ("Canceled " + problem);          } catch (Exception e) {            System.err.println (e.getMessage());            e.printStackTrace();            error = e;          }        if (debug && (error == null))          reportTime ("GA finished, ran in ", start);        if (debug)          specs.reportTiming ();        start = new Date();        if ((error == null) && (! canceled)) {          writeSchedule();	  writeCapacities();        }        if (debug && (error == null)) reportTime ("Wrote schedule in ", start);        ackProblem (100, (error == null) ? null : error.getMessage());        if (error == null)          reportTime ("Finished scheduling at " + new Date() +                      ", it took ", grandStart);        else          System.out.println ("Aborted scheduling, message is: " +                              error.getMessage());        problem = null;      }    }  }