private static NCube createDomain(
      List<SensorProperties> sensorProperties, ScenarioProperties scenario) {

    NCube domain = new NCube(sensorProperties.size());
    for (int i = 0; i < sensorProperties.size(); i++) {
      domain.setBoundaries(
          i,
          0,
          scenario.getScheduleIntervalLength() - sensorProperties.get(i).getSenseIntervalLength());
    }

    return domain;
  }
  private static List<MultiVariatePieceWiseLinearFunction> createStartFunctions(NCube domain) {
    List<MultiVariatePieceWiseLinearFunction> result =
        new Vector<MultiVariatePieceWiseLinearFunction>();

    for (int i = 0; i < domain.getDimensionCount(); i++) {
      result.add(MultiVariatePieceWiseLinearFunctionUtilities.createUnivariateFunction(domain, i));
    }

    return result;
  }
  private static List<MultiVariatePieceWiseLinearFunction> createEndFunctions(
      NCube domain, List<SensorProperties> sensorProperties) {
    List<MultiVariatePieceWiseLinearFunction> startFunctions = createStartFunctions(domain);
    List<MultiVariatePieceWiseLinearFunction> result =
        new ArrayList<MultiVariatePieceWiseLinearFunction>();

    for (int i = 0; i < domain.getDimensionCount(); i++) {
      double senseIntervalLength = sensorProperties.get(i).getSenseIntervalLength();
      result.add(startFunctions.get(i).add(senseIntervalLength));
    }

    return result;
  }