Link Search Menu Expand Document

Integrate Tramola in your own MATSim code

Learn how to integrate Tramola into your customized MATSim version.

Adapt your source code

Please refer to Integrating Tramola to learn how you can add the Tramola integration library as a Maven dependency to your code, and how you need to modify your code to load and initialize the Tramola integration in your MATSim controller.

Tramola’s open-source MATSim-Integrations project provides all the necessary code and examples to integrate Tramola in MATSim.

Adapt your MATSim configuration

Then, add the following section to youf config.xml:

<module name="tramola">
    <param name="url" value="https://tramola.io" />
    <param name="apiKey" value="your-api-key" />
</module>

Adapt the URL to point to your installation (probably http://localhost:3471 if you run Tramola locally). You find your API-Key when clicking on My Profile in the left navigation, and clicking on API-Keys next.

Start your run

Now it’s time to start your run! Start it as you usually do, and it should soon show up in Tramola.

Your run in Tramola

After you have started your run, switch to Tramola and click on “Runs” in the left navigation. You should see your just-started run in the list.