time_sequential modules — nempy 0.0.1 documentation

# time_sequential modules

The module provides tools constructing time sequential models using nempy.

Functions:

`construct_ramp_rate_parameters`(…) | Combine dispatch and ramp rates into the ramp rate inputs compatible with the SpotMarket class.
`create_seed_ramp_rate_parameters`(…) | Combine historical dispatch and as bid ramp rates to get seed ramp rate parameters for a time sequential model.

`nempy.time_sequential.` `construct_ramp_rate_parameters`(last_interval_dispatch, ramp_rates)

  Combine dispatch and ramp rates into the ramp rate inputs compatible with the SpotMarket class.

  Examples

      >>> last_interval_dispatch = pd.DataFrame({
      ... 'unit': ['A', 'A', 'B'],
      ... 'service': ['energy', 'raise_reg', 'energy'],
      ... 'dispatch': [45.0, 50.0, 88.0]})

      >>> ramp_rates = pd.DataFrame({
      ... 'unit': ['A', 'B', 'C'],
      ... 'ramp_up_rate': [600.0, 1200.0, 700.0],
      ... 'ramp_down_rate': [600.0, 1200.0, 700.0]})

      >>> construct_ramp_rate_parameters(last_interval_dispatch,
      ...                                ramp_rates)
        unit  initial_output  ramp_up_rate  ramp_down_rate
      0    A            45.0         600.0           600.0
      1    B            88.0        1200.0          1200.0
      2    C             0.0         700.0           700.0

  Parameters

    - last_interval_dispatch (pd.DataFrame) –

      Columns: | Description:
      unit | unique identifier of a dispatch unit (as str)
      service | the service being provided, optional, default ‘energy’, (as str)
      dispatch | the dispatch target from the previous dispatch interval, in MW, (as np.float64)

    - ramp_rates (pd.DataFrame) –

      Columns: | Description:
      unit | unique identifier for units, (as str)
      ramp_up_rate | the ramp up rate, in MW/h, (as np.float64)
      ramp_down_rate | the ramp down rate, in MW/h, (as np.float64)

  Returns

    Columns: | Description:
    unit | unique identifier for units, (as str)
    initial_output | the output/consumption of the unit at the start of the dispatch interval, in MW, (as np.float64)
    ramp_up_rate | the ramp up rate, in MW/h, (as np.float64)
    ramp_down_rate | the ramp down rate, in MW/h, (as np.float64)

  Return type

    pd.DataFrame

`nempy.time_sequential.` `create_seed_ramp_rate_parameters`(historical_dispatch, as_bid_ramp_rates)

  Combine historical dispatch and as bid ramp rates to get seed ramp rate parameters for a time sequential model.

  Examples

      >>> historical_dispatch = pd.DataFrame({
      ... 'unit': ['A', 'B'],
      ... 'initial_output': [80.0, 100.0]})

      >>> as_bid_ramp_rates = pd.DataFrame({
      ... 'unit': ['A', 'B'],
      ... 'ramp_down_rate': [600.0, 1200.0],
      ... 'ramp_up_rate': [600.0, 1200.0]})

      >>> create_seed_ramp_rate_parameters(historical_dispatch,
      ...                                  as_bid_ramp_rates)
        unit  initial_output  ramp_down_rate  ramp_up_rate
      0    A            80.0           600.0         600.0
      1    B           100.0          1200.0        1200.0

  Parameters

    - historical_dispatch (pd.DataFrame) –

      Columns: | Description:
      unit | unique identifier for units, (as str)
      initial_output | the output/consumption of the unit at the start of the dispatch interval, in MW, (as np.float64)

    - as_bid_ramp_rates –

      Columns: | Description:
      unit | unique identifier for units, (as str)
      ramp_up_rate | the ramp up rate, in MW/h, (as np.float64)
      ramp_down_rate | the ramp down rate, in MW/h, (as np.float64)

  Returns

    Columns: | Description:
    unit | unique identifier for units, (as str)
    initial_output | the output/consumption of the unit at the start of the dispatch interval, in MW, (as np.float64)
    ramp_up_rate | the ramp up rate, in MW/h, (as np.float64)
    ramp_down_rate | the ramp down rate, in MW/h, (as np.float64)

  Return type

    pd.DataFrame