optivgi.scm.constants

Defines centralized constants used throughout the SCM package.

Consolidating constants here improves maintainability and clarity. It includes parameters related to algorithm timing, simulation, energy conversion, and default values for EV charging profiles.

class optivgi.scm.constants.AlgorithmConstants

Bases: object

Constants related to the timing and structure of the SCM algorithm.

RESOLUTION = datetime.timedelta(seconds=60)

The time duration of a single step in the optimization algorithm.

Type:

RESOLUTION

RUNTIME = datetime.timedelta(seconds=28800)

The total time horizon the optimization algorithm plans for.

Type:

RUNTIME

TIMESTEPS = 480

The total number of discrete time steps within the RUNTIME horizon. Calculated based on RUNTIME and RESOLUTION.

Type:

TIMESTEPS

POWER_ENERGY_FACTOR = 0.016666666666666666

Conversion factor from power (kW or A) applied over one RESOLUTION period to energy (kWh or Ah). (RESOLUTION in hours) = RESOLUTION / 1 hour

Type:

POWER_ENERGY_FACTOR

class optivgi.scm.constants.EVConstants

Bases: object

Constants related to Electric Vehicle (EV) properties and charging profiles.

CHARGING_PROFILE_ID = 1

Default ID to use for generated charging profiles. Required by OCPP protocol in the charging profile.

Type:

CHARGING_PROFILE_ID

CHARGING_PROFILE_PURPOSE = 'TxProfile'

Default purpose field for charging profiles. Common values include ‘TxProfile’, ‘ChargePointMaxProfile’, ‘TxDefaultProfile’.

Type:

CHARGING_PROFILE_PURPOSE

CHARGING_PROFILE_STACK_LEVEL = 1

Default stack level for generated profiles. Determines priority relative to other profiles. Lower numbers often have higher priority.

Type:

CHARGING_PROFILE_STACK_LEVEL

CHARGING_PROFILE_KIND = 'Absolute'

Default kind of profile. ‘Absolute’ means the limits are absolute values, ‘Relative’ means percentage, ‘Recurring’ is time-based.

Type:

CHARGING_PROFILE_KIND

CHARGING_RATE_VOLTAGE = 240

Default nominal voltage (in Volts) used for conversions between Watts (W) and Amperes (A) when the actual voltage is not provided. Common values are 230V (Europe single-phase), 240V (US split-phase), 120V (US single-phase).

Type:

CHARGING_RATE_VOLTAGE