electricity provider pricing table structure#
Provides ability to vary electricity costs by flexible time periods for each utility. It is linked to the Electricity_Provider table through a fk on station_id. unit_price is the cost per kWh for certain types of pricing, and cost overall for others expressed in dollars
Not required by all models and is okay to be empty.
Field |
Type |
NULL allowed |
Default Value |
Foreign key |
Description |
---|---|---|---|---|---|
id* |
INTEGER |
NO |
Primary key referencing the pricing strategy used |
||
Provider_ID |
INTEGER |
NO |
Electricity_Provider(Provider_ID) |
Foreign key to electricity provider who is enforcing pricing strategy |
|
type |
TEXT |
NO |
Type of pricing strategy enforced. Can be one of THE ENUM IS THIS< BUT IT IS NOT WORKING @Electricity_Pricing_Type@ |
||
start_seconds |
INTEGER |
NO |
Simulation time (in seconds) that the pricing strategy starts being enforced |
||
end_seconds |
INTEGER |
NO |
Simulation time (in seconds) that the pricing strategy stops being enforced |
||
unit_price |
REAL |
NO |
Cost (in $) as applied by the type suggested above |
(* - Primary key)
The SQL statement for table and index creation is below.
CREATE TABLE IF NOT EXISTS "Electricity_Provider_Pricing"(
id INTEGER NOT NULL PRIMARY KEY,
Provider_ID INTEGER NOT NULL,
"type" TEXT NOT NULL,
start_seconds INTEGER NOT NULL,
end_seconds INTEGER NOT NULL,
unit_price REAL NOT NULL,
CONSTRAINT "fk_prov_id" FOREIGN KEY("Provider_ID") REFERENCES Electricity_Provider("Provider_ID") ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
);