/**
  * prepares the setup process for the second cycle
  *
  * @param product
  * @param processSetUp
  */
 private void prepareSetUpProcessForSecondCycle(Product product, ProductionProcess processSetUp) {
   // for second cycle
   double cycleTime = product.getQ() / product.getD();
   processSetUp.setStartCycle2(
       new SimpleDoubleProperty(processSetUp.getStartCycle1().doubleValue() + cycleTime));
   processSetUp.setEndCycle2(
       new SimpleDoubleProperty(processSetUp.getEndCycle1().doubleValue() + cycleTime));
   processes.add(processSetUp);
 }
 /**
  * sets the setup process for the specific product in the process plan
  *
  * @param product
  */
 private void setProcessSetUp(Product product) {
   ProductionProcess processSetUp = new ProductionProcess();
   processSetUp.setK(product.getKProperty());
   processSetUp.setProcess(new SimpleStringProperty("Rüsten"));
   if (processes.size() == 0) {
     processSetUp.setStartCycle1(new SimpleDoubleProperty(0.0));
   } else {
     ProductionProcess predecessor = processes.get(processes.size() - 1);
     double startTime = predecessor.getEndCycle1().doubleValue();
     processSetUp.setStartCycle1(new SimpleDoubleProperty(startTime));
   }
   double endTime = processSetUp.getStartCycle1().doubleValue() + product.getTau();
   processSetUp.setEndCycle1(new SimpleDoubleProperty(endTime));
   prepareSetUpProcessForSecondCycle(product, processSetUp);
 }
  /**
   * sets the production process for the specific product in the process plan
   *
   * @param product
   */
  private void setProductionProcess(Product product) {
    ProductionProcess processProduction = new ProductionProcess();
    processProduction.setK(null);
    processProduction.setProcess(new SimpleStringProperty("Produktion"));
    ProductionProcess processSetUp = processes.get(processes.size() - 1);
    processProduction.setStartCycle1(processSetUp.getEndCycle1());
    double endProduction = processProduction.getStartCycle1().doubleValue() + product.getT();
    processProduction.setEndCycle1(new SimpleDoubleProperty(endProduction));

    prepareProductionProcessForSecondCycle(product, processProduction);
  }