def generatedEnergy(self, reservatoryVolume: float, turbinedFlow: float): flowThatGenerateEnergy = limit(turbinedFlow, self.__minTurbineFlow, self.__maxTurbineFlow) return (self.rho() * (self.uprightHeight(reservatoryVolume) - self.downstreamHeight(turbinedFlow)) * flowThatGenerateEnergy)
def solveInfeasibility(self, k: int, state: np.array, FMap: dict): if state < self.minReservatoryVolume( ) or state > self.maxReservatoryVolume(): return (limit(state, self.minReservatoryVolume(), self.maxReservatoryVolume()), self.inf) else: sampledState = nearestSample(state, self.minReservatoryVolume(), self.maxReservatoryVolume(), self.__stateSampling) return (sampledState, FMap[(k, sampledState)])
def generatedEnergy(self, reservatoryVolume: float, turbinedFlow: float): flowThatGenerateEnergy = limit(turbinedFlow, self.__minTurbineFlow, self.__maxTurbineFlow) _generatedEnergy = min( self.maximumProductionCapacity(), self.rho() * (self.uprightHeight(reservatoryVolume) - self.downstreamHeight(turbinedFlow)) * flowThatGenerateEnergy) return _generatedEnergy
def solveInfeasibility(self, k: int, state: np.array): """[summary] Args: k (int): [description] state (np.array): [description] FMap (dict): [description] Returns: [type]: (next state, isInfeasible) """ isInfeasible = state < self.__minReservatoryVolume or state > self.__maxReservatoryVolume if isInfeasible: feasibleState = limit(state, self.__minReservatoryVolume, self.__maxReservatoryVolume) else: feasibleState = nearestSample(state, self.__minReservatoryVolume, self.__maxReservatoryVolume, self.__stateSampling) return (feasibleState, isInfeasible)
def uprightHeight(self, reservatoryVolume: float) -> float: limitedVolume = limit(reservatoryVolume, self.__minReservatoryVolume, self.__maxReservatoryVolume) return 355.53 + (0.0036268 * limitedVolume) - (0.10090e-7) * limitedVolume**2
def uprightHeight(self, reservatoryVolume: float) -> float: limitedVolume = limit(reservatoryVolume, self.__minReservatoryVolume, self.__maxReservatoryVolume) return 303.04 + (0.0015519 * limitedVolume) - (0.17377e-7) * limitedVolume**2
def uprightHeight(self, reservatoryVolume: float) -> float: limitedVolume = limit(reservatoryVolume, self.__minReservatoryVolume, self.__maxReservatoryVolume) return self.__uprightPolinomy(limitedVolume)