reV.losses.scheduled.OutageScheduler
- class OutageScheduler(outages, seed=0)[source]
Bases:
object
A scheduler for multiple input outages.
Given a list of information about different types of desired outages, this class leverages the stochastic scheduling routines of
SingleOutageScheduler
to calculate the total losses due to the input outages on an hourly basis.- outages
The user-provided list of
Outages
containing info about all types of outages to be scheduled.
- seed
The seed value used to seed the random generator in order to produce random but reproducible losses. This is useful for ensuring that stochastically scheduled losses vary between different sites (i.e. that randomly scheduled outages in two different location do not match perfectly on an hourly basis).
- Type:
- total_losses
An array (of length 8760) containing the per-hour total loss percentage resulting from the stochastically scheduled outages. This array contains only zero values before the
calculate()
method is run.- Type:
np.array
- can_schedule_more
A boolean array (of length 8760) indicating wether or not more losses can be scheduled for a given hour. This array keeps track of all the scheduling conflicts between input outages.
- Type:
np.array
Warning
It is possible that not all outages input by the user will be scheduled. This can happen when there is not enough time allowed for all of the input outages. To avoid this issue, always be sure to allow a large enough month range for long outages that take up a big portion of the farm and try to allow outage overlap whenever possible.
See also
SingleOutageScheduler
Single outage scheduler.
Outage
Specifications for a single outage.
- Parameters:
outages (list of
Outages
) – A list ofOutages
, where eachOutage
contains info about a single type of outage. See the documentation ofOutage
for a description of the required keys of each outage dictionary.seed (int, optional) – An integer value used to seed the random generator in order to produce random but reproducible losses. This is useful for ensuring that stochastically scheduled losses vary between different sites (i.e. that randomly scheduled outages in two different location do not match perfectly on an hourly basis). By default, the seed is set to 0.
Methods
Calculate total losses from stochastically scheduled outages.
- calculate()[source]
Calculate total losses from stochastically scheduled outages.
This function calls
SingleOutageScheduler.calculate()
on every outage input (sorted by largest duration and then largest number of outages) and returns the aggregate the losses from the result.- Returns:
np.array
– An array (of length 8760) containing the per-hour total loss percentage resulting from the stochastically scheduled outages.