1.5.0 preparations

This commit is contained in:
Arndt Brenschede 2019-06-30 17:34:21 +02:00
parent af6956f4f5
commit f9f08cc0b7
22 changed files with 57 additions and 52 deletions

View file

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>org.btools</groupId> <groupId>org.btools</groupId>
<artifactId>brouter</artifactId> <artifactId>brouter</artifactId>
<version>1.4.11</version> <version>1.5.0</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<artifactId>brouter-codec</artifactId> <artifactId>brouter-codec</artifactId>

View file

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>org.btools</groupId> <groupId>org.btools</groupId>
<artifactId>brouter</artifactId> <artifactId>brouter</artifactId>
<version>1.4.11</version> <version>1.5.0</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<artifactId>brouter-core</artifactId> <artifactId>brouter-core</artifactId>

View file

@ -435,7 +435,7 @@ public final class OsmTrack
} }
else else
{ {
sb.append( " creator=\"BRouter-1.4.11\" version=\"1.1\">\n" ); sb.append( " creator=\"BRouter-1.5.0\" version=\"1.1\">\n" );
} }
if ( turnInstructionMode == 3) // osmand style if ( turnInstructionMode == 3) // osmand style

View file

@ -62,7 +62,7 @@ public class RoutingEngine extends Thread
private Object[] extract; private Object[] extract;
private boolean directWeaving = Boolean.getBoolean( "directWeaving" ); private boolean directWeaving = !Boolean.getBoolean( "disableDirectWeaving" );
public RoutingEngine( String outfileBase, String logfileBase, String segmentDir, public RoutingEngine( String outfileBase, String logfileBase, String segmentDir,
List<OsmNodeNamed> waypoints, RoutingContext rc ) List<OsmNodeNamed> waypoints, RoutingContext rc )
@ -808,21 +808,21 @@ public class RoutingEngine extends Thread
synchronized( openSet ) synchronized( openSet )
{ {
path = openSet.popLowestKeyValue(); path = openSet.popLowestKeyValue();
} if ( path == null )
if ( path == null )
{
if ( openBorderList.isEmpty() )
{ {
break; if ( openBorderList.isEmpty() )
{
break;
}
for( OsmPath p : openBorderList )
{
openSet.add( p.cost + (int)(p.airdistance*airDistanceCostFactor), p );
}
openBorderList.clear();
memoryPanicMode = false;
needNonPanicProcessing = true;
continue;
} }
for( OsmPath p : openBorderList )
{
openSet.add( p.cost + (int)(p.airdistance*airDistanceCostFactor), p );
}
openBorderList.clear();
memoryPanicMode = false;
needNonPanicProcessing = true;
continue;
} }
if ( path.airdistance == -1 ) if ( path.airdistance == -1 )
@ -841,29 +841,32 @@ public class RoutingEngine extends Thread
int pathsBefore = openSet.getSize(); int pathsBefore = openSet.getSize();
nodesCache.nodesMap.collectOutreachers(); nodesCache.nodesMap.collectOutreachers();
for(;;) synchronized( openSet )
{ {
OsmPath p3 = openSet.popLowestKeyValue(); for(;;)
if ( p3 == null ) break;
if ( p3.airdistance != -1 && nodesCache.nodesMap.canEscape( p3.getTargetNode() ) )
{ {
openBorderList.add( p3 ); OsmPath p3 = openSet.popLowestKeyValue();
if ( p3 == null ) break;
if ( p3.airdistance != -1 && nodesCache.nodesMap.canEscape( p3.getTargetNode() ) )
{
openBorderList.add( p3 );
}
}
for( OsmPath p : openBorderList )
{
openSet.add( p.cost + (int)(p.airdistance*airDistanceCostFactor), p );
} }
} }
for( OsmPath p : openBorderList )
{
openSet.add( p.cost + (int)(p.airdistance*airDistanceCostFactor), p );
}
openBorderList.clear(); openBorderList.clear();
System.out.println( "collected, nodes/paths before=" + nodesBefore + "/" + pathsBefore + " after=" + nodesCache.nodesMap.nodesCreated + "/" + openSet.getSize() ); logInfo( "collected, nodes/paths before=" + nodesBefore + "/" + pathsBefore + " after=" + nodesCache.nodesMap.nodesCreated + "/" + openSet.getSize() + " maxTotalCost=" + maxTotalCost );
if ( !nodesCache.nodesMap.isInMemoryBounds( openSet.getSize()) ) // TODO if ( !nodesCache.nodesMap.isInMemoryBounds( openSet.getSize()) ) // TODO
{ {
if ( maxTotalCost < 1000000000 || needNonPanicProcessing ) if ( maxTotalCost < 1000000000 || needNonPanicProcessing || fastPartialRecalc )
{ {
throw new IllegalArgumentException( "memory limit reached" ); throw new IllegalArgumentException( "memory limit reached" );
} }
memoryPanicMode = true; memoryPanicMode = true;
System.out.println( "************************ memory limit reached, enabled memory panic mode *************************" ); logInfo( "************************ memory limit reached, enabled memory panic mode *************************" );
} }
} }
} }
@ -1248,7 +1251,7 @@ System.out.println( "collected, nodes/paths before=" + nodesBefore + "/" + paths
private OsmTrack mergeTrack( OsmPathElement match, OsmTrack oldTrack ) private OsmTrack mergeTrack( OsmPathElement match, OsmTrack oldTrack )
{ {
System.out.println( "**************** merging match=" + match.cost + " with oldTrack=" + oldTrack.cost ); logInfo( "**************** merging match=" + match.cost + " with oldTrack=" + oldTrack.cost );
OsmPathElement element = match; OsmPathElement element = match;
OsmTrack track = new OsmTrack(); OsmTrack track = new OsmTrack();
track.cost = oldTrack.cost; track.cost = oldTrack.cost;

View file

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>org.btools</groupId> <groupId>org.btools</groupId>
<artifactId>brouter</artifactId> <artifactId>brouter</artifactId>
<version>1.4.11</version> <version>1.5.0</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<artifactId>brouter-expressions</artifactId> <artifactId>brouter-expressions</artifactId>

View file

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>org.btools</groupId> <groupId>org.btools</groupId>
<artifactId>brouter</artifactId> <artifactId>brouter</artifactId>
<version>1.4.11</version> <version>1.5.0</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<artifactId>brouter-map-creator</artifactId> <artifactId>brouter-map-creator</artifactId>

View file

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>org.btools</groupId> <groupId>org.btools</groupId>
<artifactId>brouter</artifactId> <artifactId>brouter</artifactId>
<version>1.4.11</version> <version>1.5.0</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<artifactId>brouter-mapaccess</artifactId> <artifactId>brouter-mapaccess</artifactId>

View file

@ -49,7 +49,7 @@ public final class NodesCache
private long ghostSum = 0; private long ghostSum = 0;
private long ghostWakeup = 0; private long ghostWakeup = 0;
private boolean directWeaving = Boolean.getBoolean( "directWeaving" ); private boolean directWeaving = !Boolean.getBoolean( "disableDirectWeaving" );
public String formatStatus() public String formatStatus()
{ {

View file

@ -73,7 +73,7 @@ public final class OsmNodesMap
} }
catch( StackOverflowError soe ) catch( StackOverflowError soe )
{ {
System.out.println( "+++++++++++++++ StackOverflowError ++++++++++++++++" ); // System.out.println( "+++++++++++++++ StackOverflowError ++++++++++++++++" );
} }
} }
} }
@ -196,7 +196,6 @@ public final class OsmNodesMap
{ {
nodesCreated=0; nodesCreated=0;
System.out.println( "collectOutreachers, currentMaxCost=" + currentMaxCost );
ArrayList<OsmNode> nodes2check = new ArrayList<OsmNode>(); ArrayList<OsmNode> nodes2check = new ArrayList<OsmNode>();
for( OsmNode n : hmap.values() ) for( OsmNode n : hmap.values() )
{ {

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="23" android:versionCode="27"
android:versionName="1.4.11" package="btools.routingapp"> android:versionName="1.5.0" package="btools.routingapp">
<application android:icon="@drawable/icon" android:label="@string/app_name"> <application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".BRouterActivity" <activity android:name=".BRouterActivity"
android:label="@string/app_name" android:label="@string/app_name"
@ -26,7 +26,7 @@
<uses-sdk android:minSdkVersion="10"></uses-sdk> <uses-sdk android:minSdkVersion="10"></uses-sdk>
<uses-sdk android:targetSdkVersion="10"></uses-sdk> <uses-sdk android:targetSdkVersion="28"></uses-sdk>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
<uses-permission android:name="android.permission.WAKE_LOCK"></uses-permission> <uses-permission android:name="android.permission.WAKE_LOCK"></uses-permission>
<uses-permission android:name="android.permission.INTERNET"></uses-permission> <uses-permission android:name="android.permission.INTERNET"></uses-permission>

View file

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>org.btools</groupId> <groupId>org.btools</groupId>
<artifactId>brouter</artifactId> <artifactId>brouter</artifactId>
<version>1.4.11</version> <version>1.5.0</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<artifactId>brouter-routing-app</artifactId> <artifactId>brouter-routing-app</artifactId>
@ -60,9 +60,9 @@
<include>${project.build.directory}/${project.artifactId}.apk</include> <include>${project.build.directory}/${project.artifactId}.apk</include>
</includes> </includes>
<keystore>\sign\mystore</keystore> <keystore>\sign\mystore</keystore>
<alias>abrensch</alias> <alias>myalias</alias>
<storepass>peru1511</storepass> <storepass>mypasswd</storepass>
<keypass>peru1511</keypass> <keypass>mypasswd</keypass>
<verbose>true</verbose> <verbose>true</verbose>
</configuration> </configuration>
</execution> </execution>

View file

@ -8,4 +8,4 @@
# project structure. # project structure.
# Project target. # Project target.
target=android-10 target=android-28

View file

@ -174,7 +174,7 @@ public class BRouterView extends View
String basedir = fbd.getAbsolutePath(); String basedir = fbd.getAbsolutePath();
AppLogger.log( "using basedir: " + basedir ); AppLogger.log( "using basedir: " + basedir );
String version = "v1.4.11"; String version = "v1.5.0";
// create missing directories // create missing directories
assertDirectoryExists( "project directory", basedir + "/brouter", null, null ); assertDirectoryExists( "project directory", basedir + "/brouter", null, null );
@ -807,7 +807,7 @@ public class BRouterView extends View
else else
{ {
String memstat = memoryClass + "mb pathPeak " + ((cr.getPathPeak()+500)/1000) + "k"; String memstat = memoryClass + "mb pathPeak " + ((cr.getPathPeak()+500)/1000) + "k";
String result = "version = BRouter-1.4.11\n" + "mem = " + memstat + "\ndistance = " + cr.getDistance() / 1000. + " km\n" + "filtered ascend = " + cr.getAscend() String result = "version = BRouter-1.5.0\n" + "mem = " + memstat + "\ndistance = " + cr.getDistance() / 1000. + " km\n" + "filtered ascend = " + cr.getAscend()
+ " m\n" + "plain ascend = " + cr.getPlainAscend() + " m\n" + "estimated time = " + cr.getTime(); + " m\n" + "plain ascend = " + cr.getPlainAscend() + " m\n" + "estimated time = " + cr.getTime();
rawTrack = cr.getFoundRawTrack(); rawTrack = cr.getFoundRawTrack();

View file

@ -165,6 +165,8 @@ public class BRouterWorker
n.ilon = (int)( ( lons[i] + 180. ) *1000000. + 0.5); n.ilon = (int)( ( lons[i] + 180. ) *1000000. + 0.5);
n.ilat = (int)( ( lats[i] + 90. ) *1000000. + 0.5); n.ilat = (int)( ( lats[i] + 90. ) *1000000. + 0.5);
n.isNogo = true; n.isNogo = true;
n.nogoWeight = Double.NaN;
AppLogger.log( "added interface provided nogo: " + n );
nogoList.add( n ); nogoList.add( n );
} }
} }

View file

@ -140,6 +140,7 @@ public abstract class CoordinateReader
else if ( n.name != null && n.name.startsWith( "nogo" ) ) else if ( n.name != null && n.name.startsWith( "nogo" ) )
{ {
n.isNogo = true; n.isNogo = true;
n.nogoWeight = Double.NaN;
nogopoints.add( n ); nogopoints.add( n );
} }

View file

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>org.btools</groupId> <groupId>org.btools</groupId>
<artifactId>brouter</artifactId> <artifactId>brouter</artifactId>
<version>1.4.11</version> <version>1.5.0</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<artifactId>brouter-server</artifactId> <artifactId>brouter-server</artifactId>

View file

@ -88,7 +88,7 @@ public class BRouter
} }
System.exit(0); System.exit(0);
} }
System.out.println("BRouter 1.4.11 / 02042018"); System.out.println("BRouter 1.5.0 / 30062019");
if ( args.length < 6 ) if ( args.length < 6 )
{ {
System.out.println("Find routes in an OSM map"); System.out.println("Find routes in an OSM map");

View file

@ -260,7 +260,7 @@ public class RouteServer extends Thread
public static void main(String[] args) throws Exception public static void main(String[] args) throws Exception
{ {
System.out.println("BRouter 1.4.11 / 02042018"); System.out.println("BRouter 1.5.0 / 30062019");
if ( args.length != 5 && args.length != 6) if ( args.length != 5 && args.length != 6)
{ {
System.out.println("serve BRouter protocol"); System.out.println("serve BRouter protocol");

View file

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>org.btools</groupId> <groupId>org.btools</groupId>
<artifactId>brouter</artifactId> <artifactId>brouter</artifactId>
<version>1.4.11</version> <version>1.5.0</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<artifactId>brouter-util</artifactId> <artifactId>brouter-util</artifactId>

View file

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.btools</groupId> <groupId>org.btools</groupId>
<artifactId>brouter</artifactId> <artifactId>brouter</artifactId>
<version>1.4.11</version> <version>1.5.0</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<url>http://brouter.de/brouter/</url> <url>http://brouter.de/brouter/</url>
<name>brouter</name> <name>brouter</name>
@ -53,7 +53,7 @@
<genDirectoryAidl>gen</genDirectoryAidl> <genDirectoryAidl>gen</genDirectoryAidl>
<extractDuplicates>true</extractDuplicates> <extractDuplicates>true</extractDuplicates>
<sdk> <sdk>
<platform>10</platform> <platform>28</platform>
</sdk> </sdk>
<dex> <dex>
<jvmArguments> <jvmArguments>