What the SIDRA API does
The SIDRA API is the programming interface to SIDRA INTERSECTION. A program you write opens a project, works with its Sites and Networks, processes them and reads the results, without anyone stepping through the interface.
That takes the repetition out of modelling work: entering volumes, processing one Site after another, copying results into a table. Less repetition, more time for engineering.
A program can
- Open, create and save projects.Work with existing SIDRA project files, or create new ones.
- Build Sites and Networks.Legs, lanes, phasing and volumes, written from data instead of entered by hand. The sample programs build a signalised intersection, roundabouts, a turbo roundabout and a freeway diamond interchange network.
- Change inputs and scenarios.Volumes, Volume Bins and Scenarios, model settings, and Design Life and Flow Scale analysis.
- Process Sites and Networks.One at a time, or every Site and Network in a project.
- Read the results.Capacity, degree of saturation, level of service, delay, queue length, stop rate, travel time, fuel consumption, emissions and operating cost for the Site, with results for its legs, lanes and movements.
- Check the diagnostics.Processing warnings and diagnostic messages for every Site.
1api = SIAPI()
2api.OpenProject(r"C:\Samples\Demo.sipx")
3site = api.Project.SiteFolders[0].Sites[0]
4site.Process()
5print(site.Outputset.OutputSiteVehicle.Level_of_service)
Open a project, process a Site, read a result. The core is five lines; set-up for each language is in Getting started.
What engineers use it for
Some of these come from what customers have asked us for over the years. Others are things the API already does that are slow to do one at a time in the interface. All of them work in SIDRA INTERSECTION 11.
Common uses
- Update the volumes, process every Site, fill the results table.Read turning movement volumes from a spreadsheet or text file, write them into every Site, process, and write the movement and lane results back out.
- Process a whole intersection inventory in one run.Gather Sites from many project files into one, process them all, and rank them by degree of saturation, level of service or queue length.
- Run every volume scenario in one pass.Step through each scenario on a Site or Network, process it, read the results, and write one summary table across all of them.
- Compare design years and growth assumptions.Drive Design Life and Flow Scale analysis from a list of design years or growth factors.
- Check submitted models against your standard.Read the model settings and processing warnings of every Site in a project, and list what differs from your reference model.
- Report emissions and running cost, not only delay.Read CO2, NOx, CO, hydrocarbons, fuel and operating cost for each option, so a comparison can be reported in tonnes and dollars as well as seconds.
- Check that network models settled.Report across a whole project which Network runs converged and which did not.
- Put SIDRA INTERSECTION inside your modelling chain.Read signal timings out for another tool, or write network data in from one.
The API reads and writes SIDRA project files. Data from other tools reaches a project through your program, which reads the file and writes the values in.
New in 11.0.4: SIDRA ASSIGN from your own code
From SIDRA INTERSECTION 11.0.4, a program can read and write SIDRA ASSIGN data for the first time: zones, O‑D trip matrices, assignment settings and results.
The 11.0.4 API reference adds 44 object types, all of them for SIDRA ASSIGN, taking the total from 178 to 222.
With 11.0.4, a program can
- Build the demand.Create Assign Volume Bins, zones and O‑D volume sets, and write trip volumes for each Movement Class, with growth rates.
- Make an Assign Network.Create it from an existing Basic Network, link it to an Assign Volume Bin, and connect each zone to a leg.
- Set up the assignment.Choose All-or-Nothing, Incremental, User Equilibrium or Stochastic User Equilibrium, set iterations, tolerances and demand scenarios, and set Fixed Route shares for each route and Movement Class.
- Read the results.For each O‑D pair and Movement Class: travel time, delay, stop rate, distance, speed, operating cost, fuel and emissions. Also the routes used, the flow on each, the intersections along each route, and the convergence history.
- Record the source.Give your program a name, and the API records it on every Site, Network and Volume Bin the program creates or changes.
Write O‑D trip matrices from your strategic model into SIDRA ASSIGN, then read travel time, delay, cost, fuel and emissions for every O‑D pair.
The 11.0.4 sample programs add two SIDRA ASSIGN examples in C#, C++ and Python. They build an Assign Volume Bin, zones and O‑D volume sets, create and connect an Assign Network, process it, and print the duality gap, a measure of convergence, and the flow on each route for one O‑D pair.
The 11.0.4 release notes list every addition, and one change to check in existing scripts.
Languages and set-up
The API runs on Windows, 64-bit, on a computer where SIDRA INTERSECTION 11 is installed and licensed. The SIDRA INTERSECTION installer registers the API and provides the .NET 8 runtime it needs.
- C# and VB.NETThrough the Version 11 late-binding wrapper
- C++Through the installed COM type library
- PythonThrough Python.NET, 64-bit Python only
- Windows, 64-bit.NET 8, from a 64-bit program
The sample programs run the same examples in C#, C++ and Python, so you can pick the language that suits your work. Moving a Python script from Version 9.1 or 10? Version 11 connects through Python.NET, which replaces the earlier route.
Documentation and samples
The developer documentation is at api.sidrasolutions.com. It is versioned: from 11.0.3, each release has its own copy.
On api.sidrasolutions.com
- Getting started.What to install, how to add the API to a project in each language, and a first program.
- Object model.How a project’s Sites, Networks, legs and lanes fit together.
- Code samples.Short walkthroughs, and downloadable sample projects in C#, C++ and Python.
- API reference.Every interface, property and method, by release.
- For AI agents.A page and machine-readable indexes for AI coding assistants, so they work from the published reference.
- Previous versions.Help, wrapper files and sample projects for SIDRA INTERSECTION 10 and 9.1.
Included with your licence
The SIDRA API is included at no extra charge with your SIDRA INTERSECTION licence, including Personal, Team and educational subscriptions.
Applications that use the API must run on a computer with SIDRA INTERSECTION installed and licensed. Each person using those applications must be covered by a valid SIDRA INTERSECTION licence.