Warnings and errors#
openmobisim warns when a run does something you may not expect, and refuses inputs it cannot use. Every message says what happened and what to change.
Warnings of a run#
Warning |
When |
What it says |
What to do |
|---|---|---|---|
|
Trips of the demand depart outside the simulation window |
How many trips and people (share of the demand), before or after the window, their departure times, and a window that would hold them |
Widen the window, or take the trips out of the demand. See The simulation window |
|
Trips had no alternative: no mode they may use reached their destination within the limits. They were not simulated |
How many trips and people; by class and stated mode; why, by mode offered; the places most of them are between; the option to change for each reason |
Read |
|
With |
How many trips and people, and the places most of them are between |
|
|
A run-wide coefficient ( |
Which classes keep their own value |
Set the coefficient in those classes, or accept that it applies to the other classes only |
WindowWarning, NoAlternativeWarning and FallbackWarning are exported by the package, so you can filter or catch
them:
import warnings
import openmobisim as ms
with warnings.catch_warnings():
warnings.simplefilter("error", ms.NoAlternativeWarning) # make it an error in a study script
run = scenario.run("study")
WindowWarning is shown at every run, not only the first time.
Warnings when a network is read from a table#
When |
What it means |
What to do |
|---|---|---|
Links have a |
They are treated as unclassified (one modest lane) |
Give recognised names ( |
Links name a node the node table does not have |
They are left out of the network |
Complete the node table |
Links ask for a capacity their class’s jam density cannot carry at their free-flow speed |
Their capacity is kept and their jam density raised so the fundamental diagram closes: their storage at flow levels 3 and 4 is larger than their class’s |
Give |
Errors#
An input openmobisim cannot use is refused before anything runs, with a message that names what is wrong and, where
there is a list of valid values, the list. Most are a ValueError:
Where |
What is refused |
Error |
|---|---|---|
Any option |
A misspelt name, with the list of valid names (network options when the network is read, the others when the scenario runs); an option class’s misspelt keyword where it is written. See Calibrating parameters |
|
Any option |
A value out of range: a negative time, a flag other than 0 or 1, a factor not above 0, a window that ends before it starts |
|
A method by name |
An unknown flow level, route method, route update, equilibration or choice model, with the list |
|
Trips |
A row with a latitude outside ±90, a departure that is not whole seconds after midnight, or an unknown mode, with the row’s number and the field; a demand with no trip left, for example all outside the window |
|
Traveller classes |
A row without a class, a class listed twice, an unknown column, with the row’s number |
|
Zones and matrices |
A zone listed twice; a matrix row naming a zone the zones table does not have |
|
A choice model |
A coefficient for an attribute no alternative carries, with the attributes the alternatives carry |
|
Edits |
An unknown link, line or facility, 0 lanes, a headway not above 0 ( |
|
|
A name that is not an argument of |
|
A timetable |
A feed that cannot be read, lacks a required file, or runs nothing on the chosen day |
|
A table file |
A path that does not exist |
|
A run’s folder |
A folder that already holds a run, unless |
|
|
A folder with no |
|
A starter case |
An unknown case, with the list; a file that differs from the bundle’s checksums; a case that cannot be downloaded |
|