Optima: configuration updates for AS and DB
It is necessary to update some Optima components to integrate PTV Optima Micro.

You must update the file /opt/ptv-optima-vv.n.xxxxptv-optima-as/standalone/configuration/optima/optima-configuration.xml by working on the <kafkaCluster> tag (see → <kafkaCluster> tag).
Through this tag you can specify the list of IP addresses or DNSs of the Optima Micro Message Broker (OMMB) servers.
Caution: The best option is to use DNSs instead of IP addresses, because DNSs have proven to be more robust and less error-prone.
Caution: OMMB must be started before Optima AS and PTV Optima Micro. If all servers of the OMMB cluster are restarted, afterwards you must also restart all Optima AS and PTV Optima Micro services on all servers.

You must update two DB tables:
- vissim_subnet
- vissim_subnet_link

It is necessary to insert in the table all the available sub-networks.
The SQL query (or at least the subnetid_code, name and shape) must be provided by the modeler.
Important: subnetid_code must be consistent with the Vissim_model folder.
Example 1
Sub-network Railway station area
insert into vissim_subnet(subnetid_code,name,shape) values (2, 'Railway station area', ST_GeomFromText('POLYGON((8.3898009301 49.0138385739,8.3910541364 49.0198321696,8.390018879 49.0206313157,8.3870947308 49.0153642165,8.3870039188 49.0140020356,8.3882026379 49.0138930612))')::polygon);
Example 2
Sub-network City Placa
insert into vissim_subnet(subnetid_code,name,shape) values (1, 'City Placa', ST_GeomFromText('POLYGON((8.3882026379 49.0138930612,8.3898009301 49.0138385739,8.3910541364 49.0198321696,8.390018879 49.0206313157,8.3870947308 49.0153642165,8.3870039188 49.0140020356,8.3882026379 49.0138930612))')::polygon);

It is necessary to insert all links of all sub-networks.
If all sub-networks stored in the table vissim_subnet are populated with a shape, then all links of all sub-networks can be inserted automatically in vissim_subnet_link with a single statement.
Example
insert into vissim_subnet_link(subnet_id,link,fnod) select subnet.id, l.idno,l.head from vissim_subnet subnet join link l on st_intersects(ST_SetSRI(subnet.shape::geometry,4326),l.shap);