Page 1 of 1

How to use profiles (contraction hierarchies) in createDima

Posted: Thu Sep 10, 2015 4:46 pm
by metin.kahraman
Dear forum users,

I am looking for a way to specify an existing profile upon creation of a new DIMA. Unfortunately I cannot figure out how to do this according to the API documentation. It says the createDima operation takes two parameters:

1. dimaID
2. dimaProfile

The DimaProfile itself consists of lots of attribute I can configure within a profile file, but I don't see any attribute for specifiying an existing profile. The only "String"-parameter that might make sense is description. However this is only meant to be an annotation, isn't it ?

Is there any way to do this ?

Regards

Metin Kahraman

metin.kahraman

Posts: 2
Joined: Tue May 13, 2014 12:32 pm

Re: How to use profiles (contraction hierarchies) in createD

Posted: Thu Sep 10, 2015 5:00 pm
by Bernd Welter
Hello Metin,

forget about the description - in this case you may configure a serverside request profile + a xml profile:
Let's say you want to use a server xml profile named "dimaMetin.xml" which is stored in XDIMA/conf/profiles. Ok, here is how it works:
  • create a request profile "xdima-metin.properties" in XDIMA/profiles as a copy of xdima-default-properties
  • specify a reference to the xml profile in the request profile by adding the following line:
    dimaProfile.truck=dimaMetin and restart xdima
  • refer to the request profile when you send createDima:

    Code: Select all

    <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <soap:Body>
        <createDima xmlns="http://types.xdima.xserver.ptvag.com" xmlns:ns2="http://baseservices.service.jabba.ptvag.com" xmlns:ns3="http://wrappertypes.service.jabba.ptvag.com" xmlns:ns4="http://xdima.xserver.ptvag.com" xmlns:ns5="http://exception.core.jabba.ptvag.com" xmlns:ns6="http://common.xserver.ptvag.com">
          <int_1>1</int_1>
          <DimaProfile_2 optimization="90" speedTable="135,70,125,35,85,25,60,25,50,20,40,18,16,9,6,4" routingType="RT1TON" linkType="LTSEGMENT" dimaCoordFormat="MERCATOR" vehicleType="VTTRUCK" description="MyDima"/>
          <CallerContext_3>
            <ns2:wrappedProperties>
              <ns2:CallerContextProperty value="Metin" key="Profile"/>
            </ns2:wrappedProperties>
          </CallerContext_3>
        </createDima>
      </soap:Body>
    </soap:Envelope>
By the way: this structure isn't related to contraction hierarchies... It simply says "if there is a proper XML profile use it"...
It is another step in the process that checks "is there searchgraph that matches the profile in the folder?"...

Does this answer the question?

Bernd

Re: How to use profiles (contraction hierarchies) in createD

Posted: Thu Sep 10, 2015 5:57 pm
by metin.kahraman
Hello Bernd,

basically yes. Thanks.

Just to make sure ...

1. properties within the specified profile in CallerContextProperty override the properties set for DimaProfile (e.g. speedTable, optimization etc.) ?

2. in the xdima-metin.xml you have the options to specify dimaProfile.car and/or dimaProfile.truck ? Others as well ?

3. xDima chooses the dimaProfile.truck setting, because you specified vehicleType="VTTRUCK"?

4. what is the minimum set of attributes for DimaProfile that has to be set, when I use this CallerContextProperty variant?

Regards

Metin

Re: How to use profiles (contraction hierarchies) in createD

Posted: Mon Sep 14, 2015 11:39 am
by Bernd Welter
Hello Metin,

Franziska wrote me some comments on your recent questions:
  • Question: properties within the specified profile in CallerContextProperty override the properties set for DimaProfile (e.g. speedTable, optimization etc.) ?
    Answer: No, it is the other way round: properties set for DimaProfile override properties from the xml profile
  • Question: in the xdima-metin.xml you have the options to specify dimaProfile.car and/or dimaProfile.truck ? Others as well ?
    Answer: Only car or truck
  • Question: xDima chooses the dimaProfile.truck setting, because you specified vehicleType="VTTRUCK"?
    Answer: Yes
  • Question: what is the minimum set of attributes for DimaProfile that has to be set, when I use this CallerContextProperty variant?
    Answer: The dimaProfile has to be set, but may be empty
Done?

Regards Bernd

Re: How to use profiles (contraction hierarchies) in createD

Posted: Mon Nov 30, 2015 8:44 am
by Joost
A bit after the fact however:
The dimaProfile has to be set, but may be empty
Interface-wise this is correct however: if you would do this the xDima uses default values for the required attributes in the DimaProfile. This becomes problematic with vehicleType and optimization. They will default to VTCAR and 0. Values you probably do not want to use. Other attributes that will use defaults are dimaCoordFormat (MERCATOR), linkType (LTSEGMENT) and routingType (RT1TON) are less problematic and are probably the values you want to use anyway.

Re: How to use profiles (contraction hierarchies) in createD

Posted: Mon Dec 07, 2015 10:30 am
by Bernd Welter
That's right - not the optimal implementation at the moment. This is why we recommend to set
  • profile
  • vehicle type
  • optimization
Best regards Bernd