License check policies
The license is stored during the installation process and is activated at the first run of Optima.
The default path of the license file is:
C:\optima\license\license.l4j in Windows.
Shutdown
The .Net module shuts down if the license:
-
Is not found
-
Is found, but has expired.

TRE checks the license immediately when it starts:
[INFO ]: Searching for license file ....
License file found
If the license file is found, this message appears:
[INFO ]: valid license file found
A second check is performed after importing the network:
[INFO ]: Check license for network size and bounds
If the network size is correct, a message appears:
[INFO ]: file license manager C:\optima\license\license.l4j validated the current execution
A periodic check of the license is performed every 1000 seconds and this last information is stored in the log file LogFile_TRE-A.log, only in debug mode:
[DEBUG]: file license manager C:\optima\license\license.l4j licensing thread delaying for 00:16:40 until mm/dd/yyyy hh:mm:ss
[DEBUG]: file license manager C:\optima\license\license.l4j licensing thread delaying for 00:16:40 until mm/dd/yyyy hh:mm:ss
License file not found
If the license file is not found, two warning messages are shown:
[WARN ]: file license manager C:\optima\license\license.l4j cannot find license file
[WARN ]: file license manager C:\optima\license\license.l4j license base evaluation failed
In this case the system searches for dongle license; if a valid dongle license is found, a periodic check of the license is performed every 10 seconds.
Note that the dongle license evaluation crashes without notice if the debugger is on:
[WARN ]: Dongle license evaluation will crash without notice if a debugger is attached.
Shutdown
If the license file:
- Is not found (and is not present a dongle license)
- Is found but is expired
... the TRE component shuts down.
Important: The license policies of TRE and Optima AS are completely uncorrelated. There is no communication between TRE and the AS about the license check process.

The application server checks the license for the first time 60 seconds after it has started.
Therefore, periodically checks the license every 60 minutes.
If the license check fails, the AS shuts down.

Optima Micro requires an additional license for PTV Vissim (see → Installing Optima Micro).

The messages that you receive during license check policies are managed through the file log_settings.xml.
You can change the settings of the nodes Program and ProgramBackground according to the Log4j rules.
<!-- File and console loggers-->
<logger name="Program">
<level value="ALL" />
<appender-ref ref="LogFile" />
<appender-ref ref="ConsoleAppender" />
<!--appender-ref ref="WebAppender" /-->
</logger>
<!-- File only loggers-->
<logger name="ProgramBackground">
<level value="ALL" />
<appender-ref ref="LogFile" />
<!--appender-ref ref="WebAppender" /-->
</logger>
In particular, if you set the DEBUG mode, the information related to the periodic check of the license is stored in the log file of the Optima component.
For example:
................
[INFO ]: Searching for license file ...
[DEBUG]: file license manager C:\optima\license\license.l4j use "C:\dev\ptv-optima\license\license.l4j"
[DEBUG]: file license manager C:\optima\license\license.l4j license for OPTIMA_SHORTTERMFORECAST is valid
[DEBUG]: file license manager C:\optima\license\license.l4j license for OPTIMA_REALTIMESCENARIO is valid
[DEBUG]: file license manager C:\optima\license\license.l4j license base evaluation ok
[DEBUG]: file license manager C:\optima\license\license.l4j license network size skipped since no network size given
[DEBUG]: file license manager C:\optima\license\license.l4j license network bounds skipped since no network bounds given
[INFO ]: valid license file found
[DEBUG]: licensing thread starting
[DEBUG]: License evaluated.
[DEBUG]: file license manager C:\optima\license\license.l4j licensing thread delaying for 00:16:40 until 09/18/2019 15:46:57
................