Adding Transient Updates to GetRouteCostMatrix

What are Transient Updates?

These are changes you can make to the routing date for each request, that will not persist past that request. For instance, you can request that the server attempt to avoid all of the major road types, or change the speed of a particular point based on some criteria. Cada solicitud puede contener una o más actualizaciones. Para actualizaciones de velocidad, el valor de velocidad positivo es un aumento de velocidad y el valor de velocidad negativo es una disminución de velocidad. There are three main types of updates:

  1. Point (supports percentage, speed, speed adjustment, and exclude updates)
  2. Segment (supports percentage, speed, speed adjustment, exclude, and road type updates)
  3. Road Type (supports percentage, speed, and speed adjustment updates)

Las actualizaciones de punto son cambios que se aplican a un punto correspondiente (latitud, longitud). Para un punto en particular, puede: excluir el punto, definir la velocidad del punto o cambiar (aumentar o disminuir) la velocidad del punto en un valor o porcentaje. Las actualizaciones de segmentos son los cambios que se aplican a una ID de segmento correspondiente. Para un segmento en particular, puede: excluir el segmento, definir la velocidad del segmento, cambiar (aumentar o disminuir) la velocidad del segmento en un valor o porcentaje o cambiar el tipo de camino del segmento. Las actualizaciones de tipo de camino son cambios que se aplican al tipo de camino correspondiente. Para un tipo de camino en particular, puede: definir la velocidad del tipo de camino o cambiar (aumentar o disminuir) la velocidad del tipo de camino en un valor o porcentaje.

For more information on systax and options, see TransientUpdates in the routing schema.

The following are descriptions for the various types of updates:

Tipo de actualización

Descripción

percentage

Esta es una actualización de velocidad donde define un aumento en la velocidad del punto, ya sea especificando un porcentaje para aumentar (valor positivo) o disminuir (valor negativo) la velocidad.

velocidad

Esta es una actualización de velocidad donde define la nueva velocidad de la ID del segmento, especificando la unidad de velocidad y la nueva velocidad. Para actualizaciones de velocidad, la unidad de velocidad puede tener uno de los siguientes valores: km/h (kilómetros por hora), mph (millas por hora), mtps (metros por segundo), mtpm (metros por minuto).

speed adjustment

Esta es una actualización de velocidad donde define un cambio en la velocidad del punto, especificando el cambio en la velocidad (unidad y valor). Los valores de velocidad se pueden aumentar (valor positivo) o disminuir (valor negativo). Para actualizaciones de velocidad, la unidad de velocidad puede tener uno de los siguientes valores: km/h (kilómetros por hora), mph (millas por hora), mtps (metros por segundo), mtpm (metros por minuto).

Excluir

This is a boolean value to exclude the specified part of the route from the calculation.

tipo de camino

Este es un valor de cadena para cambiar el valor de velocidad del tipo de camino para el cálculo de la ruta.

Ejemplos

A complete cost matrix request including a point update containing a speed adjustment of 45 kph.



<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://www.mapinfo.com/routing/service/v1" xmlns:v11="http://www.mapinfo.com/midev/service/geometries/v1">
   <soapenv:Header/>
   <soapenv:Body>
      <v1:RouteCostMatrixRequest id="?" locale="?">
         <v1:StartPoints srsName="epsg:4326">
            <v11:Point srsName="epsg:4326">
               <v11:Pos>
                  <v11:X>-73.972033</v11:X>
                  <v11:Y>40.794928</v11:Y>
               </v11:Pos>
            </v11:Point>             
		</v1:StartPoints>
		<v1:EndPoints srsName="epsg:4326">
            <v11:Point srsName="">
               <v11:Pos>
                  <v11:X> -73.985617</v11:X>
                  <v11:Y>40.747</v11:Y>
               </v11:Pos>
            </v11:Point>
		</v1:EndPoints>
		<v1:DistanceUnit>Meter</v1:DistanceUnit>
		<v1:TimeUnit>Second</v1:TimeUnit>
		<v1:ReturnOptimalRoutesOnly/>
		<v1:TransientUpdates>
			<v1:PointUpdateList>
				<v1:Point srsName="epsg:4326">
				<v11:Pos>
					<v11:X>-73.985516</v11:X>
					<v11:Y>40.747157</v11:Y>
				</v11:Pos>
				</v1:Point>
                <v1:PointTypeUpdates>
					<v1:SpeedUpdate>
						<v1:SpeedAdjustment uom="KPH">45</v1:SpeedAdjustment>
					</v1:SpeedUpdate>
				</v1:PointTypeUpdates>
			</v1:PointUpdateList>
		</v1:TransientUpdates>
	   <v1:DatasetResourceName>US_NE</v1:DatasetResourceName>
	   </v1:RouteCostMatrixRequest>
   </soapenv:Body>
</soapenv:Envelope>

			

Only the TransientUpdates section of a cost matrix request including a segment update containing a decrease speed percentage change of 50.



<v1:TransientUpdates>
	<v1:SegmentUpdateList>
			<v1:SegmentID>7e3396fc:1511c75</v1:SegmentID>
			<v1:SegmentTypeUpdates>
				<v1:SpeedUpdate>
					<v1:Percentage>-50</v1:Percentage>
				</v1:SpeedUpdate>
			</v1:SegmentTypeUpdates>
	</v1:SegmentUpdateList>
</v1:TransientUpdates>

			

Only the TransientUpdates section of a cost matrix request including a road type update containing an increase speed adjustment of 13 mps.



<v1:TransientUpdates>
	<v1:RoadTypeUpdateList>
		<v1:RoadType>normal road dense urban</v1:RoadType>
		<v1:RoadTypeUpdates>
			<v1:SpeedUpdate>
				<v1:SpeedAdjustment uom="MPS">13</v1:SpeedAdjustment>
			</v1:SpeedUpdate>
		</v1:RoadTypeUpdates>
	</v1:RoadTypeUpdateList>
</v1:TransientUpdates>