Skip to content

Profiles & Providers

Simulation behavior is driven by pluggable profile providers. Override defaults by registering custom implementations via DI.

Load Profiles

ILoadProfileProvider

csharp
public interface ILoadProfileProvider
{
    double GetLoadPower(DateTime utcTime);
}

Built-in Profiles

ResidentialLoadProfile

Typical home consumption:

TimePowerDescription
00:00-06:00500 WStandby appliances
06:00-09:003,000 WMorning routine
09:00-17:00800 WDaytime
17:00-22:004,000 WEvening peak
22:00-24:001,500 WLate evening

Includes ±20% random variance.

CommercialLoadProfile

Office/commercial building (configurable peak demand, default 250 kW):

Time% of PeakDescription
Weekend10%Minimal
00:00-07:0015%Night
07:00-09:0060%Startup
09:00-17:0085%Business hours
17:00-19:0050%Closing
19:00-24:0020%Evening

ConstantLoadProfile

Fixed power consumption. Useful for testing.

CsvLoadProfile

Load from CSV file for measured data or custom patterns.

Solar Profiles

ISolarProfileProvider

csharp
public interface ISolarProfileProvider
{
    double GetSolarOutput(DateTime utcTime, double installedCapacityW);
}

Built-in: SimpleSolarProfile

Bell curve generation pattern:

  • Generation hours: 6:00-20:00
  • Peak at solar noon
  • Cloud cover variance for realism

EV Charging Profiles

IEvChargingProfileProvider

csharp
public interface IEvChargingProfileProvider
{
    bool IsVehicleConnected(DateTime utcTime);
    double GetChargingPower(DateTime utcTime);
}

Built-in: CommuterEvProfile

Typical commuter pattern:

PropertyValue
Charging window6 PM - 10 PM
Charge power7.4 kW
PatternEvening charging

Electricity Pricing

IElectricityPricingProvider

csharp
public interface IElectricityPricingProvider
{
    decimal GetPrice(DateTime utcTime);
}

Built-in: TimeOfUsePricingProvider

Time-of-use rates:

PeriodTimeRate
Off-peak00:00-07:00, 09:00-17:00$0.08/kWh
Morning shoulder07:00-09:00$0.15/kWh
Peak17:00-21:00$0.30/kWh
Evening shoulder21:00-24:00$0.12/kWh

Demand Response

IDemandResponseProvider

csharp
public interface IDemandResponseProvider
{
    bool IsEventActive(DateTime utcTime);
    double GetRequestedReduction(DateTime utcTime);
}

Built-in: SimpleDemandResponseProvider

Simulates DR events on hot summer afternoons:

PropertyValue
Active monthsJune-August
Peak hours3 PM - 7 PM
Event probability10% on eligible days
Requested reduction5,000 W

Grid Status

IGridStatusProvider

csharp
public interface IGridStatusProvider
{
    bool IsGridAvailable(DateTime utcTime);
}

Built-in: GridOutageStatusProvider

Simulates grid outages for testing islanding and backup scenarios.

Custom Registration

Register custom providers via DI to override defaults:

csharp
// Custom load profile
services.AddSingleton<ILoadProfileProvider, MyFactoryLoadProfile>();

// Custom solar profile  
services.AddSingleton<ISolarProfileProvider, WeatherApiSolarProfile>();

// Custom pricing
services.AddSingleton<IElectricityPricingProvider, DynamicSpotPricing>();

// Custom DR events
services.AddSingleton<IDemandResponseProvider, GridOperatorDRProvider>();