12
Stephen Lawe Colin Smith April 4, 2013 Open Source Programming in Transportation Prepared for: 2013 TRB Applications Conference

Stephen Lawe Colin Smith April 4, 2013 Open Source Programming in Transportation Prepared for: 2013 TRB Applications Conference

Embed Size (px)

Citation preview

Page 1: Stephen Lawe Colin Smith April 4, 2013 Open Source Programming in Transportation Prepared for: 2013 TRB Applications Conference

Stephen LaweColin SmithApril 4, 2013

Open Source Programming in Transportation

Prepared for:

2013 TRB Applications Conference

Page 2: Stephen Lawe Colin Smith April 4, 2013 Open Source Programming in Transportation Prepared for: 2013 TRB Applications Conference

1. Describe successful Open Source programming

2. Make the case that our industry should be heavily leveraging this process for common utilities and methodologies

Two Objectives

Page 3: Stephen Lawe Colin Smith April 4, 2013 Open Source Programming in Transportation Prepared for: 2013 TRB Applications Conference

Imagine it is 1996 and your financial advisor comes to you with two possible investments:

Two new electronic encyclopedias

1.Microsoft will build. Hundreds of highly paid professional writers, editors and programmers. Managed as a professional enterprise

2.Unpaid volunteers with no professional experience required will give many hours to develop this tool

Start with an Example

* This was adopted from a story told by Dan Pink

Page 4: Stephen Lawe Colin Smith April 4, 2013 Open Source Programming in Transportation Prepared for: 2013 TRB Applications Conference

And the answer is…

1.MSN Encarta

• Pulled off the shelves in 2009

2.Wikipedia

• 17 million articles

• 270 languages

• Growing every day

Start with an Example

* This was adopted from a story told by Dan Pink

Page 5: Stephen Lawe Colin Smith April 4, 2013 Open Source Programming in Transportation Prepared for: 2013 TRB Applications Conference

-A well documented and well written code base that is understandable and well structured

-An interested user base

-A capable and motivated contributor base

-A well managed process for fixes and improvements

-A clear vision for future direction

What makes open source successful

Page 6: Stephen Lawe Colin Smith April 4, 2013 Open Source Programming in Transportation Prepared for: 2013 TRB Applications Conference

- Most agencies have very similar tools build and maintained internally creating massive inefficiency, redundancy and confusion

- Very few of these tools are proprietary

- Managed agency collaboration would result in information sharing and industry advancement and, where appropriate, levels of consistency

Why agencies should consider open source

Page 7: Stephen Lawe Colin Smith April 4, 2013 Open Source Programming in Transportation Prepared for: 2013 TRB Applications Conference

-Agencies would need to share tools and resources

-Some form of joint or federal funding would be required

-A well managed system of managing and distributing the code and resulting tools would be required.

How open source transportation tools could happen

Page 8: Stephen Lawe Colin Smith April 4, 2013 Open Source Programming in Transportation Prepared for: 2013 TRB Applications Conference

Example: GreenSTEP-EERPAT-SmartGAP

8

Lineage of 3 strategic modeling tools:

-GreenSTEP: developed by Brian Gregor at Oregon DOT, a model for evaluating Greenhouse Gas reduction strategies at a statewide level

-EERPAT: a standardized version of GreenSTEP developed by RSG for FHWA for application in other states

-SmartGAP: a product of the SHRP 2 C16 project using elements of GreenSTEP and other research

Page 9: Stephen Lawe Colin Smith April 4, 2013 Open Source Programming in Transportation Prepared for: 2013 TRB Applications Conference

Development Approach

9

1. Brian Gregor working for ODOT develops GreenSTEP in R (R is an open source statistics and programming platform)

2. RSG working for FHWA evaluates GHG tools, selects GreenSTEP, develops EERPAT

3. RSG working for SHRP 2 builds SmartGAP incorporating elements of EERPAT

4. Brian Gregor working with Portland State University adds features to GreenSTEP

5. RSG working for FHWA moves new features of GreenSTEP to EERPAT, adds GUI built using Python, and develops Git repository for all of the tools

Page 10: Stephen Lawe Colin Smith April 4, 2013 Open Source Programming in Transportation Prepared for: 2013 TRB Applications Conference

Model Structure: System of Components

10

Estimation Application GUI

Data development scripts: NHTS, Census, local sources

Model estimation scripts: specification testing, final model selection, validation, and application functions

Application build scripts:combining final models, application functions, and data

File structure, input data, and scripts to run the model and preprocess outputs

Script structure:-Main script to manage run-Inputs script to read inputs-Preparation scripts to run “one-time” components, e.g Population Synthesis-Simulation script(s) to run the main components of the model-Utility/Model scripts to hold functions-Output scripts to process outputs

Scripts, compiled code, and libraries that form the graphical user interface

EERPAT example:-Python local webserver that serves the GUI to a web browser, interacts with the file system, and executes runs-Java Script code and libraries to provide functionality in the GUI

Page 11: Stephen Lawe Colin Smith April 4, 2013 Open Source Programming in Transportation Prepared for: 2013 TRB Applications Conference

Future Management Approach

11

Develo

pm

en

t C

om

mu

nit

yR

ele

ase t

o U

ser

Com

mu

nit

y

Git version control repository used for code management – Git is open source (others, e.g. Subversion)

Core management team: decision makers for approving code changes, releases

Development community: Working with pre-release code, making updates and submitting changes

Web based repository hosting, with management and collaboration tools (others, e.g. R Forge)

Development Branch of Repository

Release Branch of

Repository/ Website

Downloads

User community: Working with release code, applying the models, reporting bugs

Page 12: Stephen Lawe Colin Smith April 4, 2013 Open Source Programming in Transportation Prepared for: 2013 TRB Applications Conference

Colin SmithDirector, Advanced Forecasting MethodsResource Systems Group, [email protected]

Stephen LaweCEOResource Systems Group, [email protected]