LGTM
This commit is contained in:
parent
9248e26af2
commit
f2a2651b8a
95 changed files with 3993 additions and 1471 deletions
|
|
@ -17,8 +17,7 @@ set -euo pipefail
|
|||
# - places_ref.parquet: place order reference
|
||||
#
|
||||
# Usage:
|
||||
# ./r5-java/run.sh [--paths] [--demo]
|
||||
# --paths records journey instructions (transit only, ~20x slower)
|
||||
# ./r5-java/run.sh [--demo]
|
||||
# --demo only compute Bank + TCR, transit only (quick test)
|
||||
|
||||
# --- Defaults ---
|
||||
|
|
@ -27,7 +26,6 @@ HEAP=40g
|
|||
NETWORK_DIR=property-data/r5-network
|
||||
OUTPUT_BASE=property-data/travel-times
|
||||
R5_DIR=r5-java
|
||||
PATHS_FLAG=""
|
||||
DEMO_FLAG=""
|
||||
|
||||
# --- Parse args ---
|
||||
|
|
@ -37,7 +35,6 @@ while [[ $# -gt 0 ]]; do
|
|||
--heap) HEAP="$2"; shift 2 ;;
|
||||
--network-dir) NETWORK_DIR="$2"; shift 2 ;;
|
||||
--output-dir) OUTPUT_BASE="$2"; shift 2 ;;
|
||||
--paths) PATHS_FLAG="--paths"; shift ;;
|
||||
--demo) DEMO_FLAG="--demo"; shift ;;
|
||||
*) echo "Unknown: $1"; exit 1 ;;
|
||||
esac
|
||||
|
|
@ -140,7 +137,7 @@ java -Xms"$HEAP" -Xmx"$HEAP" -cp "$OUT_DIR:$LIB_DIR/*" propertymap.App \
|
|||
--places property-data/places.parquet \
|
||||
--output-dir "$OUTPUT_BASE" \
|
||||
--threads "$THREADS" \
|
||||
$PATHS_FLAG $DEMO_FLAG
|
||||
$DEMO_FLAG
|
||||
|
||||
echo ""
|
||||
echo "=== Complete ==="
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||
* Output per mode: one parquet file per origin in {output-dir}/{mode}/{name}.parquet
|
||||
* with columns (pcds VARCHAR, travel_minutes SMALLINT). Transit mode additionally
|
||||
* includes a best_minutes SMALLINT column (5th percentile = best-case departure timing)
|
||||
* and optionally a journey VARCHAR column (JSON leg instructions, when --paths is set).
|
||||
* and a journey VARCHAR column with JSON leg instructions.
|
||||
*/
|
||||
public class App {
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ public class App {
|
|||
String placesPath = requiredArg(args, "--places");
|
||||
String outputDirStr = requiredArg(args, "--output-dir");
|
||||
int threads = Integer.parseInt(optionalArg(args, "--threads", "4"));
|
||||
boolean enablePaths = hasFlag(args, "--paths");
|
||||
boolean enablePaths = true;
|
||||
boolean demo = hasFlag(args, "--demo");
|
||||
|
||||
Path outDir = Paths.get(outputDirStr);
|
||||
|
|
@ -300,7 +300,7 @@ public class App {
|
|||
if (args[i].equals(name)) return args[i + 1];
|
||||
}
|
||||
System.err.println("Missing required argument: " + name);
|
||||
System.err.println("Usage: App --postcodes FILE --places FILE --output-dir DIR [--threads N] [--paths] [--demo]");
|
||||
System.err.println("Usage: App --postcodes FILE --places FILE --output-dir DIR [--threads N] [--demo]");
|
||||
System.exit(1);
|
||||
return null; // unreachable
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue