Upgrading the public transport model
While Optima is up and running, it may become necessary to update only the PuT model. For example, this can be necessary when there is an update of the timetable caused by new temporary lines.
Requirements
This kind of update might be needed on a daily basis, so it is necessary to provide a way to perform this task without shutting down the system. In case there is any kind of inconsistency with the rest of the model, the procedure must stop and roll back to the initial state.
Within the Optima installation, there is a folder named PutUpdater. This folder must be on the same Windows machine where there are also TDE (for filling the database) and the new version of the model stored in Visum files (.net, .dmd, .xml). The Windows machine must be able to reach the Optima database and the Optima application server.

Before executing the update process, you need to configure the updater tool.
In the folder PutUpdater\configuration, edit the configuration file put_update.properties.
Parameter with sample setting | Description |
---|---|
psqlPath = “C:\Program Files\PostgreSQL\14\bin” | Installation path of PostgreSQL ver. 17.4 |
dbName = optima | Name of the database to be updated |
user = postgres | Name of the database user |
PGPASSWORD = postgres | Password of the database user |
hostname = 127.0.0.1 | Hostname of the database server |
serverPort = 5432 | Port number of the database server |
OPTIMA = https://<OPTIMA_HOST_IP_ADDRESS>:<PORT_NUMBER> | Address of the Optima application server |
tdeHome = “C:\optima\TDE\exec\Release\” | Folder of the executable of TDE |
OPT_USER = admin | Name of the Optima user |
OPT_PASWD = admin | Password of the Optima user |
VISUM_MODEL = “C:\optima\VisumModel\newModel” | Updated Visum model. (Do not add any filename suffixes) |

- In the PutUpdater folder, double-click the script runPutUpdate.bat.
The update process automatically performs the following actions:
-
The process checks the minimum requirements, which are:
- TDE is in the stated folder
- No configuration file for TDE is in its folder
- The Optima application server is reachable
- The process makes a dump of the PuT-related tables of the database.
- The process drops constraints on these tables.
- The process truncates these tables.
- The process runs TDE to fill the database with the new model.
- The process merges the day validities that were in the system with the new ones defined in the new model.
- The process deletes all events and transfer pointers and other missing objects, as lines are no longer in the new model.
- The process recreates all constraints except for the PuT result-related ones.
- The process calls the application server and triggers it to reload the new model from the database. Before this step, Optima has been active and responding to incoming requests with data of the old model.
- During step 9, all incoming requests remain pending until the end of the process before delivering a response.
- The process recreates the constraints on the PuT result tables.