Engine error: Internal routing engine error (code: -101)

deals with computation of distance matrices
Post Reply
jose.bujalance
Posts: 5
Joined: Fri May 05, 2017 3:24 pm

Engine error: Internal routing engine error (code: -101)

Post by jose.bujalance »

Hi,

I am trying to create a distance matrix with xDima and I am facing this XDimaException exception:
Could not calculate distance table of Dima 1001. Engine error: Internal routing engine error (code: -101)

As xDima only admits smart unit coordinates as inputs, I have implemented a converter from web Mercator coordinates to smart units. For example, the couple (48.926023, 2.358183) gives in smart units (4216056, 5462139). I have verified that the transformation is correct entering the resulting coordinates in this application: http://176.95.37.53/xajax/testMapApi.jsp

Here is a Java snipet showing how I am trying to calculate the matrix after having already created the empty Dima:

Code: Select all

XDimaRemoteInterface xDimaClient = (XDimaRemoteInterface) ClientFactory.createClient(XDimaRemoteInterface.class, username, token, xDimaUrl);

CallerContext ctx = new CallerContext();
CallerContextProperty profile = new CallerContextProperty("Profile", "carfast");
CallerContextProperty[] callerContextProperties = new CallerContextProperty[] { profile };
ctx.setProperties(callerContextProperties);

xDimaClient.setCallerContext(ctx);

int dimaID = 1001;

// Location A
Location location_1 = new Location();
double[] webMerc1 = new double[] {48.926023, 2.358183};
double[] smartCoords1 = CoordinatesTransformer.WebMercator_2_SmartUnits(webMerc1[0], webMerc1[1]);
location_1.setX((int) smartCoords1[0]);
location_1.setY((int) smartCoords1[1]);

// Location B
Location location_2 = new Location();
double[] webMerc2 = new double[] {48.801993, 2.324593};
double[] smartCoords2 = CoordinatesTransformer.WebMercator_2_SmartUnits(webMerc2[0], webMerc2[1]);
location_2.setX((int) smartCoords2[0]);
location_2.setY((int) smartCoords2[1]);

// Location C
Location location_3 = new Location();
double[] webMerc3 = new double[] {48.880793, 2.377319};
double[] smartCoords3 = CoordinatesTransformer.WebMercator_2_SmartUnits(webMerc3[0], webMerc3[1]);
location_3.setX((int) smartCoords3[0]);
location_3.setY((int) smartCoords3[1]);

Location[] locations = new Location[] { location_1, location_2, location_3 };

xDimaClient.calculateDistanceTable(dimaID, locations);
Any idea on why isn't this working ?

Thanks,
José
Post Reply