Class PowerPlant

  • All Implemented Interfaces:
    de.dlr.gitlab.fame.communication.transfer.Portable, Comparable<PowerPlant>

    public class PowerPlant
    extends PowerPlantPrototype
    implements Comparable<PowerPlant>, de.dlr.gitlab.fame.communication.transfer.Portable
    A conventional power plant unit
    Author:
    Christoph Schimeczek
    • Constructor Detail

      • PowerPlant

        public PowerPlant()
        required for Portables
      • PowerPlant

        public PowerPlant​(PowerPlantPrototype.PrototypeData prototypeData,
                          double efficiency,
                          double installedBlockPowerInMW,
                          String id)
        Creates a PowerPlant
        Parameters:
        prototypeData - technical specification template for a group of power plants
        efficiency - conversion ratio of thermal to electric energy
        installedBlockPowerInMW - nominal (maximum) net electricity generation capacity
        id - name of this power plant unit used in outputs
    • Method Detail

      • addComponentsTo

        public void addComponentsTo​(de.dlr.gitlab.fame.communication.transfer.ComponentCollector collector)
        required for Portables
        Specified by:
        addComponentsTo in interface de.dlr.gitlab.fame.communication.transfer.Portable
        Overrides:
        addComponentsTo in class PowerPlantPrototype
      • populate

        public void populate​(de.dlr.gitlab.fame.communication.transfer.ComponentProvider provider)
        required for Portables
        Specified by:
        populate in interface de.dlr.gitlab.fame.communication.transfer.Portable
        Overrides:
        populate in class PowerPlantPrototype
      • calcMarginalCostItem

        public PowerPlant.MarginalCostItem calcMarginalCostItem​(de.dlr.gitlab.fame.time.TimeStamp time,
                                                                double fuelCostInEURperThermalMWH,
                                                                double co2CostInEURperTon)
        Calculates marginal costs and available power for this PowerPlant at given time
        Parameters:
        time - the targeted time of generation
        fuelCostInEURperThermalMWH - cost fuel of the associated fuel
        co2CostInEURperTon - cost for CO2 emission certificates in Euro per ton
        Returns:
        array of [availablePower, marginalCost] for this power plant at the given time
      • calcMarginalCost

        public double calcMarginalCost​(de.dlr.gitlab.fame.time.TimeStamp time,
                                       double fuelCostInEURperThermalMWH,
                                       double co2CostInEURperTon)
        Calculates specific marginal costs of this PowerPlant at given time
        Parameters:
        time - the targeted time of generation
        fuelCostInEURperThermalMWH - cost fuel of the associated fuel
        co2CostInEURperTon - cost for CO2 emission certificates in Euro per ton
        Returns:
        specific marginalCost for one additional MWh of energy by this power plant at the given time
      • getInstalledPowerInMW

        public double getInstalledPowerInMW​(de.dlr.gitlab.fame.time.TimeStamp time)
        Parameters:
        time - at which to calculate
        Returns:
        nominal installed power at given time
      • getAvailablePowerInMW

        public double getAvailablePowerInMW​(de.dlr.gitlab.fame.time.TimeStamp time)
        Calculates effectively available net electricity generation capacity considering plant availabilities
        Parameters:
        time - at which to calculate
        Returns:
        effectively available net electricity generation capacity in MW at the given time considering plant availability.
        If a power plant is not active at the specified time, 0 is returned.
      • isActive

        public boolean isActive​(long timeStep)
        Checks if the power plant is active at given time
        Parameters:
        timeStep - at which to test activeness
        Returns:
        true if the plant is active at given time, false otherwise
      • isActiveAnyTimeBetween

        public boolean isActiveAnyTimeBetween​(long startStep,
                                              long endStep)
        Checks if the power plant is active at any time between the given start time step and end time step
        Parameters:
        startStep - (included) left border of the time interval to check
        endStep - (excluded) right border of the time interval to check
        Returns:
        true, if the power plant has any phase of activity between the given time steps; false otherwise
      • updateGeneration

        public DispatchResult updateGeneration​(de.dlr.gitlab.fame.time.TimeStamp time,
                                               double requestedPowerInMW,
                                               double fuelPriceInEURperMWH,
                                               double co2PriceInEURperTon)
        Changes current generation of plant according to desired electricity output, returns associated DispatchResult
        Parameters:
        time - at which to perform the load change
        requestedPowerInMW - the desired net electricity generation in MW
        fuelPriceInEURperMWH - at given time in EUR per thermal MWH
        co2PriceInEURperTon - at given time in EUR per Ton of CO2
        Returns:
        result from the dispatch
      • getCurrentPowerOutputInMW

        public double getCurrentPowerOutputInMW()
        Returns electricity production from last update of load level
        Returns:
        power production as set by last update
      • calcSpecificCostOfLoadChangeInEURperMW

        public double calcSpecificCostOfLoadChangeInEURperMW​(double oldLoadLevel,
                                                             double newLoadLevel)
        Returns ramping cost on load level change
        Parameters:
        oldLoadLevel - previous load level
        newLoadLevel - next load level
        Returns:
        specific cost for changing load level of this plant from old to new
      • setConstructionTimeStep

        public void setConstructionTimeStep​(long constructionTimeStep)
        Sets first time step in which the power plant will be able to deliver power
        Parameters:
        constructionTimeStep - first time step where plant isActive(long) == true
      • setTearDownTimeStep

        public void setTearDownTimeStep​(long tearDownTimeStep)
        Specifies the time step in and after which the power plant will no longer deliver power
        Parameters:
        tearDownTimeStep - first time step after construction where plant isActive(long) == false
      • readyToTearDownIn

        public boolean readyToTearDownIn​(long timeStep)
        Checks if a power plant is still active or has already been deactivated at the specified time
        Parameters:
        timeStep - to check for power plant activity
        Returns:
        true if the plant has been deactivated at the specified timeStep
      • getEfficiency

        public double getEfficiency()
        Returns:
        conversion ratio of thermal to electric energy