Beruflich Dokumente
Kultur Dokumente
Documentation
PTV
Planung Transport
Verkehr AG
eDimaServer v1.3
Contents
1 Basics ...............................................................................................7
1.1 Installation.................................................................................7
2.4 GetDimaProfile........................................................................30
2.5 NewDima................................................................................ 33
2.7 GetDistanceMatrix.................................................................. 37
2.11 UnlockDima............................................................................ 44
3 Appendix ........................................................................................54
3.5 Support................................................................................... 69
1 Basics
1.1 Installation
To install the eDimaServer administrator rights for the operating system are
needed. Now execute eDimaServerSetup.exe. After successfully installing the
eDimaServer, the application can be started using the icon eDimaServer in the
program group eServer.
To install the eDimaServer on a server computer select standard setup. This setup
contains the documentation and the road network Europe 7 for distance calculation
functionality.
The setup program adds several links to the start menu (folder PTV eServer,
subfolder eDimaServer) and one icon to the desktop if need be. The link subtitled
“eDimaServer” starts the eDimaServer as a dialog-based application immediately
however the eDimaServer has to be installed on the system prior to the first start of
the eDimaServer as a service. There are two possible start modes here:
} automatic start on booting
} manual start by user interaction
The service can now be started and stopped manually using the control panel (link
services) or the net command. Start the eDimaServer by executing the command
net start eDimaServer in a console window and stop the eDimaServer with
net stop eDimaServer (or click the links in the start menu).
Please note that the eDimaServer does not do anything when started without
command line parameter. Therefore the eDimaServer’s directory contains a link
eDimaServerStart. Double-clicking this link will start the eDimaServer as a dialog-
based application.
When started as a service the eDimaServer runs by default in the context of a local
system account which means that the user cannot share objects, in particular file
mappings. There is an easy way to solve this problem by running the service in the
context of a valid user account. To enter the user open the control panel and then
the dialog box services. Choose the eDimaServer and click properties. In this dialog
the user name and its password for logon can be entered.
This buffer should not be too small, otherwise the load control reacts too fast to
temporary environment changes. On the other hand this buffer should not be too
large, otherwise the load control reacts too slowly to environment changes. A good
rule is to save the requests during the last five minutes, i.e. if a request takes
500 ms of CPU-time the buffer should consist of 600 entries, if a request takes only
50 ms, 6000 is a good value. Of course, this depends on the computer, but starting
with the default value of 1000 and adapting this after a test period when the
average CPU-time is known is a good strategy.
The check interval should not be greater than 60 seconds so that the eDimaServer
can react to the current situation after recalculating the average CPU-time. If the
average CPU-time is less than 500 ms the check time should be reduced to 30
seconds and even to a lesser value if a request takes less than 100 ms.
The maximum reply time now controls the number of requests accepted at the
same time. This value should be chosen so that not more than ten requests per
processor are accepted. On the other hand it should be considered that the client
does not need to wait too long. 50 ms CPU-time on a dual processor computer yield
a maximum reply time of one second, 500 ms CPU-time on the same computer
yield ten seconds, but usually ten seconds is too long a time to wait so four seconds
is probably a better value.
On checking the buffer, the average reply time is also determined, but this value is
not used for load control, it is determined for statistical reasons. What is more, for
all requests which are found to have been editing for too long (ini-file section
[General], key KillTime) a warning is written to the log file to enable
debugging.
The first requests being edited by the eDimaServer immediately after start-up need
more time than those edited later, because data has to be loaded into memory. In
order not to overload the eDimaServer by incorrectly measured reply times at this
point of time a warm-up phase is defined (ini-file section [General], key WarmUp).
This warm-up phase means that the first requests are only accepted by the
eDimaServer if a processor is idle, all other requests are rejected. No requests are
queued. The number of requests edited at the same time during the warm-up phase
is thus equal to the number of processors available. The number of requests having
to be successfully edited until the end of the warm-up phase should depend on the
number of processors and the performance of the computer. 20 requests on a
single processor computer and 50 requests on a dual processor computer should
suffice. Increase this value if problems occur after start-up.
Please note that the CPU-time measured for each request is not exact, it is just an
estimation by dividing the editing time by the number of requests edited at the same
time. Communication time for receiving the request and sending the reply remains
unconsidered as this could be delayed by network problems. Due to this way of
estimating the CPU-time this value does not mean the CPU-time per processor but
the CPU-time for all processors. This means that when editing only single requests
on a computer with more than one processor the CPU-time displayed is too high.
Dividing this value by the number of processors yields the capacity of the
eDimaServer at high load.
The basic settings of the eDimaServer are executed in the section [General] in
the eDimaServer.ini.
[General]
Wait=0
Port=1515
KeepAlivePort=2425
TimeOut=10
ThreadBufferSize=1000
MaximumAnswerTime=10
Processors=1
WarmUp=20
CheckTime=30
KillTime=600
TempPath=C:\eDimaServer\Temp\
Wait determines the time in seconds to wait before starting the eDimaServer. The
default value is zero seconds. This is useful when the eDimaServer is supposed to
be started after other applications. The IP-address of the computer on which the
eDimaServer runs is determined by the server. However, the controlling port is to
be entered in the ini-file under Port. If the port is not entered, the default port is
used.
With TimeOut it is defined how long (in seconds) the server should wait for a
request after the connection setup. This time is also used as timeout when sending
replies. The default value here is 10 seconds.
The size of the buffer which saves all current and ended request threads is set with
ThreadBufferSize, at usually quite a high value, to prevent buffer overflow
problems. The default value is 1000. The ended thread information is required to
define the average reply time and the average CPU time of a request. The greater
this buffer is, the greater is the time, over which the average is defined, as the
buffer is overwritten when it is full.
In order to prevent a server from overloading, the maximal reply time must be set
with MaximumAnswerTime in such a way that all requests are rejected, whose
forecasted reply time exceeds this time in seconds. The default value is 10 but
should be set to a lesser value such as one or two seconds. Do not assign a too
high value, otherwise the server edits too many requests simultaneously and the
user has to wait a long time for the reply. Increasing this value does not increase
the throughput i.e. the number of per hour, this value just manages a simple way of
load balancing.
CheckTime defines after how many seconds the average reply time and the
average CPU time per request are determined and all current threads are checked.
The default value is 30 seconds.
If a request’s running time exceeds KillTime, a warning is written to the log file so
that an administrator can check whether this is to be fixed or not. The default value
is 60 seconds. This value has to be much higher than MaximumAnswerTime in
order not to warn of requests which users are waiting for.
The section [Logging] sets the initial parameters of the eDimaServer logging
mechanism.
[Logging]
Window=0
File=0
FilePath=C:\eDimaServer\Log\
FileRename=720
FileKeepLast=-1
UDP=-1
UDP-Address=127.0.0.1:514
TCP=-1
TCP-Address=127.0.0.1:514
LogRequestsNonMRFormat=1
LogResponsesNonMRFormat=0
LogRequestsMRFormat=1
LogResponsesMRFormat=1
All logging media, i.e. Window, File, UDP and TCP can be disabled by assigning
the value –1 or enabled by assigning a value greater than or equal to 0. The latter
value controls whether or not the log-output contains extended debug information.
Set this value to
} 0 to see information on finished requests and error messages only
} 50 to additionally display important steps while editing the request
} 200 to display these steps in full detail
} 300 to display debug information
} 9999 to create machine-readable information
The log window needs quite a considerable part of the available computer time for
scrolling the contents, provided it is not minimised. Therefore it is highly
recommended to minimise it immediately after starting the eDimaServer.
In order not to obtain too large log files they must automatically be renamed after a
certain time which is entered under FileRename in minutes. Default is 720 minutes
which is 12 hours. The time entered is rounded up to a value divisible by 5. A
timestamp (e.g. 200012011200 for 12 o’clock on December 1st, 2000) is always
inserted at the beginning of the filename. All log files can be found under the path
specified by FilePath, default path is the current path.
The number of log files can be limited to the number given under FileKeepLast.
If 0 is given, none of the renamed log files is kept, if –1 is given (default), all of them
are kept. Any other positive number is a valid parameter. When decreasing this
value in the ini-file the oldest log files kept by previous starts of the application are
deleted up to the current number of log files to be kept.
If logging via UDP is enabled, the server-address and the port have to be set under
UDP-Address, for TCP logging under TCP-Address.
In order to locate errors the machine-readable information can contain both the
request string and the response string of each request. Set
LogRequestsMRFormat or LogResponsesMRFormat to 1 to obtain the
respective strings or set them to 0 to suppress them in order to keep the log-files
smaller. For the non-machine-readable format (detail level 0 to 300) request and
response strings can be suppressed or activated using
LogRequestsNonMRFormat and LogResponsesNonMRFormat.
Please note that this setting is valid for all media receiving machine-readable
information or non-machine-readable, respectively. Please note also that the old
names FileWindowLogRequests and UDPLogRequests have been replaced by
the new names LogRequestsNonMRFormat and LogRequestsMRFormat as the
printing of request and response strings do not depend on the media used but
instead on the log format, namely machine-readable or non-machine-readable.
To avoid specifying all parameters in every request, default values for the
unspecified parameters can be defined. This set of default values is called a profile.
As different users may require different sets of default values it is possible to define
several profiles and attach them to a set of users which are allowed to use them.
The section [Profiles] defines the profiles by linking the profile name to an ini-
file which contains the default values to be set when this profile is selected.
[Profiles]
Default=C:\eDimaServer\Profiles\Default.ini
Special=C:\eDimaServer\Profiles\Special.ini
VerySpecial=C:\eDimaServer\Profiles\VerySpecial.ini
The first entry in this section must always define the profile called “Default”
otherwise the eDimaServer does not start properly.
[UserProfiles]
Dilbert=Special
Dilbert=Default
Dogbert=VerySpecial
In this case user Dilbert is allowed to use the profiles “Special” and “Default” but not
the profile “VerySpecial”. User Dogbert instead is only allowed to use the profile
“VerySpecial”. Any other user which is not stated in this table is automatically
assigned the profile “Default”.
The topmost entry of a user defines the profile to be used whenever no different
profile is explicitly selected . This means that whenever user Dilbert sends a
request the profile “Special” is used unless he explicitly states that he wants to use
the profile “Default”. In contrast to this user Dogbert is automatically assigned the
profile “VerySpecial”. He is not allowed to choose any other profile.
Each profile ini-file must define all below stated parameters, otherwise the
eDimaServer does not start properly. The parameters are not explained in detail
here. Please refer to the description of the request formats. The parameter names
are the same as attribute names. Boolean parameters always take 0 as false and 1
as true.
All of the profile ini-files defined in the section [Profiles] look like this:
[Coordinates]
Format=Mercator
[NewDimaParams]
Speed1=75
Speed2=65
Speed3=60
Speed4=45
Speed5=42
Speed6=40
Speed7=40
Speed8=35
Speed9=30
Speed10=30
Speed11=20
Speed12=15
Speed13=1
Speed14=1
Speed15=10
Speed16=0
HighwayLinkRad=5
HazardousGoodsType=0
Net=Berlin
MaxLocCount=4096
Optimisation=90
RoutingType=1:n
[GetDistanceMatrixParams]
OutputFormat=Windows
OutputType=XMLResponse
DirectDistance=false
[DimaCtrl]
DLL=C:\eDimaServer\Dima\DimaCtrl.dll
The section [NetFiles] defines the road networks by linking symbolic names to
files which contain road networks binary data.
[NetFiles]
Berlin=C:\eDimaServer\Net\Berlin.D50
Europe=C:\eDimaServer\Net\Europe.D50
1.5 Logging
The textual information, the detail-level of which can be controlled in the ini-file, is
Each request is logged with as much information as possible to help finding errors.
The log entry looks like this (request and reply string can be deactivated in the ini-
file):
whereby <Mode> contains information on whether the request has been received in
XML and / or via HTTP. The ID can be set by the client and is printed to the log file
in order to make it easier to locate specific requests. Statistics contains the same
statistical information as below:
This statistical information covers all finished requests in the buffer but not the
current one. This is why <Active requests> is always greater than zero as the
current request is currently active. CPU time and reply time of the current request
are not considered.
This information can also help to find out whether a request has been rejected. In
general this happens if (<1> + 1) * <2>, i.e. the number of currently active requests
plus 1 multiplied with the current average CPU time, is greater than the maximum
reply time set in the ini-file. If all statistical values are 0, the number of currently
edited requests exceeded an absolute maximum of 20.
Whenever a request exceeds the ini-file entry KillTime the following message is
written to the log file at every checkup until finished:
When closing the eDimaServer status and statistical information is printed to the log
media:
See the section on the status request for more details on this status information.
<Action>;<Year>-<Month>-<Day>;<Hour>:<Minute>:<Second>;
<Server's IP address>:<Port>;<Server type>;<Action params>
The <Action> identifies the context in which the logging string has been created.
These actions are:
} 0: a request has been edited (successfully or not)
} 1: the eDimaServer has been started successfully
} 2: the eDimaServer has been closed
} 3: an error occured while starting the eDimaServer
} 4: a request exceeded KillTime
<Request string> and <Reply string> can be empty when switched off in
the ini-file.
The <Action params> of action 1 are empty whereas they contain status and
statistical information for action 2:
<Requests used>;<CPUMin>;<CPUAverage>;<CPUMax>;
<CPU25>;<CPU50>;<CPU75>;<ReplyMin>;<ReplyAverage>;<ReplyMax>;
<Reply25>;<Reply50>;<Reply75>
The <Action params> of action 4 only contain the <Request number> of the
request whose running time exceeded KillTime.
In this chapter, the possible request types and formats are described in detail. What
is more, not every request type supports both request formats. Please refer to the
respective request type section to find out which formats are supported.
2.1 Basics
Both requests and replies must always be character strings. They are not limited in
length, however the length of the string must always be sent in advance as binary
DWORD. DWORD means 4 bytes in the sequence LOWORD, HIWORD, these in
turn, in the sequence LOBYTE, HIBYTE.
As an example, to send the string “ABC” with three bytes in length, first send the
binary values 3, 0, 0, 0 and then the ANSI codes of the characters A, B, and C
which are 65, 66, and 67. To send the length 257, send the binary values 1, 1, 0, 0.
Be careful to always send the length values as binary values instead of the ANSI
codes of 1, 1, 0, 0. On sending the ANSI codes the eDimaServer receives the
binary values 49, 49, 48, 48 which equals the length value 808464689. In this case
an “out of memory” error is stated in the log-file.
For testing the correctness of the bytes sent the ManualClient and the
eServerListener decribed in the appendix can be used.
DO NOT treat these binary values as strings, as the value 0 is used as string-
terminator and is thus not processed. This results in “out of memory” errors, too.
Provided the connection is open, a status request can be created and sent in C++
as follows:
// send buffer
send(sock, buffer, length + 4);
The proprietary request string, the character encoding of which must be ANSI,
contains different types of information which are separated from each other by the
following separator characters which are sorted in levels
1. ¦ ANSI character 0166
2. ¤ ANSI character 0164
3. · ANSI character 0183
4. ¶ ANSI character 0182
5. ¥ ANSI character 0165
The separator of the whole request string is therefore ¦. The thus separated
sections are in turn separated by ¤ etc.
<Request type>¦<Version>¦<User>¦<Password>¦<Parameters>
whereby <User> contains the user name and optionally the profile to be used and
a request ID which can be used for debugging purposes as it is printed to the log
file and enables the user to assign the request to a client. Therefore <User> is built
up as follows:
<UserName>[¤<Profile>¤<ID>]
Any reply from the eDimaServer is also sent as a string as described above:
<Status code>¦<Reply>
whereby <Reply> may also be empty (the preceding separator is not omitted). The
reply may consist not only of a reply string but instead of a string plus additional
data such as an image. Like the string, this additional data is again preceded by its
length in binary form and is sent straight after the reply string.
When using XML request strings the different types of information are structured by
tags such as <Request> and </Request>. To understand the following
documentation a basic knowledge of the XML standard is required. Please refer to
the standardization documents of the World Wide Web Consortium
(http://www.w3.org/XML/) for comprehensive information on the XML standard and
on XML schemas. Please note that only the encodings UTF-8 and ISO-8859-1
(Latin-1) are supported, all other encodings will be rejected. It is highly
recommended to specify the encoding used with
Each XML request as well as each XML response is based on an XML schema
which is described in the respective section. Any request received by the
eDimaServer is validated against its schema, any response sent conforms to its
schema and can be validated by the client.
The schemas are regularly updated and amended to meet the latest requirements.
These amendments always make sure that all XML strings which were formerly
valid will still be valid in future. Therefore the XML schemas are not kept very
restrictive. What is more, elements and attributes usually are optional even though
they are required in order to be able allow a differently formatted XML string without
invalidiating the older formats. This documentation describes all further restrictions
when using this version of eDimaServer.
An incoming request is then validated in two steps. First, the XML string is validated
against its schema, then it is validated against the further restrictions described in
this documentation. The first validation step yields only error code 903 which means
that the validation process failed. Further descriptions are not provided. Tools such
as XML Spy can be used to locate the error. The second validation step yields more
descriptive error messages stating which restriction has been violated.
Basic type and element definitions are not repeated in each schema but defined in
basic schemas which are included by each request and response schema. Basic
definitions common to all eServers take place in eServerTypes.xsd, whereas
definitions common to all request or response types of the eDimaServer take place
in eDimaServerTypes.xsd.
These basic schemas do not only define types but also elements which are
referenced in the request and response schemas. This means that there are
different elements which are valid root elements for the instance document, but for
a valid request the root element must be <Request>. In a response the root
element is <Response>.
Types which are used by more than one element, i.e. those defined globally in
eServerTypes.xsd or eDimaServerTypes.xsd are described in a separate
section at the end of this chapter. Please note that the descriptions of these types
are not always explicitly referenced. Elements which are used more than once are
also defined globally and described in the same way as the global types above.
Any reply from the eDimaServer is also sent as an XML string as described above:
The attribute Descr is optional and only given if the request could not be executed
successfully.
Parameters of request or response are child elements of the root types <Request>
or <Response> respectively, indicated by “...” above. Please note that responses
to unsuccessful requests do not have any child elements.
http://xml.ptv.de/eServer/eServer.Neutral.Response.xsd
http://xml.ptv.de/eServer/doc/eServer.Neutral.Response.doc
http://xml.ptv.de/eServer/html/eServer.Neutral.Response.html
http://xml.ptv.de/eServer/examples/eServer.Neutral.Response.xml
is generated which does not carry the attributes Type and Version.
diagram
This is mainly the case if the request received is not well-formed (error code 902)
which is a basic violation against the XML specification, if the request type is
unknown (error code 8), if a communication error occurs (error code 5), or if the
eDimaServer rejects the request due to overloading (error code 2).
2.1.4 HTTP-tunnelling
<CRLF> means sending carriage return and line feed or “\r\n” or ANSI characters
13 and 10. <IP address> contains the IP adress of the eDimaServer in dotted-
decimal form without the port. The http header contains the length of the actual
message in decimal form. The actual message is the same data which is sent using
raw communication, i.e. four bytes request length in binary form plus the request
string. Thus, the message length is always the length of the request string plus four.
The reply length consits of the length of the reply string plus four plus the length
of the <Additional reply data> such as an image.
2.1.5 Notation
In this description parameters which are to be filled with information are identified
by variable names, whereby these variable names exist between < and > in the
description of request strings in the proprietary format. When describing XML
request strings these variable names have the same meaning but are printed
without < and > in bold face to avoid confusion with the XML entities < and >. The
possible values of the variables are then described afterwards. Mostly the variable
names can be found as attribute or element names in the XML description when the
XML format is described by an XML schema.
Such a variable can also be a place holder for strings, which contain separators for
a higher level and in turn variables or XML string fragments. Variables may also
remain empty, i.e. the separators before and after the empty variable follow each
other directly. Spaces and new rows do not exist between variables and separators,
however they are allowed as parameter.
The following explanations concern only the proprietary request format as these
Binary variables always contain 0 for false and 1 for true. Number parameters
usually contain signed integer values unless stated otherwise. String parameters
may contain any character including control characters, new lines, and spaces but
none of the separators.
Whenever the number of items of one category is not fixed, they are enumerated.
This is marked as follows:
To find out how many items are given in a reply simply count the separators starting
with the one after the first item – in this case ¤ – and add 1. This is possible as
these enumerations are not followed directly by information containing the same
separator.
In most cases the number of items is also given to verify that the string is correct.
To describe the format of one single item a variable such as <Item i> is used.
This means that any of the n items is built up as <Item i>.
When n equals 0, there is no item at all, the list of items remains empty.
There are two different strategies in which parameters of a request can be given.
First, all paramters must be given. Optional parameters are placed at the end of the
request string and can be omitted. In this case, the position of a parameter is fixed
and with this the meaning of the value.
<A>¦<B>¦<C> → a¦b¦c
When there is more than one optional parameter and one of them is to be omitted,
but one standing behind this is to be given, it is not possible to omit it. The default
value must be given in this case.
In most cases it is possible to leave the parameter to be omitted empty and to send
a¦¦c in this case.
Second, all parameters are optional. As there is no fixed position in a request string,
the values must be identified by tokens. That is, there is a parameter list of the form
<Token>¤<Value> or <Token>·<Value>
Token and value are thus separated by a separator either of the same level or of
one level higher. The request string from the example above using this strategy
could be empty if none of the three parameters is to be given, or
Furthermore, the parameters can also be exchanged, the order does not matter.
Consequently,
When omitting optional parameters their default values are used automatically in
both strategies. These default values are taken from the profile used (see section
on the ini-file).
The eDimaServer’s task is to efficiently calculate, save and show the distances and
travelling times between locations.
In order to perform this task, the following objects are included in eDimaServer:
► Dima:
A dima consits of the objets
► Profile for calculating distances,
► a number of locations
► and the distance table: Distances and travelling times between all
locations
► Profile:
A profile consists of the distance calculation settings, e.g. network, speed
configuration and parameters for the route search.
► Location:
A location is a geographical point. The position is described using X and Y co-
ordinates.
► Distance table:
A distance table contains the distances and travelling times between all
locations included in the Dima. These data are persistent and can be
extended with distances and travelling times between further locations if
required.
► Distance matrix:
A distance matrix is generated using a distance table. This makes the
eDimaServer client available for other, direct applications. It consists of
distances and travelling times between the specified locations. The following
cases may occur:
► no distance table is available: the eDimaServer first generates the
corresponding distance table.
► not all the locations entered are contained in the distance table: the
eDimaServer extends the distance table with the new locations.
► The entered locations are a part of the locations contained in the Dima:
the distance matrix is generated using the distance table.
Furthermore, a status request type is also provided in order to check the current
status of the eDimaServer (see the status request section).
Please note: The default values for most here mentioned optional parameters are
defined in the user profile used (see section 1.4.2).
Item count attributes are always optional but they should be be provided by the
calling application if the number of items specified is known. If it is not known the
eDimaServer will count the items. If specified it must equal the number of items
which will save performance as the number of items needs not be determined. In
the response the item count attributes are always provided by the eDimaServer.
2.4 GetDimaProfile
The request GetDimaProfile contains the profile of the specified Dima, or the
profile of all existing Dimas.
children Dima
The element Dima defines the Dima of the requested profile. If the element Dima is
not entered, the profiles of all existing Dimas are returned.
element Dima
diagram
The attribute DimaID identifies a certain Dima using its unique ID.
children DimaProfiles
If the request has been successfully performed, the element DimaProfiles contains
the requested Dima profile.
element DimaProfiles
diagram
children DimaProfile
type DimaProfileType
children Item
annotation documentation: Specifies the speed profile to be used for distance calculation
The element Item contains the speed settings for a certain street type.
element Options
diagram
The element Options defines additional settings for the route search.
► HighwayLinkRad: maximum radius around a location within which a
connection of the location to an edge in the binary network, which
corresponds to a street type “motorway”, may be performed.
► HazardousGoodsType: Hazardous goods classification for blocking streets
in the route search. The classification results from the sum of the following
values:
► 1 for trucks
► 2 for trucks with more than 24t
► 4 for hazardous goods transportation
► 8 for water-contaminating goods
► 16 for streets which apply to §§ 7/7a of the German GGVS
The use of the block types 2, 4, 8 and 16 require special network preparation.
2.5 NewDima
children DimaProfile
The element DimaProfile contains the settings for the Dima profile (see Element
DimaProfile)
If the request could not be successfully answered, the attribute Status contains the
error code and the attribute Descr contains a description of the error.
2.6 GetDistance
The Request GetDistance returns the distances between the denoted locations.
The element co-ordinates describes the location co-ordinate format used. Detailed
information on the type CoordFormatEnum can be found in the eRouteServer
documentation.
The settings for providing the requested distances are contained in the element
Options.
In the element Locations the locations, for which distances were requested, are
transferred. If the sequence contains more than two locations the distances
between every pair of following locations is returned.
element Options
diagram
The element Options defines the settings for the requested distances.
► DimaID: unique ID for the Dima.
► DistanceType: three types of distances can be requested:
► Road: distances from the distance table
► Direct: geometric distances
► RefPoint: distances calculated via reference points, i.e. the
eDimaServer searches the nearest neighbour location in the distance
table for each denoted location and calculates approximated distances.
type LocationsType
children Location
type PointType
children Distance
If the request could not be successfully answered, the attribute Status contains the
error code and the attribute Descr contains a description of the error.
element Distance
diagram
children DistPeriod
The attributes TotalDistance and TotalPeriod contain the sum of all distances and
periods between the denoted locations. DistPeriodCount gives the count of single
distances.
element DistPeriod
diagram
2.7 GetDistanceMatrix
diagram
The element co-ordinates describes the location co-ordinate format used. Detailed
information on the type CoordFormatEnum can be found in the eRouteServer
documentation.
The settings for providing the requested distance matrix are contained in the
element Options.
In the element Locations the locations, for which a distance matrix was requested,
are transferred.
element Options
diagram
The element Options defines the settings for preparing a distance matrix.
► DimaID: unique ID for the Dima.
► OutputFormat: defines the binary data format in which the distance matrix is
prepared (Little-Endian / Big-Endian).
► OutputType: decides if the distance matrix is returned in the response
(XMLResponse) or is stored as file (File).
► OutputFileName: contains the file names of the distance matrix if they are
stored as file.
type LocationsType
children Location
type PointType
children DistanceMatrix
If the request could not be successfully answered, the attribute Status contains the
error code and the attribute Descr contains a description of the error.
The individual distances in meters and travelling time in minutes are stored in the
distance matrix as follows:
► The distance Dij (in meter) and the travelling time Tij (in minutes) between
the locations Li and L j are each saved in a 4 byte integer value. The tuple
from distance and travelling time is referred to as DTij .
► The tuples DTij for i = 1,..., n (number of locations) and j = 1,..., n are
saved linearly.
► For example: A distance matrix consists of the distances and travelling times
between 3 locations is saved as follows:
DT11 , DT12 , DT13 , DT21 , DT22 , DT23 , DT31 , DT32 , DT33 .
element DistanceMatrix
diagram
2.8 CalcDistanceTable
diagram
The element Coordinates describes the location co-ordinate format used. Detailed
information on the type CoordFormatEnum can be found in the eRouteServer
documentation.
The settings for providing the requested distance table are contained in the element
Options.
In the element Locations the locations, for which a distance table was requested,
are transferred.
element Options
diagram
The element Options defines the settings for preparing a distance matrix.
► DimaID: unique ID for the Dima.
► New: decides if an existing distance table is extended (false) or deleted (true).
element Locations
diagram
type LocationsType
children Location
type PointType
If the request could not be successfully answered, the attribute Status contains the
error code and the attribute Descr contains a description of the error.
2.9 DeleteDistanceTable
The distance table for the Dima entered is deleted by the request
DeleteDistanceTable.
diagram
children Dima
The element Dima identifies the Dima whose distance table should be deleted in
the eDimaServer.
If the request could not be successfully answered, the attribute Status contains the
error code and the attribute Descr contains a description of the error.
2.10 DeleteDima
The request DeleteDima deletes the profile and the distance table for the specified
Dima in the eDimaServer.
diagram
children Dima
If the request could not be successfully answered, the attribute Status contains the
error code and the attribute Descr contains a description of the error.
2.11 UnlockDima
children Dima
If the request could not be successfully answered, the attribute Status contains the
error code and the attribute Descr contains a description of the error.
2.12 DimaCalcProgress
children Dima
Version xsd:string 1
User xsd:string required
Pwd xsd:string required
Profile xsd:string optional
ID xsd:string optional
annotation documentation: DimaCalcProgress request version 1.
The element Dima identifies the Dima whose calculation progress is requested.
children CalcProgress
If the request could not be successfully answered, the attribute Status contains the
error code and the attribute Descr contains a description of the error.
element CalcProgress
diagram
The element Coordinates specifies the co-ordinate format which is used in the
request and is to be used in the response.
diagram
The co-ordinate format is specified using a string defined by the simple type
CoordinateFormatEnum.
type restriction of xsd:string
children Pnt
</xsd:complexType>
The attribute PntCount is optional, but if it exists it must contain exactly the number
of child elements Pnt. It is highly recommended to specify this attribute if possible
because counting the number of child elements consumes processor time. When
used in a response, this attribute does always exist.
children Rect
The attribute RectCount is optional, but if it exists it must contain exactly the
number of child elements Rect. It is highly recommended to specify this attribute if
possible because counting the number of child elements consumes processor time.
When used in a response, this attribute does always exist.
annotation documentation Defines a rectangle given by the co-ordinates of the top-left and the bottom-right
corner.
children Seg
The attribute SegCount is optional, but if it exists it must contain exactly the
number of child elements Seg. It is highly recommended to specify this attribute if
possible because counting the number of child elements consumes processor time.
When used in a response, this attribute does always exist.
children Pnt
annotation documentation Defines a segment given by its id and its co-ordinates of type PointType.
The attribute PntCount is optional, but if it exists it must contain exactly the number
of child elements Pnt. It is highly recommended to specify this attribute if possible
because counting the number of child elements consumes processor time. When
used in a response, this attribute does always exist.
Whenever specifying a percent value, i.e. an integer between 0 and 100, the simple
type PercentValueType Schema eDima.DimaCalcProgress.Response.v1.xsd
is to be used.
type restriction of xsd:unsignedLong
facets minInclusive 0
maxInclusive 100
annotation documentation Defines a percent value, i.e. an integer value from 0 to 100.
children List
annotation documentation Defines a list of integer values separated by whitespaces including an attribute
containing the number of values in the list.
The simple type ListOfLong provides a simple whitespace separated list of integer
values without an information on how many they are.
type list of xsd:long
In order to sort result lists, the sorting order, i.e. Ascending or Descending, can be
specified using the simple type SortOrderEnum.
type restriction of xsd:string
annotation documentation Enumerates the sort order values, i.e. how to sort results.
3 Appendix
0 Error-free editing
1 Unknown or not further specified error
2 eServer overloaded, request rejected
3 eServer is not attainable
4 eServer does not respond
5 Connection error in eServer
6 Connection error in request object
7 Could not send response string / file
8 Invalid request type
9 False password or user name
Tab. 1: Communication errors and other errors
</xsd:element>
</xsd:sequence>
<xsd:attribute name="Type" type="RequestTypeEnum" fixed="eDima.DeleteDistanceTable"/>
<xsd:attribute name="Version" type="xsd:string" fixed="1"/>
<xsd:attribute name="User" type="xsd:string" use="required"/>
<xsd:attribute name="Pwd" type="xsd:string" use="required"/>
<xsd:attribute name="Profile" type="xsd:string" use="optional"/>
<xsd:attribute name="ID" type="xsd:string" use="optional"/>
</xsd:complexType>
</xsd:element>
</xsd:element>
3.2.19.1 DimaProfileType
source <xsd:complexType name="DimaProfileType">
<xsd:annotation>
<xsd:documentation>Defines a Dima profile.</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="SpeedProfile" minOccurs="0">
<xsd:annotation>
<xsd:documentation>Specifies the speed profile to be used for distance
calculation</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Item" minOccurs="16" maxOccurs="16">
<xsd:complexType>
<xsd:attribute name="Speed" type="xsd:unsignedLong" use="required"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Options" minOccurs="0">
<xsd:annotation>
<xsd:documentation>Specifies the options which influence the distance
calculation.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:attribute name="HighwayLinkRad" type="xsd:long" use="optional"/>
3.2.19.2 LocationType
source <xsd:complexType name="LocationsType">
<xsd:annotation>
<xsd:documentation>Defines a sequence of locations (type PointType).</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="Location" type="PointType" minOccurs="2" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="LocCount" type="xsd:unsignedLong" use="optional"/>
</xsd:complexType>
3.2.19.3 DistPeriodType
source <xsd:complexType name="DistPeriodType">
<xsd:annotation>
<xsd:documentation>Defines a distance and a period between two
locations.</xsd:documentation>
</xsd:annotation>
<xsd:attribute name="Distance" type="xsd:long" use="required"/>
<xsd:attribute name="Period" type="xsd:long" use="required"/>
</xsd:complexType>
3.2.19.4 OutputFormatEnum
source <xsd:simpleType name="OutputFormatEnum">
<xsd:annotation>
<xsd:documentation>Enumerates the output format values.</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Little-Endian"/>
<xsd:enumeration value="Big-Endian"/>
</xsd:restriction>
</xsd:simpleType>
3.2.19.5 OutputTypeEnum
source <xsd:simpleType name="OutputTypeEnum">
<xsd:annotation>
<xsd:documentation>Enumerates the output type values.</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="XMLResponse"/>
<xsd:enumeration value="File"/>
</xsd:restriction>
</xsd:simpleType>
3.2.19.6 DistanceTypeEnum
source <xsd:simpleType name="DistanceTypeEnum">
<xsd:annotation>
<xsd:documentation>Enumerates the distance type values.</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Road"/>
<xsd:enumeration value="Direct"/>
<xsd:enumeration value="RefPoint"/>
</xsd:restriction>
</xsd:simpleType>
3.2.19.7 RoutingTypeEnum
source <xsd:simpleType name="RoutingTypeEnum">
<xsd:annotation>
<xsd:documentation>Enumerates the routing type values.</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="1:n"/>
<xsd:enumeration value="1:1"/>
</xsd:restriction>
</xsd:simpleType>
3.2.19.8 CalcActionEnum
source <xsd:simpleType name="CalcActionEnum">
<xsd:annotation>
<xsd:documentation>Enumerates the dima calculation action</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="LinkLocations"/>
<xsd:enumeration value="Routing"/>
</xsd:restriction>
</xsd:simpleType>
3.3 Troubleshooting
This section summarizes some cases where mistakes can easily be made and thus
cause unintended eDimaServer behaviour.
Sometimes it is difficult to make sure that the connection between client and server
works due to the presence of a proxy server or a firewall in this connection. These
computers might amend the requests sent to the server or might be configured
incorrectly.
3.4.1 ManualClient
In order not to have to enter the same request string all the time, three templates
can be defined in the ini-file as well as the default IP address. The standard ini-file
looks like this:
[General]
IP=127.0.0.1:1509
[Templates]
Template1=MapRequest¦1¦¦¦
Template2=LocateRequest¦1¦¦¦
Template3=StatusRequest¦1¦¦¦
The IP address can be entered in the same format as for the request object, i.e. an
H or a D can be appended to the port in order to override the rule to use HTTP only
when port 80 is selected.
The length of the request string is always displayed to the right of the request string
in order to check whether the server receives correct length information. Some
requests require a file to be received after receiving the reply string. Check
“Receive file” in this case. The received file is saved under the filename
“Received.File”. The reply string itself can also be written to a file when checking
“Write to file” and entering a valid path and filename.
Sometimes it is easier to edit the request to be sent in an editor and to read it from
a file. Check the respective check box and enter the file name. Please note that the
request length is then updated after clicking the send button.
If it is necessary to test the connection in general, the string can also be sent as it is
without length information. Click “send raw” to activate this modus.
3.4.2 eServerListener
The eServerListener listens to a specified port and prints the data received on the
screen as well as into the log file eServerListener.log.
The default port to be listened to is port 80. In order to specify a different port use
the command line option -p<Port>, e.g. type
eServerListener -p1508
The data printed is exactly the request string an eServer would receive. The HTTP-
header, if any, is not printed. The four length bytes are not printed either but stated
in an extra line. This is useful for testing the byte order.
---------------------------------------------
Received 11.12.2000 at 11:56:28:
From 127.0.0.1
Length: 18 (Bytes: 18 - 0 - 0 - 0)
---------------------------------------------
StatusRequest¦1¦¦¦
From 127.0.0.1
Length: 18 (Bytes: 18 - 0 - 0 - 0)
---------------------------------------------
StatusRequest¦1¦¦¦
The four length bytes are helpful in solving problems when sending length
information. The following request shows invalid length information:
---------------------------------------------
Received 11.12.2000 at 11:56:17:
From 127.0.0.1
Length: 1952543827 (Bytes: 83 - 116 - 97 - 116)
---------------------------------------------
Not enough storage is available to complete this operation.
In order to print all bytes received, use the command line option -raw, i.e. start the
eServerListener with
eServerListener -raw
to print all bytes received. This is useful for testing whether the data sent has been
modified by a firewall or proxy server.
If the connection is not closed by the sender immediately after sending, the
eServerListener waits one second for more data after receiving the last byte. This
timeout can be changed using the command line option -t<TimeOut>. To print all
bytes received with a timeout of 10 seconds start the eServerListener with
When using this raw mode the three requests above yield the following output:
---------------------------------------------
Received 11.12.2000 at 12:58:35:
From 127.0.0.1
Length: 22
---------------------------------------------
12 00 00 00 53 74 61 74 75 73 52 65 71 75 65 73 74 A4 31 A1 StatusRequest¦1¦
A1 A1 ¦¦
---------------------------------------------
Received 11.12.2000 at 12:58:41:
From 127.0.0.1
Length: 116
---------------------------------------------
50 4F 53 54 20 68 74 74 70 3A 2F 2F 31 32 37 2E 30 2E 30 2E POST http://127.0.0.
31 20 48 54 54 50 2F 31 2E 30 0D 0A 43 6F 6E 74 65 6E 74 2D 1 HTTP/1.0 Content-
54 79 70 65 3A 20 61 70 70 6C 69 63 61 74 69 6F 6E 2F 6F 63 Type: application/oc
74 65 74 2D 73 74 72 65 61 6D 0D 0A 43 6F 6E 74 65 6E 74 2D tet-stream Content-
4C 65 6E 67 74 68 3A 20 32 32 0D 0A 0D 0A 12 00 00 00 53 74 Length: 22 St
61 74 75 73 52 65 71 75 65 73 74 A4 31 A1 A1 A1 atusRequest¦1¦¦¦
---------------------------------------------
Received 11.12.2000 at 12:58:47:
From 127.0.0.1
Length: 18
---------------------------------------------
53 74 61 74 75 73 52 65 71 75 65 73 74 A4 31 A1 A1 A1 StatusRequest¦1¦¦¦
3.5 Support
eServer.Support@ptv.de
Please begin the subject line with “eDimaServer: ” and describe your problem as
detailed as possible. Please always include examples and extracts from the logfile
to isolate the problem. Be aware that we have to understand your situation
completely in order to be able to solve the problem.
Of course, we are also happy to receive feedback including error reports and
suggestions for improvement via this e-mail address.
3.6 Acknowledgement