weather impact table structure#
Incidents to be applied during the simulation (only supported in Mesoscopic model)
Field |
Type |
NULL allowed |
Default Value |
Foreign key |
Description |
|---|---|---|---|---|---|
link |
INTEGER |
YES |
Link(link) |
link upon which the incident applies; if NULL, applies to all links in the zone |
|
dir |
INTEGER |
YES |
link direction (0 for A to B, 1 from B to A) |
||
zone |
INTEGER |
YES |
Zone(zone) |
zone in which the incident applies (if NULL, only applies to the specified link) |
|
start_time |
INTEGER |
NO |
0 |
initial time (in seconds from midnight) in which the incident occurs |
|
end_time |
INTEGER |
NO |
0 |
final time (in seconds from midnight) in which the incident occurs |
|
temperature |
REAL |
NO |
0 |
relative capacity that the link will experience from 0 (completely blocked) to 1 (no impact) |
|
impact_level |
INTEGER |
NO |
0 |
impact level (0, 1, 2,… relates to scenario_file free-flow speed reduction levels) |
(* - Primary key)
The SQL statement for table and index creation is below.
CREATE TABLE IF NOT EXISTS Weather_Impact(
link INTEGER,
dir INTEGER,
zone INTEGER,
start_time INTEGER NOT NULL DEFAULT 0,
end_time INTEGER NOT NULL DEFAULT 0,
temperature REAL NOT NULL DEFAULT 0,
impact_level INTEGER NOT NULL DEFAULT 0,
CONSTRAINT "link_fk_weather" FOREIGN KEY ("link") REFERENCES "Link" ("link") DEFERRABLE INITIALLY DEFERRED -- check
CONSTRAINT "zone_fk_weather" FOREIGN KEY ("zone") REFERENCES "Zone" ("zone") DEFERRABLE INITIALLY DEFERRED -- check
CONSTRAINT "link_or_zone_required" CHECK (link IS NOT NULL OR zone IS NOT NULL)
);