traffic incident 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 |
NO |
Link(link) |
link in which the incident applies |
|
dir |
INTEGER |
NO |
0 |
direction (0 for A to B, 1 from B to A) |
|
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 |
|
capacity_scale |
REAL |
NO |
0 |
relative capacity that the link will experience from 0 (completely blocked) to 1 (no impact) |
(* - Primary key)
The SQL statement for table and index creation is below.
CREATE TABLE IF NOT EXISTS "Traffic_Incident"
(
"link" INTEGER NOT NULL,
"dir" INTEGER NOT NULL DEFAULT 0,
"start_time" INTEGER NOT NULL DEFAULT 0,
"end_time" INTEGER NOT NULL DEFAULT 0,
"capacity_scale" REAL NOT NULL DEFAULT 0,
CONSTRAINT "link_fk" FOREIGN KEY ("link") REFERENCES "Link" ("link") DEFERRABLE INITIALLY DEFERRED -- check
);