restricted lanes table structure

restricted lanes table structure#

The Restricted_Lanes table holds information on lanes on a link that are restricted to a certain use. This is currently only used for AV-only lanes at the moment but could be used to model HOV or HOT lanes.

Table Structure#

Field

Type

NULL allowed

Default Value

Foreign key

Description

link

INTEGER

NO

Link(link)

Link ID of the link to which these restricted lanes apply

direction

INTEGER

NO

Direction of travel for which these lanes apply (0=AB, 1=BA)

use

STRING

NO

Not in use at the moment but will be used to distinguish different types of lane restrictions in the future

lanes

INTEGER

NO

Number of lanes that are reserved for the restricted use

speed

REAL

NO

Speed (in m/s) for the restricted lanes

capacity

REAL

NO

0

Capacity (in veh/hour) for the combined restricted lanes (ie not veh/lane/hour)

(* - Primary key)

The SQL statement for table and index creation is below.

CREATE TABLE IF NOT EXISTS Restricted_Lanes(
 link              INTEGER        NOT NULL,
 direction         INTEGER        NOT NULL,
 "use"             STRING         NOT NULL,
 lanes             INTEGER        NOT NULL,
 speed             REAL           NOT NULL,
 capacity          REAL           NOT NULL DEFAULT 0,
 CONSTRAINT "link_id_fk" FOREIGN KEY("link") REFERENCES "Link"("link") DEFERRABLE INITIALLY DEFERRED
 CHECK(direction IN (0, 1))
 CHECK(TYPEOF(lanes) == 'integer')
 CHECK(lanes>0)
 CHECK(speed>0)
);
create INDEX IF NOT EXISTS idx_polaris_restricted_lanes_link ON Restricted_Lanes (link);