code: private boolean continueGeneratingThresholds(double limitWorkload, double workload, Solution sol,
           QualityInformation requirements, SuitableOptions cloudCharacteristics, boolean existModulesToScaleOut) {
        // Stop if the maximum number of scalings for every module has been
        // reached.
        // Stop also if the highest allowed cost or, if cost is not specified, ten
        // times the expected workload
  
        log.debug("checking if continue generating thresholds for: ");
  
        if (!existModulesToScaleOut) {
           log.debug("Nothing, there are not any module to scale out");
           return false;
        }
        if (requirements.existCostRequirement()) {
  
           log.debug("  current cost: {}  cost limit: {}", computeCost(sol, cloudCharacteristics),
                 requirements.getCostHour());
  
           return computeCost(sol, cloudCharacteristics) <= requirements.getCostHour();
        }
  
        log.debug("  limitWorkload: {} current workload {}", limitWorkload,
              (MAX_TIMES_WORKLOAD_FOR_THRESHOLDS * workload));
  
        return limitWorkload <= (MAX_TIMES_WORKLOAD_FOR_THRESHOLDS * workload);
  
     }
docs: /*
  Condition to stop generating thresholds