Exemple #1
0
    def __init__(self):
        """Initialise a default context."""
        self.verbose = False
        self.track_exchanges = False
        self.regions = regions.All
        self.startdate = startdate
        # Number of timesteps is determined by the number of demand rows.
        self.hours = len(hourly_regional_demand)
        # Estimate the number of years from the number of simulation hours.
        if self.hours == 8760 or self.hours == 8784:
            self.years = 1
        else:
            self.years = self.hours / (365.25 * 24)

        self.relstd = 0.002  # 0.002% unserved energy
        self.generators = [
            generators.CCGT(polygons.wildcard, 20000),
            generators.OCGT(polygons.wildcard, 20000)
        ]
        self.demand = hourly_demand.copy()
        self.timesteps = len(self.demand)
        self.spill = pd.DataFrame()
        self.generation = pd.DataFrame()
        self.unserved = pd.DataFrame()
        # System non-synchronous penetration limit
        self.nsp_limit = float(configfile.get('limits', 'nonsync-penetration'))
        self.exchanges = np.zeros(
            (self.hours, polygons.numpolygons, polygons.numpolygons))
        self.costs = costs.NullCosts()
Exemple #2
0
def theworks(context):
    """All technologies."""

    re100(context)
    # pylint: disable=redefined-outer-name
    egs = generators.Geothermal_EGS(polygons.wildcard, 0,
                                    configfile.get('generation', 'egs-geothermal-trace'), 38)
    hsa = generators.Geothermal_HSA(polygons.wildcard, 0,
                                    configfile.get('generation', 'hsa-geothermal-trace'), 38)
    pt = generators.ParabolicTrough(polygons.wildcard, 0, 2, 6,
                                    configfile.get('generation', 'cst-trace'), 12)
    coal = generators.Black_Coal(polygons.wildcard, 0)
    coal_ccs = generators.Coal_CCS(polygons.wildcard, 0)
    ccgt = generators.CCGT(polygons.wildcard, 0)
    ccgt_ccs = generators.CCGT_CCS(polygons.wildcard, 0)
    ocgt = generators.OCGT(polygons.wildcard, 0)
    batt = generators.Battery(polygons.wildcard, 0, 0)
    diesel = generators.Diesel(polygons.wildcard, 0)
    dem = generators.DemandResponse(polygons.wildcard, 0, 300)
    biomass = generators.Biomass(polygons.wildcard, 0)
    greenpower = generators.GreenPower(polygons.wildcard, 0)
    btm_pv = generators.Behind_Meter_PV(polygons.wildcard, 0,
                                        configfile.get('generation', 'rooftop-pv-trace'),
                                        0)
    g = context.generators

    context.generators = [hsa, egs, pt, coal, coal_ccs, ccgt, ccgt_ccs] + g[:-4] + \
                         [btm_pv, ocgt, diesel, batt, dem, biomass, greenpower]
Exemple #3
0
 def test_004(self):
     """100 MW fossil plant generates exactly 876,000 MWh."""
     ccgt = generators.CCGT(polygons.wildcard, 100)
     self.context.generators = [ccgt]
     nemo.run(self.context)
     self.assertEqual(sum(ccgt.series_power.values()),
                      self.context.timesteps * 100)
Exemple #4
0
def _one_ccgt(context):
    """One CCGT only.

    >>> class C: pass
    >>> c = C()
    >>> _one_ccgt(c)
    >>> len(c.generators)
    1
    """
    context.generators = [generators.CCGT(polygons.wildcard, 0)]
Exemple #5
0
def ccgt(context):
    """All gas scenario.

    >>> class C: pass
    >>> c = C()
    >>> ccgt(c)
    >>> len(c.generators)
    14
    """
    # pylint: disable=redefined-outer-name
    ccgt = generators.CCGT(polygons.wildcard, 0)
    ocgt = generators.OCGT(polygons.wildcard, 0)
    context.generators = [ccgt] + _hydro() + [ocgt]
Exemple #6
0
def re_plus_fossil(context):
    """Mostly renewables with some fossil augmentation.

    >>> class C: pass
    >>> c = C()
    >>> c.generators = []
    >>> re_plus_fossil(c)
    >>> len(c.generators)
    183
    """
    re100(context)
    # pylint: disable=redefined-outer-name
    coal = generators.Black_Coal(polygons.wildcard, 0)
    ccgt = generators.CCGT(polygons.wildcard, 0)
    ocgt = generators.OCGT(polygons.wildcard, 0)
    g = context.generators
    context.generators = [coal, ccgt] + g[:-4] + [ocgt]
Exemple #7
0
def re_plus_ccs(context):
    """Mostly renewables with fossil and CCS augmentation.

    >>> class C: pass
    >>> c = C()
    >>> c.generators = []
    >>> re_plus_ccs(c)
    >>> len(c.generators)
    185
    """
    re100(context)
    coal = generators.Black_Coal(polygons.wildcard, 0)
    # pylint: disable=redefined-outer-name
    coal_ccs = generators.Coal_CCS(polygons.wildcard, 0)
    # pylint: disable=redefined-outer-name
    ccgt = generators.CCGT(polygons.wildcard, 0)
    ccgt_ccs = generators.CCGT_CCS(polygons.wildcard, 0)
    ocgt = generators.OCGT(polygons.wildcard, 0)
    g = context.generators
    context.generators = [coal, coal_ccs, ccgt, ccgt_ccs] + g[:-4] + [ocgt]
Exemple #8
0
 def test_013(self):
     """Fossil plant records power generation history."""
     ccgt = generators.CCGT(polygons.wildcard, 100)
     self.context.generators = [ccgt]
     nemo.run(self.context)
     self.assertTrue(len(self.context.generators[0].series_power) > 0)