Skip to content

Commit

Permalink
Fix docs, add performance report (#885)
Browse files Browse the repository at this point in the history
* ignore image map if file missing

* performance report
  • Loading branch information
jpn-- authored Aug 17, 2024
1 parent c6aa6d7 commit 084dee3
Show file tree
Hide file tree
Showing 4 changed files with 312 additions and 10 deletions.
24 changes: 14 additions & 10 deletions docs/add_image_map.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from __future__ import annotations

# rst doesn't support image maps, so we'll add one after the html has been built
import os.path

fileName = "_build/html/examples.html"
line = 'src="_images/abmexample.jpg" />'
Expand Down Expand Up @@ -37,14 +40,15 @@

print("add image map to " + fileName)

with open(fileName, encoding="utf-8") as file:
lines = file.readlines()
if os.path.exists(fileName):
with open(fileName, encoding="utf-8") as file:
lines = file.readlines()

with open(fileName, "w") as file:
for aLine in lines:
if line in aLine:
print("updated " + fileName)
file.writelines("%s" % aLine.replace(line, lineWithMap))
file.writelines("%s" % imageMap)
else:
file.writelines("%s" % aLine)
with open(fileName, "w") as file:
for aLine in lines:
if line in aLine:
print("updated " + fileName)
file.writelines("%s" % aLine.replace(line, lineWithMap))
file.writelines("%s" % imageMap)
else:
file.writelines("%s" % aLine)
2 changes: 2 additions & 0 deletions docs/users-guide/example_models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ ActivitySim.
capabilities of ActivitySim and to provide a starting point for users to build their own
models. However, they are not intended to be used as-is for policy analysis or forecasting.
A discussion of the runtime performance of the example models is available in the
:ref:`example performance benchmarking <example-performance>` section.

This page describes the structure of the MTC example model in more detail.

Expand Down
Loading

0 comments on commit 084dee3

Please sign in to comment.