Skip to content

Object model

The API exposes a tree-shaped object model rooted at ISIAPI. Each level is a thin wrapper over an internal SIDRA INTERSECTION domain object.

What you can do

The API provides programmatic access to Site and Network input and output data in a SIDRA INTERSECTION Project file (.sipx). You can:

  • Create or open a Project and add Sites, Networks, Common Control Groups (CCGs) and Routes.
  • Specify geometry: add or remove intersection legs and lanes, configure lanes and set lane disciplines.
  • Specify phasing and timing data and other analysis inputs.
  • Process a Site or Network from your application and read its results through the output objects.
  • Create Assign Volume Bins and O-D volumes, create Assign Networks from Basic Networks, and read SIDRA ASSIGN results (from 11.0.4).

Hierarchy

ISIAPI                                   (root, one per process)
  Project: ISIAPIProject
    SiteFolders: ISIAPISiteFolders
      <SiteFolder>: ISIAPISiteFolder
        Sites: ISIAPISites
          <Site>: ISIAPISite             (in SIDRA, a "site" is an intersection)
            Legs: ISIAPILegs
              <Leg>: ISIAPILeg
                LaneApproachs: ISIAPILaneApproachs
                LaneExits: ISIAPILaneExits
                Islands: ISIAPIIslands
            Analysis: ISIAPIAnalysis       (analysis parameters for the site)
            Outputset: ISIAPIOutputset     (results, populated by Site.Process())
            DiagnosticMsgs: ISIAPIDiagnosticMsgs
            ...
    NetworkFolders: ISIAPINetworkFolders
      <NetworkFolder>: ISIAPINetworkFolder
        Networks: ISIAPINetworks
          <Network>: ISIAPINetwork
            NetworkSites: ISIAPINetworkSites
            OutputNetwork: ISIAPIOutputNetwork  (results, populated by Network.Process())
            AssignScheme: ISIAPIAssignScheme  (Assign Networks only, NetworkType = 1)
              AssignSchemeParameter: ISIAPIAssignSchemeParameter  (method, iterations, tolerances)
              AssignSchemeZones: ISIAPIAssignSchemeZones
                <Zone>: ISIAPIAssignSchemeZone
                  AssignSchemeZoneConnections: ISIAPIAssignSchemeZoneConnections
              AssignSchemeDemandScenarios: ISIAPIAssignSchemeDemandScenarios
              OutputAssignScheme: ISIAPIOutputAssignScheme  (results, populated by Network.Process())
                OutputAssignODs: ISIAPIOutputAssignODs
                  <OD>: ISIAPIOutputAssignOD
                    OutputAssignODPerformance: ISIAPIOutputAssignODPerformance
                    OutputAssignODRoutes: ISIAPIOutputAssignODRoutes
            ...
    AssignVolumeBinFolders: ISIAPIAssignVolumeBinFolders  (SIDRA ASSIGN, from 11.0.4)
      <AssignVolumeBinFolder>: ISIAPIAssignVolumeBinFolder
        AssignVolumeBins: ISIAPIAssignVolumeBins
          <AssignVolumeBin>: ISIAPIAssignVolumeBin
            AssignVolumeMCs: ISIAPIAssignVolumeMCs
            AssignZones: ISIAPIAssignZones
            AssignVolumeSets: ISIAPIAssignVolumeSets
              <AssignVolumeSet>: ISIAPIAssignVolumeSet
                AssignTripMatrix: ISIAPIAssignTripMatrix
                  AssignTripMatrixZones: ISIAPIAssignTripMatrixZones
                  AssignTripMatrixZoneODs: ISIAPIAssignTripMatrixZoneODs

The SIDRA ASSIGN branches are explained in SIDRA ASSIGN.

Note

There is no separate "intersection" object: an ISIAPISite is the intersection. Its Legs, Analysis, and Outputset describe that intersection directly.

Conventions

  • I... singular types model a single domain object (ISIAPISite, ISIAPILeg, ...).
  • I...s plural types are indexed collections (ISIAPISites, ISIAPILegs, ...). They expose Count and an indexer; iterate with a plain for loop, because COM collections do not always implement IEnumerable<T> in a way that idiomatic C# foreach expects.
  • I..._<variant> types model alternative parameter sets or analysis variants (e.g. ISIAPILeg_roundabout, ISIAPILeg_rou_hcm).
  • ...MC types are Movement Class-specific (heavy vehicles, buses, bicycles, etc.) versions of the corresponding non-MC type.

Lifecycle

  1. Activate the API. There is one ISIAPI per process.
  2. Open or create a project (ISIAPI.OpenProject, ISIAPI.CreateAndOpenProject). Until then ISIAPI.Project and the rest of the navigation tree return null.
  3. Read or mutate sites, networks, and parameters via the property tree. ISIAPISite.Analysis holds the analysis parameters for a site.
  4. Run the analysis with ISIAPISite.Process() (or ISIAPINetwork.Process() for a network). For an Assign Network, Process() also runs the traffic assignment.
  5. Read outputs from ISIAPISite.Outputset (ISIAPINetwork.OutputNetwork for networks) and the ISIAPIOutput* types. For an Assign Network, the assignment results are in ISIAPINetwork.AssignScheme.OutputAssignScheme.
  6. Save with ISIAPI.SaveProject() and call api.Close() when finished. COM clients also release their interface references before uninitialising COM.

Threading

The API is single-threaded apartment (STA). Marshal calls back onto the thread that activated ISIAPI, or use a dedicated STA helper thread. Calls from a worker thread will throw RPC_E_WRONG_THREAD (0x8001010E).