Troubleshooting & FAQ

Answers to the problems and questions that come up most often, each with a link to the page that covers it in full. Problems inside the editor have their own page, LOFT-Edit Troubleshooting.

Installation and Setup

Symptom Check Resolution
loft-sim is not recognized python -m pip show loft-sim Activate the intended environment and run python -m pip install -e ../LOFT-Sim.
loft-edit or loft-edit-launch is not recognized python -m pip show loft-edit Activate the intended environment and run python -m pip install -e . from LOFT-Edit.
import loft fails python -c "import loft; print(loft.__file__)" Install LOFT-Sim in the same environment used by LOFT-Edit.
The wrong simulator checkout is imported loft-edit doctor Remove a stale editable install or set LOFT_SIM_PATH to the intended checkout.
Setup is usable. is not reported, or the launcher says the simulator binding is not usable Read the complete loft-edit doctor output Each finding names its fix. Usually: update both repositories and reinstall both into the launcher’s environment.
Java cannot be found java -version Install Java 17+ or set JAVA_HOME/JAVA.
The launcher reports that the JOSM plugin build failed python plugin/build_plugin.py Install a JDK 17+ or set JAVA_HOME/JAVAC.
JOSM cannot be found Check the installed JOSM path Set JOSM_JAR, JOSM_HOME, or JOSM_APP.
JOSM opens without the LOFT-Edit menus Was JOSM started by a LOFT-Edit launcher? Start JOSM through a launcher; only its dedicated profile loads the plugin.
Browser viewer files are unavailable loft-sim ui status Run loft-sim ui fetch while online, or point LOFT_UI_DIR at a folder with a built viewer. Headless runs do not require the viewer bundle.

The commands with ../LOFT-Sim assume the side-by-side layout of Installation, run from the LOFT-Edit checkout. With the simulator installed alone, run python -m pip install -e . from the LOFT-Sim checkout instead.

Which Python version do I need?

Python 3.12 or newer; 3.12 and 3.13 are supported. The commands on these pages create the environment with py -3.13 on Windows and python3.13 on macOS or Linux. If only 3.12 is installed, use py -3.12 or python3.12 instead. See Create a Python environment.

Running a Simulation

A configuration is rejected when it loads

loft-sim run, batch and dump-effective-config print one line on stderr, such as loft-sim run: error: Retired simulation configuration key(s): ..., and exit with status 1. The message names the key or element and usually its replacement. A file written for an older version is the common cause: Upgrading Older Scenarios lists every retired form. Set the LOFT_DEBUG environment variable to 1 to see the full traceback; see Errors.

loft-sim validate passes, but the run fails

loft-sim validate checks the simulation configuration, the demand file and the operation strategy. It does not load the network or the additional files, so a network the loader rejects, a retired smoothing attribute, or an operation-strategy override that names an element the network does not have is reported only when a run starts. See Config Validation.

A warning says a file “exists but is NOT loaded”

A file named additional.xml, operation_strategy.xml or infrastructure.osm sits in the same folder as the simulation configuration, but the configuration does not reference it, so the run ignores it. The warning names the input key that would load it (additional_file, operation_strategy_file or infrastructure_file). When the configuration does not declare that key at all, the warning also offers the other choice: declare the key with an empty value to record that the file is deliberately unused.

Which console messages are not errors?

Saturation report (informational): ... lists quantities the models clamped during the run, and Warning: smoothed corridor '...' reaches curvature ... notes a smoothed bend that is tighter than the vehicle can fly at that corridor’s nominal speed. Both are informational; see Read the Sample Run’s Outputs.

How long does a run take?

The shipped scenarios simulate one hour. Headless on a 4-core machine, the sample scenario takes about 2 to 3 minutes and the default scenario about 4 to 7; runs take longer while other programs are busy. With the browser viewer the run plays at real time unless you raise the speed (next question). See Hello World Run.

The viewer run takes an hour

The browser viewer plays the run at real time (1x), so a one-hour scenario takes an hour unless you raise the Speed slider, up to 100x. For results only, run headless with --nogui. See The Browser Viewer.

Closing the browser tab does not stop the run

The simulation keeps running in the terminal. Press Ctrl+C there to end it. An interrupted run leaves partial output files in place of the complete ones; run the scenario again, for example headless, to regenerate them.

Port 8888 is already in use

The viewer starts at port 8888 and, if that port is taken, uses the next free one up to 8907; the run fails only when all 20 are taken. The console line Web UI + telemetry serving at ... shows the address actually used. Choose another starting port with --webui-port. See loft-sim run options.

Outputs

The run wrote no output files

A run writes only the output kinds listed in the <output> section of its simulation configuration. The default scenario’s configuration has that section commented out, so it writes nothing until you add one; the sample scenario writes six files. See Choose the Outputs.

The output files are not where I expected

A relative output path is resolved against the folder of the simulation configuration, except a path that starts with outputs/ (or output/), which is resolved against the folder that contains the loft package: the repository root in an editable install. The tutorial cases use that form. See Where output files are written.

Earlier output files were replaced

Every run of a configuration writes the same output paths, whether it runs headless, with the viewer or under an ACI script, so it replaces the files of the previous run. Copy the files away, or point a copy of the configuration at other paths, to keep them. Batch runs write each run to its own folder; see Batch Replication.

Configuration and Demand

Every flight flies the hybrid vehicle type

A <flow> row that sets no vehicle_type flies hybrid, whatever vehicle.vehicle_type in the simulation configuration says. Set vehicle_type on the flow row; vehicle parameters are set with <vType> rows. See Vehicle types.

Priority keys in the operation strategy do not change demand-file flows

priority_node_ids, medical_priority_od_node_ids and the vehicle-type keys of the strategic parameters do not change the <flow> rows of demand_config.xml: every flow gets priority_rank 0 and vehicle_type hybrid unless the row sets them. Set priority_rank or vehicle_type on the flow row. The vehicle-type keys do apply to a request made with the ACI’s aci.request.submit() that names no vehicle_type. See the Strategic Parameter Reference.

An element override is rejected, or has no effect

An element_id that matches no element is an error when the run binds the strategy to the network; check it against the node_id and corridor_id values in the network file. A <class name> that matches no element class applies to nothing without a message, so check class names for typos. An override on a corridor the loader split applies to its first piece only: add rows for the __s2, __s3, … pieces, or run Auto-Split Corridors in LOFT-Edit. See Class Defaults and Element Overrides.

A smoothing setting has no effect

additional.xml does not reject unknown sections or attributes: a misspelled smoothing attribute is ignored and its default applies. Check each name against Network Smoothing, and check that the simulation configuration lists the file in input.additional_file.

An older scenario fails to load

Keys, sections, tags and spellings from older versions are retired. Upgrading Older Scenarios lists each with its replacement, and scripts/migrate_legacy_network.py converts an older network once; see Migrate an Older Network.

ACI

An ACI call raises ACIException

An unknown ID, or an invalid value, route or state, raises ACIException, from getters and commands alike, and the rejected command changes nothing. Catch it as aci.ACIException. A positional value for a keyword-only argument, such as aci.corridor.close(corridorID, 60) instead of duration=60, raises Python’s own TypeError. See IDs and method conventions.

A request delay is rejected

aci.request.delay() and a new scheduled_departure_time must leave the departure before the end of the run, and an absolute time must be later than the request’s current schedule; otherwise ACI raises ACIException. See Override a Strategic Decision.

getDefaultDecision() returns None

The internal strategic model has not decided on that request yet, for example under DCB, or for a request submitted after a batch 4D schedule was built. A controller must handle a missing decision.

Results

My case-study numbers differ from the paper

The simulator has been corrected since the paper’s numbers were produced, so example/scenarios/case_study/ and experiments/ no longer reproduce them. To reproduce the published numbers, check out the archive/paper-reproduction branch; see Reproducing the Paper’s Numbers.

LOFT-Edit

Problems inside the editor have their own page, LOFT-Edit Troubleshooting: a JOSM jar that is not found, a plugin build that fails, a LOFT-Sim import or contract error, a project the launcher rejects, an empty imagery menu, an old enriched layer, an incomplete upload on save, a validation report that does not open, demand that does not highlight a route, a flow that uses route_id, and a missing or grey overlay. For validation findings, see Validation Rules.