reV.losses.scheduled.ScheduledLossesMixin

class ScheduledLossesMixin[source]

Bases: object

Mixin class for reV.SAM.generation.AbstractSamGeneration.

Warning

Using this class for anything except as a mixin for AbstractSamGeneration may result in unexpected results and/or errors.

Methods

add_scheduled_losses([resource])

Add stochastically scheduled losses to SAM config file.

Attributes

OUTAGE_CONFIG_KEY

Specify outage information in the config file using this key.

OUTAGE_SEED_CONFIG_KEY

Specify a randomizer seed in the config file using this key.

outage_seed

A value to use as the seed for the outage losses.

OUTAGE_CONFIG_KEY = 'reV_outages'

Specify outage information in the config file using this key.

OUTAGE_SEED_CONFIG_KEY = 'reV_outages_seed'

Specify a randomizer seed in the config file using this key.

add_scheduled_losses(resource=None)[source]

Add stochastically scheduled losses to SAM config file.

This function reads the information in the reV_outages key of the sam_sys_inputs dictionary and computes stochastically scheduled losses from that input. If the value for reV_outages is a string, it must have been generated by calling json.dumps() on the list of dictionaries containing outage specifications. Otherwise, the outage information is expected to be a list of dictionaries containing outage specifications. See Outage for a description of the specifications allowed for each outage. The scheduled losses are passed to SAM via the hourly key to signify which hourly capacity factors should be adjusted with outage losses. If no outage info is specified in sam_sys_inputs, no scheduled losses are added.

Parameters:

resource (pd.DataFrame, optional) – Time series resource data for a single location with a pandas DatetimeIndex. The year value of the index will be used to seed the stochastically scheduled losses. If None, no yearly seed will be used.

See also

Outage

Single outage specification.

Notes

The scheduled losses are passed to SAM via the hourly key to signify which hourly capacity factors should be adjusted with outage losses. If the user specifies other hourly adjustment factors via the hourly key, the effect is combined. For example, if the user inputs a 33% hourly adjustment factor and reV schedules an outage for 70% of the farm down for the same hour, then the resulting adjustment factor is

This means the generation will be reduced by ~80%, because the user requested 33% losses for the 30% the farm that remained operational during the scheduled outage (i.e. 20% remaining of the original generation).

property outage_seed

A value to use as the seed for the outage losses.

Type:

int