1046 lines
50 KiB
Python
1046 lines
50 KiB
Python
"""Seed data for the transport example from the README."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from physcom.models.entity import Entity, Dependency
|
|
from physcom.models.domain import Domain, MetricBound
|
|
|
|
|
|
# ── Platforms — Ground ──────────────────────────────────────────
|
|
|
|
GROUND_PLATFORMS: list[Entity] = [
|
|
Entity(
|
|
name="Car",
|
|
dimension="platform",
|
|
description="Four-wheeled enclosed road vehicle",
|
|
dependencies=[
|
|
Dependency("environment", "ground_surface", "true", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "3000", "kg", "range_max"),
|
|
Dependency("physical", "mass_kg", "800", "kg", "range_min"),
|
|
Dependency("force", "power_density_required_w_kg", "30", "W/kg", "range_min"),
|
|
Dependency("infrastructure", "road_network", "true", None, "requires"),
|
|
Dependency("environment", "medium", "ground", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Train",
|
|
dimension="platform",
|
|
description="Rail-guided vehicle",
|
|
dependencies=[
|
|
Dependency("environment", "ground_surface", "true", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "10000", "kg", "range_min"),
|
|
Dependency("force", "power_density_required_w_kg", "10", "W/kg", "range_min"),
|
|
Dependency("infrastructure", "rail_network", "true", None, "requires"),
|
|
Dependency("environment", "medium", "ground", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Bicycle",
|
|
dimension="platform",
|
|
description="Two-wheeled human-scale vehicle",
|
|
dependencies=[
|
|
Dependency("environment", "ground_surface", "true", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "30", "kg", "range_max"),
|
|
Dependency("force", "power_density_required_w_kg", "1", "W/kg", "range_min"),
|
|
Dependency("infrastructure", "road_network", "true", None, "requires"),
|
|
Dependency("environment", "medium", "ground", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Walking",
|
|
dimension="platform",
|
|
description="Bipedal locomotion",
|
|
dependencies=[
|
|
Dependency("environment", "ground_surface", "true", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "150", "kg", "range_max"),
|
|
Dependency("force", "power_density_required_w_kg", "1", "W/kg", "range_min"),
|
|
Dependency("infrastructure", "fuel_infrastructure", "none", None, "requires"),
|
|
Dependency("environment", "medium", "ground", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Wheelchair",
|
|
dimension="platform",
|
|
description="Wheeled chair for seated mobility",
|
|
dependencies=[
|
|
Dependency("environment", "ground_surface", "true", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "200", "kg", "range_max"),
|
|
Dependency("force", "power_density_required_w_kg", "1", "W/kg", "range_min"),
|
|
Dependency("infrastructure", "road_network", "true", None, "requires"),
|
|
Dependency("environment", "medium", "ground", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Scooter",
|
|
dimension="platform",
|
|
description="Small two-wheeled standing vehicle",
|
|
dependencies=[
|
|
Dependency("environment", "ground_surface", "true", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "50", "kg", "range_max"),
|
|
Dependency("force", "power_density_required_w_kg", "1", "W/kg", "range_min"),
|
|
Dependency("infrastructure", "road_network", "true", None, "requires"),
|
|
Dependency("environment", "medium", "ground", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Motorcycle",
|
|
dimension="platform",
|
|
description="Two-wheeled motorized road vehicle",
|
|
dependencies=[
|
|
Dependency("environment", "ground_surface", "true", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "300", "kg", "range_max"),
|
|
Dependency("physical", "mass_kg", "150", "kg", "range_min"),
|
|
Dependency("force", "power_density_required_w_kg", "10", "W/kg", "range_min"),
|
|
Dependency("infrastructure", "road_network", "true", None, "requires"),
|
|
Dependency("environment", "medium", "ground", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Bus",
|
|
dimension="platform",
|
|
description="Large enclosed multi-passenger road vehicle",
|
|
dependencies=[
|
|
Dependency("environment", "ground_surface", "true", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "18000", "kg", "range_max"),
|
|
Dependency("physical", "mass_kg", "8000", "kg", "range_min"),
|
|
Dependency("force", "power_density_required_w_kg", "15", "W/kg", "range_min"),
|
|
Dependency("infrastructure", "road_network", "true", None, "requires"),
|
|
Dependency("environment", "medium", "ground", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Truck",
|
|
dimension="platform",
|
|
description="Heavy-duty cargo road vehicle",
|
|
dependencies=[
|
|
Dependency("environment", "ground_surface", "true", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "36000", "kg", "range_max"),
|
|
Dependency("physical", "mass_kg", "5000", "kg", "range_min"),
|
|
Dependency("force", "power_density_required_w_kg", "20", "W/kg", "range_min"),
|
|
Dependency("infrastructure", "road_network", "true", None, "requires"),
|
|
Dependency("environment", "medium", "ground", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Horse",
|
|
dimension="platform",
|
|
description="Equine animal used for riding or pulling loads",
|
|
dependencies=[
|
|
Dependency("environment", "ground_surface", "true", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "700", "kg", "range_max"),
|
|
Dependency("physical", "mass_kg", "400", "kg", "range_min"),
|
|
Dependency("force", "power_density_required_w_kg", "1", "W/kg", "range_min"),
|
|
Dependency("environment", "medium", "ground", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Skateboard",
|
|
dimension="platform",
|
|
description="Small board on four wheels for rolling locomotion",
|
|
dependencies=[
|
|
Dependency("environment", "ground_surface", "true", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "10", "kg", "range_max"),
|
|
Dependency("force", "power_density_required_w_kg", "1", "W/kg", "range_min"),
|
|
Dependency("infrastructure", "road_network", "true", None, "requires"),
|
|
Dependency("environment", "medium", "ground", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Snowmobile",
|
|
dimension="platform",
|
|
description="Tracked vehicle for travel over snow and ice",
|
|
dependencies=[
|
|
Dependency("environment", "ground_surface", "true", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("environment", "terrain", "snow", None, "requires"),
|
|
Dependency("physical", "mass_kg", "400", "kg", "range_max"),
|
|
Dependency("physical", "mass_kg", "200", "kg", "range_min"),
|
|
Dependency("force", "power_density_required_w_kg", "40", "W/kg", "range_min"),
|
|
Dependency("environment", "medium", "ground", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Tram",
|
|
dimension="platform",
|
|
description="Rail-guided urban streetcar",
|
|
dependencies=[
|
|
Dependency("environment", "ground_surface", "true", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "40000", "kg", "range_max"),
|
|
Dependency("physical", "mass_kg", "20000", "kg", "range_min"),
|
|
Dependency("force", "power_density_required_w_kg", "10", "W/kg", "range_min"),
|
|
Dependency("infrastructure", "rail_network", "true", None, "requires"),
|
|
Dependency("infrastructure", "overhead_power", "true", None, "requires"),
|
|
Dependency("environment", "medium", "ground", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="ATV",
|
|
dimension="platform",
|
|
description="All-terrain vehicle (quad bike) for off-road use",
|
|
dependencies=[
|
|
Dependency("environment", "ground_surface", "true", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "500", "kg", "range_max"),
|
|
Dependency("physical", "mass_kg", "200", "kg", "range_min"),
|
|
Dependency("force", "power_density_required_w_kg", "20", "W/kg", "range_min"),
|
|
Dependency("environment", "medium", "ground", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Rickshaw",
|
|
dimension="platform",
|
|
description="Small passenger cart pulled by human or bicycle",
|
|
dependencies=[
|
|
Dependency("environment", "ground_surface", "true", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "150", "kg", "range_max"),
|
|
Dependency("force", "power_density_required_w_kg", "2", "W/kg", "range_min"),
|
|
Dependency("infrastructure", "road_network", "true", None, "requires"),
|
|
Dependency("environment", "medium", "ground", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Segway",
|
|
dimension="platform",
|
|
description="Self-balancing two-wheeled personal transporter",
|
|
dependencies=[
|
|
Dependency("environment", "ground_surface", "true", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "60", "kg", "range_max"),
|
|
Dependency("force", "power_density_required_w_kg", "5", "W/kg", "range_min"),
|
|
Dependency("infrastructure", "road_network", "true", None, "requires"),
|
|
Dependency("environment", "medium", "ground", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Golf Cart",
|
|
dimension="platform",
|
|
description="Small low-speed utility vehicle",
|
|
dependencies=[
|
|
Dependency("environment", "ground_surface", "true", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "500", "kg", "range_max"),
|
|
Dependency("physical", "mass_kg", "300", "kg", "range_min"),
|
|
Dependency("force", "power_density_required_w_kg", "3", "W/kg", "range_min"),
|
|
Dependency("infrastructure", "road_network", "true", None, "requires"),
|
|
Dependency("environment", "medium", "ground", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Dog Sled",
|
|
dimension="platform",
|
|
description="Sled pulled by a team of dogs over snow",
|
|
dependencies=[
|
|
Dependency("environment", "ground_surface", "true", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("environment", "terrain", "snow", None, "requires"),
|
|
Dependency("physical", "mass_kg", "300", "kg", "range_max"),
|
|
Dependency("force", "power_density_required_w_kg", "2", "W/kg", "range_min"),
|
|
Dependency("environment", "medium", "ground", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Maglev Train",
|
|
dimension="platform",
|
|
description="Magnetically levitated high-speed rail vehicle",
|
|
dependencies=[
|
|
Dependency("environment", "ground_surface", "true", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "30000", "kg", "range_min"),
|
|
Dependency("force", "power_density_required_w_kg", "50", "W/kg", "range_min"),
|
|
Dependency("infrastructure", "maglev_guideway", "true", None, "requires"),
|
|
Dependency("environment", "medium", "ground", None, "requires"),
|
|
],
|
|
),
|
|
]
|
|
|
|
|
|
# ── Platforms — Water ───────────────────────────────────────────
|
|
|
|
WATER_PLATFORMS: list[Entity] = [
|
|
Entity(
|
|
name="Sailboat",
|
|
dimension="platform",
|
|
description="Wind-propelled watercraft with sails",
|
|
dependencies=[
|
|
Dependency("environment", "water_surface", "true", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "5000", "kg", "range_max"),
|
|
Dependency("physical", "mass_kg", "500", "kg", "range_min"),
|
|
Dependency("force", "power_density_required_w_kg", "2", "W/kg", "range_min"),
|
|
Dependency("environment", "medium", "water", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Motorboat",
|
|
dimension="platform",
|
|
description="Small powered watercraft with outboard or inboard motor",
|
|
dependencies=[
|
|
Dependency("environment", "water_surface", "true", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "3000", "kg", "range_max"),
|
|
Dependency("physical", "mass_kg", "500", "kg", "range_min"),
|
|
Dependency("force", "power_density_required_w_kg", "30", "W/kg", "range_min"),
|
|
Dependency("environment", "medium", "water", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Submarine",
|
|
dimension="platform",
|
|
description="Submersible vessel for underwater travel",
|
|
dependencies=[
|
|
Dependency("environment", "water_surface", "true", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "10000", "kg", "range_min"),
|
|
Dependency("force", "power_density_required_w_kg", "20", "W/kg", "range_min"),
|
|
Dependency("environment", "medium", "water", None, "requires"),
|
|
Dependency("physical", "energy_density_wh_kg", "200", "Wh/kg", "range_min"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Kayak",
|
|
dimension="platform",
|
|
description="Small narrow watercraft propelled by a double-bladed paddle",
|
|
dependencies=[
|
|
Dependency("environment", "water_surface", "true", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "35", "kg", "range_max"),
|
|
Dependency("force", "power_density_required_w_kg", "1", "W/kg", "range_min"),
|
|
Dependency("environment", "medium", "water", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Ferry",
|
|
dimension="platform",
|
|
description="Large passenger and vehicle watercraft for short sea crossings",
|
|
dependencies=[
|
|
Dependency("environment", "water_surface", "true", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "50000", "kg", "range_min"),
|
|
Dependency("force", "power_density_required_w_kg", "10", "W/kg", "range_min"),
|
|
Dependency("infrastructure", "port_facility", "true", None, "requires"),
|
|
Dependency("environment", "medium", "water", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Container Ship",
|
|
dimension="platform",
|
|
description="Massive ocean-going cargo vessel carrying shipping containers",
|
|
dependencies=[
|
|
Dependency("environment", "water_surface", "true", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "100000", "kg", "range_min"),
|
|
Dependency("force", "power_density_required_w_kg", "5", "W/kg", "range_min"),
|
|
Dependency("infrastructure", "port_facility", "true", None, "requires"),
|
|
Dependency("environment", "medium", "water", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Canoe",
|
|
dimension="platform",
|
|
description="Lightweight open watercraft propelled by single-bladed paddles",
|
|
dependencies=[
|
|
Dependency("environment", "water_surface", "true", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "40", "kg", "range_max"),
|
|
Dependency("force", "power_density_required_w_kg", "1", "W/kg", "range_min"),
|
|
Dependency("environment", "medium", "water", None, "requires"),
|
|
],
|
|
),
|
|
]
|
|
|
|
|
|
# ── Platforms — Air ─────────────────────────────────────────────
|
|
|
|
AIR_PLATFORMS: list[Entity] = [
|
|
Entity(
|
|
name="Airplane",
|
|
dimension="platform",
|
|
description="Fixed-wing aircraft for atmospheric flight",
|
|
dependencies=[
|
|
Dependency("environment", "atmosphere", "standard", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "500", "kg", "range_min"),
|
|
Dependency("force", "power_density_required_w_kg", "100", "W/kg", "range_min"),
|
|
Dependency("infrastructure", "runway", "true", None, "requires"),
|
|
Dependency("environment", "medium", "air", None, "requires"),
|
|
Dependency("physical", "energy_density_wh_kg", "400", "Wh/kg", "range_min"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Helicopter",
|
|
dimension="platform",
|
|
description="Rotary-wing aircraft capable of vertical takeoff and hover",
|
|
dependencies=[
|
|
Dependency("environment", "atmosphere", "standard", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "5000", "kg", "range_max"),
|
|
Dependency("physical", "mass_kg", "1000", "kg", "range_min"),
|
|
Dependency("force", "power_density_required_w_kg", "100", "W/kg", "range_min"),
|
|
Dependency("environment", "medium", "air", None, "requires"),
|
|
Dependency("physical", "energy_density_wh_kg", "300", "Wh/kg", "range_min"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Hot Air Balloon",
|
|
dimension="platform",
|
|
description="Buoyancy-based aircraft using heated air in a fabric envelope",
|
|
dependencies=[
|
|
Dependency("environment", "atmosphere", "standard", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "500", "kg", "range_max"),
|
|
Dependency("physical", "mass_kg", "200", "kg", "range_min"),
|
|
Dependency("force", "power_density_required_w_kg", "5", "W/kg", "range_min"),
|
|
Dependency("environment", "medium", "air", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Glider",
|
|
dimension="platform",
|
|
description="Unpowered fixed-wing sailplane relying on thermals and gravity",
|
|
dependencies=[
|
|
Dependency("environment", "atmosphere", "standard", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "600", "kg", "range_max"),
|
|
Dependency("physical", "mass_kg", "200", "kg", "range_min"),
|
|
Dependency("force", "power_density_required_w_kg", "1", "W/kg", "range_min"),
|
|
Dependency("infrastructure", "tow_or_winch", "true", None, "requires"),
|
|
Dependency("environment", "medium", "air", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Drone",
|
|
dimension="platform",
|
|
description="Small unmanned rotary-wing aircraft (quadcopter)",
|
|
dependencies=[
|
|
Dependency("environment", "atmosphere", "standard", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "25", "kg", "range_max"),
|
|
Dependency("force", "power_density_required_w_kg", "80", "W/kg", "range_min"),
|
|
Dependency("environment", "medium", "air", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Airship",
|
|
dimension="platform",
|
|
description="Lighter-than-air powered craft (blimp or zeppelin)",
|
|
dependencies=[
|
|
Dependency("environment", "atmosphere", "standard", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "20000", "kg", "range_max"),
|
|
Dependency("physical", "mass_kg", "5000", "kg", "range_min"),
|
|
Dependency("force", "power_density_required_w_kg", "5", "W/kg", "range_min"),
|
|
Dependency("environment", "medium", "air", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Hang Glider",
|
|
dimension="platform",
|
|
description="Lightweight unpowered glider launched from elevation",
|
|
dependencies=[
|
|
Dependency("environment", "atmosphere", "standard", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "40", "kg", "range_max"),
|
|
Dependency("force", "power_density_required_w_kg", "1", "W/kg", "range_min"),
|
|
Dependency("environment", "medium", "air", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Paraglider",
|
|
dimension="platform",
|
|
description="Lightweight fabric wing for foot-launched free flight",
|
|
dependencies=[
|
|
Dependency("environment", "atmosphere", "standard", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "30", "kg", "range_max"),
|
|
Dependency("force", "power_density_required_w_kg", "1", "W/kg", "range_min"),
|
|
Dependency("environment", "medium", "air", None, "requires"),
|
|
],
|
|
),
|
|
]
|
|
|
|
|
|
# ── Platforms — Space ───────────────────────────────────────────
|
|
|
|
SPACE_PLATFORMS: list[Entity] = [
|
|
Entity(
|
|
name="Spaceship",
|
|
dimension="platform",
|
|
description="Vehicle designed for space travel",
|
|
dependencies=[
|
|
Dependency("environment", "atmosphere", "vacuum_or_thin", None, "requires"),
|
|
Dependency("physical", "mass_kg", "5000", "kg", "range_min"),
|
|
Dependency("force", "power_density_required_w_kg", "300", "W/kg", "range_min"),
|
|
Dependency("infrastructure", "launch_facility", "true", None, "requires"),
|
|
Dependency("environment", "medium", "space", None, "requires"),
|
|
Dependency("physical", "energy_density_wh_kg", "2000", "Wh/kg", "range_min"),
|
|
],
|
|
),
|
|
]
|
|
|
|
|
|
# ── Platforms — Multi-medium ────────────────────────────────────
|
|
|
|
MULTI_PLATFORMS: list[Entity] = [
|
|
Entity(
|
|
name="Hovercraft",
|
|
dimension="platform",
|
|
description="Air-cushion vehicle that travels over land, water, or ice",
|
|
dependencies=[
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "10000", "kg", "range_max"),
|
|
Dependency("physical", "mass_kg", "2000", "kg", "range_min"),
|
|
Dependency("force", "power_density_required_w_kg", "30", "W/kg", "range_min"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Amphibious Vehicle",
|
|
dimension="platform",
|
|
description="Vehicle capable of operation on both land and water",
|
|
dependencies=[
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "5000", "kg", "range_max"),
|
|
Dependency("physical", "mass_kg", "1500", "kg", "range_min"),
|
|
Dependency("force", "power_density_required_w_kg", "20", "W/kg", "range_min"),
|
|
],
|
|
),
|
|
]
|
|
|
|
|
|
# ── Platforms — Fictional / Speculative ─────────────────────────
|
|
|
|
FICTIONAL_PLATFORMS: list[Entity] = [
|
|
Entity(
|
|
name="Teleporter",
|
|
dimension="platform",
|
|
description="Hypothetical matter transmission device",
|
|
dependencies=[
|
|
Dependency("physical", "mass_kg", "0", "kg", "range_min"),
|
|
Dependency("force", "power_density_required_w_kg", "1000", "W/kg", "range_min"),
|
|
Dependency("infrastructure", "teleport_network", "true", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Hyperloop",
|
|
dimension="platform",
|
|
description="Sealed low-pressure tube with passenger pods at near-sonic speed",
|
|
dependencies=[
|
|
Dependency("environment", "ground_surface", "true", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "20000", "kg", "range_max"),
|
|
Dependency("physical", "mass_kg", "5000", "kg", "range_min"),
|
|
Dependency("force", "power_density_required_w_kg", "80", "W/kg", "range_min"),
|
|
Dependency("infrastructure", "hyperloop_tube", "true", None, "requires"),
|
|
Dependency("environment", "medium", "ground", None, "requires"),
|
|
],
|
|
),
|
|
]
|
|
|
|
|
|
# ── All Platforms ───────────────────────────────────────────────
|
|
|
|
PLATFORMS: list[Entity] = (
|
|
GROUND_PLATFORMS
|
|
+ WATER_PLATFORMS
|
|
+ AIR_PLATFORMS
|
|
+ SPACE_PLATFORMS
|
|
+ MULTI_PLATFORMS
|
|
+ FICTIONAL_PLATFORMS
|
|
)
|
|
|
|
|
|
# ── Power Sources — Combustion ──────────────────────────────────
|
|
|
|
COMBUSTION_SOURCES: list[Entity] = [
|
|
Entity(
|
|
name="Internal Combustion Engine",
|
|
dimension="power_source",
|
|
description="Gas/petrol-powered engine",
|
|
dependencies=[
|
|
Dependency("infrastructure", "fuel_infrastructure", "gas_station", None, "requires"),
|
|
Dependency("environment", "atmosphere", "standard", None, "requires"),
|
|
Dependency("physical", "mass_kg", "50", "kg", "range_min"),
|
|
Dependency("force", "thrust_profile", "high_continuous", None, "provides"),
|
|
Dependency("force", "power_density_w_kg", "1000", "W/kg", "provides"),
|
|
Dependency("physical", "energy_density_wh_kg", "1500", "Wh/kg", "provides"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Diesel Engine",
|
|
dimension="power_source",
|
|
description="Compression-ignition engine running on diesel fuel",
|
|
dependencies=[
|
|
Dependency("infrastructure", "fuel_infrastructure", "diesel_station", None, "requires"),
|
|
Dependency("environment", "atmosphere", "standard", None, "requires"),
|
|
Dependency("physical", "mass_kg", "60", "kg", "range_min"),
|
|
Dependency("force", "thrust_profile", "high_continuous", None, "provides"),
|
|
Dependency("force", "power_density_w_kg", "700", "W/kg", "provides"),
|
|
Dependency("physical", "energy_density_wh_kg", "1300", "Wh/kg", "provides"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Hydrogen Combustion Engine",
|
|
dimension="power_source",
|
|
description="Hydrogen fuel cell or combustion engine",
|
|
dependencies=[
|
|
Dependency("infrastructure", "fuel_infrastructure", "hydrogen_station", None, "requires"),
|
|
Dependency("physical", "mass_kg", "30", "kg", "range_min"),
|
|
Dependency("force", "thrust_profile", "high_continuous", None, "provides"),
|
|
Dependency("force", "power_density_w_kg", "1500", "W/kg", "provides"),
|
|
Dependency("physical", "energy_density_wh_kg", "600", "Wh/kg", "provides"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Compressed Natural Gas Engine",
|
|
dimension="power_source",
|
|
description="Engine running on compressed natural gas (CNG)",
|
|
dependencies=[
|
|
Dependency("infrastructure", "fuel_infrastructure", "cng_station", None, "requires"),
|
|
Dependency("environment", "atmosphere", "standard", None, "requires"),
|
|
Dependency("physical", "mass_kg", "55", "kg", "range_min"),
|
|
Dependency("force", "thrust_profile", "high_continuous", None, "provides"),
|
|
Dependency("force", "power_density_w_kg", "500", "W/kg", "provides"),
|
|
Dependency("physical", "energy_density_wh_kg", "800", "Wh/kg", "provides"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Biofuel Engine",
|
|
dimension="power_source",
|
|
description="Internal combustion engine running on biodiesel or ethanol",
|
|
dependencies=[
|
|
Dependency("infrastructure", "fuel_infrastructure", "biofuel_supply", None, "requires"),
|
|
Dependency("environment", "atmosphere", "standard", None, "requires"),
|
|
Dependency("physical", "mass_kg", "50", "kg", "range_min"),
|
|
Dependency("force", "thrust_profile", "high_continuous", None, "provides"),
|
|
Dependency("force", "power_density_w_kg", "800", "W/kg", "provides"),
|
|
Dependency("physical", "energy_density_wh_kg", "1000", "Wh/kg", "provides"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Coal Steam Engine",
|
|
dimension="power_source",
|
|
description="Coal-fired boiler with steam locomotion",
|
|
dependencies=[
|
|
Dependency("infrastructure", "fuel_infrastructure", "coal_supply", None, "requires"),
|
|
Dependency("environment", "atmosphere", "standard", None, "requires"),
|
|
Dependency("physical", "mass_kg", "500", "kg", "range_min"),
|
|
Dependency("force", "thrust_profile", "high_continuous", None, "provides"),
|
|
Dependency("force", "power_density_w_kg", "30", "W/kg", "provides"),
|
|
Dependency("physical", "energy_density_wh_kg", "400", "Wh/kg", "provides"),
|
|
],
|
|
),
|
|
]
|
|
|
|
|
|
# ── Power Sources — Turbine ─────────────────────────────────────
|
|
|
|
TURBINE_SOURCES: list[Entity] = [
|
|
Entity(
|
|
name="Jet Turbine",
|
|
dimension="power_source",
|
|
description="Turbofan jet engine for high-speed atmospheric flight",
|
|
dependencies=[
|
|
Dependency("infrastructure", "fuel_infrastructure", "jet_fuel", None, "requires"),
|
|
Dependency("environment", "atmosphere", "standard", None, "requires"),
|
|
Dependency("physical", "mass_kg", "500", "kg", "range_min"),
|
|
Dependency("force", "thrust_profile", "extreme_continuous", None, "provides"),
|
|
Dependency("force", "power_density_w_kg", "7000", "W/kg", "provides"),
|
|
Dependency("physical", "energy_density_wh_kg", "1200", "Wh/kg", "provides"),
|
|
Dependency("environment", "medium", "air", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Turboshaft Engine",
|
|
dimension="power_source",
|
|
description="Gas turbine driving a shaft, used in helicopters and ships",
|
|
dependencies=[
|
|
Dependency("infrastructure", "fuel_infrastructure", "jet_fuel", None, "requires"),
|
|
Dependency("environment", "atmosphere", "standard", None, "requires"),
|
|
Dependency("physical", "mass_kg", "200", "kg", "range_min"),
|
|
Dependency("force", "thrust_profile", "high_continuous", None, "provides"),
|
|
Dependency("force", "power_density_w_kg", "5000", "W/kg", "provides"),
|
|
Dependency("physical", "energy_density_wh_kg", "1200", "Wh/kg", "provides"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Turboprop Engine",
|
|
dimension="power_source",
|
|
description="Gas turbine driving a propeller for moderate-speed flight",
|
|
dependencies=[
|
|
Dependency("infrastructure", "fuel_infrastructure", "jet_fuel", None, "requires"),
|
|
Dependency("environment", "atmosphere", "standard", None, "requires"),
|
|
Dependency("physical", "mass_kg", "300", "kg", "range_min"),
|
|
Dependency("force", "thrust_profile", "high_continuous", None, "provides"),
|
|
Dependency("force", "power_density_w_kg", "4000", "W/kg", "provides"),
|
|
Dependency("physical", "energy_density_wh_kg", "1200", "Wh/kg", "provides"),
|
|
Dependency("environment", "medium", "air", None, "requires"),
|
|
],
|
|
),
|
|
]
|
|
|
|
|
|
# ── Power Sources — Electric ────────────────────────────────────
|
|
|
|
ELECTRIC_SOURCES: list[Entity] = [
|
|
Entity(
|
|
name="Lithium Ion Battery",
|
|
dimension="power_source",
|
|
description="Rechargeable electric battery pack",
|
|
dependencies=[
|
|
Dependency("infrastructure", "fuel_infrastructure", "charging_station", None, "requires"),
|
|
Dependency("physical", "mass_kg", "10", "kg", "range_min"),
|
|
Dependency("force", "thrust_profile", "moderate_continuous", None, "provides"),
|
|
Dependency("force", "power_density_w_kg", "500", "W/kg", "provides"),
|
|
Dependency("physical", "energy_density_wh_kg", "200", "Wh/kg", "provides"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Solid State Battery",
|
|
dimension="power_source",
|
|
description="Next-generation rechargeable battery with solid electrolyte",
|
|
dependencies=[
|
|
Dependency("infrastructure", "fuel_infrastructure", "charging_station", None, "requires"),
|
|
Dependency("physical", "mass_kg", "8", "kg", "range_min"),
|
|
Dependency("force", "thrust_profile", "moderate_continuous", None, "provides"),
|
|
Dependency("force", "power_density_w_kg", "800", "W/kg", "provides"),
|
|
Dependency("physical", "energy_density_wh_kg", "400", "Wh/kg", "provides"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Supercapacitor",
|
|
dimension="power_source",
|
|
description="High-power energy storage for rapid charge/discharge cycles",
|
|
dependencies=[
|
|
Dependency("infrastructure", "fuel_infrastructure", "charging_station", None, "requires"),
|
|
Dependency("physical", "mass_kg", "15", "kg", "range_min"),
|
|
Dependency("force", "thrust_profile", "high_burst", None, "provides"),
|
|
Dependency("force", "power_density_w_kg", "10000", "W/kg", "provides"),
|
|
Dependency("physical", "energy_density_wh_kg", "10", "Wh/kg", "provides"),
|
|
],
|
|
),
|
|
]
|
|
|
|
|
|
# ── Power Sources — Renewable ───────────────────────────────────
|
|
|
|
RENEWABLE_SOURCES: list[Entity] = [
|
|
Entity(
|
|
name="Wind Sail",
|
|
dimension="power_source",
|
|
description="Fabric or rigid sail harnessing wind for propulsion",
|
|
dependencies=[
|
|
Dependency("infrastructure", "fuel_infrastructure", "none", None, "requires"),
|
|
Dependency("environment", "atmosphere", "standard", None, "requires"),
|
|
Dependency("physical", "mass_kg", "20", "kg", "range_min"),
|
|
Dependency("force", "thrust_profile", "low_continuous", None, "provides"),
|
|
Dependency("force", "power_density_w_kg", "10", "W/kg", "provides"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Solar Photovoltaic Panel",
|
|
dimension="power_source",
|
|
description="Photovoltaic cells converting sunlight to electricity",
|
|
dependencies=[
|
|
Dependency("infrastructure", "fuel_infrastructure", "none", None, "requires"),
|
|
Dependency("environment", "star_proximity", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "10", "kg", "range_min"),
|
|
Dependency("force", "thrust_profile", "continuous_low", None, "provides"),
|
|
Dependency("force", "power_density_w_kg", "20", "W/kg", "provides"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Solar Sail",
|
|
dimension="power_source",
|
|
description="Propulsion via radiation pressure from a star",
|
|
dependencies=[
|
|
Dependency("environment", "atmosphere", "vacuum_or_thin", None, "requires"),
|
|
Dependency("environment", "star_proximity", "true", None, "requires"),
|
|
Dependency("physical", "surface_area_m2", "100", "m^2", "range_min"),
|
|
Dependency("force", "thrust_profile", "continuous_low", None, "provides"),
|
|
Dependency("force", "power_density_w_kg", "0.01", "W/kg", "provides"),
|
|
Dependency("environment", "medium", "space", None, "requires"),
|
|
],
|
|
),
|
|
]
|
|
|
|
|
|
# ── Power Sources — Biological / Human ──────────────────────────
|
|
|
|
BIOLOGICAL_SOURCES: list[Entity] = [
|
|
Entity(
|
|
name="Human Pedalling",
|
|
dimension="power_source",
|
|
description="Human-powered via pedalling mechanism",
|
|
dependencies=[
|
|
Dependency("infrastructure", "fuel_infrastructure", "none", None, "requires"),
|
|
Dependency("physical", "mass_kg", "0", "kg", "range_min"),
|
|
Dependency("force", "thrust_profile", "low_continuous", None, "provides"),
|
|
Dependency("force", "power_density_w_kg", "1.5", "W/kg", "provides"),
|
|
Dependency("physical", "energy_density_wh_kg", "200", "Wh/kg", "provides"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Animal Muscle",
|
|
dimension="power_source",
|
|
description="Animal traction power (horse, ox, or dog team)",
|
|
dependencies=[
|
|
Dependency("infrastructure", "fuel_infrastructure", "feed_supply", None, "requires"),
|
|
Dependency("environment", "ground_surface", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "0", "kg", "range_min"),
|
|
Dependency("force", "thrust_profile", "low_continuous", None, "provides"),
|
|
Dependency("force", "power_density_w_kg", "2", "W/kg", "provides"),
|
|
Dependency("physical", "energy_density_wh_kg", "200", "Wh/kg", "provides"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Pushed by a Friend",
|
|
dimension="power_source",
|
|
description="External human pushing the vehicle",
|
|
dependencies=[
|
|
Dependency("infrastructure", "fuel_infrastructure", "none", None, "requires"),
|
|
Dependency("physical", "mass_kg", "0", "kg", "range_min"),
|
|
Dependency("environment", "ground_surface", "true", None, "requires"),
|
|
Dependency("force", "thrust_profile", "low_continuous", None, "provides"),
|
|
Dependency("force", "power_density_w_kg", "1", "W/kg", "provides"),
|
|
Dependency("physical", "energy_density_wh_kg", "200", "Wh/kg", "provides"),
|
|
],
|
|
),
|
|
]
|
|
|
|
|
|
# ── Power Sources — Rocket / Space ──────────────────────────────
|
|
|
|
ROCKET_SOURCES: list[Entity] = [
|
|
Entity(
|
|
name="Solid Rocket Motor",
|
|
dimension="power_source",
|
|
description="Solid propellant rocket providing massive thrust in bursts",
|
|
dependencies=[
|
|
Dependency("infrastructure", "fuel_infrastructure", "solid_propellant", None, "requires"),
|
|
Dependency("physical", "mass_kg", "200", "kg", "range_min"),
|
|
Dependency("force", "thrust_profile", "extreme_burst", None, "provides"),
|
|
Dependency("force", "power_density_w_kg", "10000", "W/kg", "provides"),
|
|
Dependency("physical", "energy_density_wh_kg", "500", "Wh/kg", "provides"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Ion Thruster",
|
|
dimension="power_source",
|
|
description="Electric propulsion using ionized xenon gas for deep space",
|
|
dependencies=[
|
|
Dependency("infrastructure", "fuel_infrastructure", "xenon_propellant", None, "requires"),
|
|
Dependency("environment", "atmosphere", "vacuum_or_thin", None, "requires"),
|
|
Dependency("physical", "mass_kg", "10", "kg", "range_min"),
|
|
Dependency("force", "thrust_profile", "continuous_low", None, "provides"),
|
|
Dependency("force", "power_density_w_kg", "30", "W/kg", "provides"),
|
|
Dependency("physical", "energy_density_wh_kg", "3000", "Wh/kg", "provides"),
|
|
Dependency("environment", "medium", "space", None, "requires"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Modular Nuclear Reactor",
|
|
dimension="power_source",
|
|
description="Small modular nuclear fission reactor",
|
|
dependencies=[
|
|
Dependency("infrastructure", "fuel_infrastructure", "nuclear_fuel", None, "requires"),
|
|
Dependency("physical", "mass_kg", "2000", "kg", "range_min"),
|
|
Dependency("force", "thrust_profile", "extreme_continuous", None, "provides"),
|
|
Dependency("force", "power_density_w_kg", "50", "W/kg", "provides"),
|
|
Dependency("material", "radiation_shielding", "true", None, "requires"),
|
|
Dependency("physical", "energy_density_wh_kg", "500000", "Wh/kg", "provides"),
|
|
],
|
|
),
|
|
]
|
|
|
|
|
|
# ── Power Sources — Exotic / Fun ────────────────────────────────
|
|
|
|
EXOTIC_SOURCES: list[Entity] = [
|
|
Entity(
|
|
name="Cannonfire Recoil",
|
|
dimension="power_source",
|
|
description="Propulsion via sequential cannon blasts",
|
|
dependencies=[
|
|
Dependency("infrastructure", "fuel_infrastructure", "ammunition", None, "requires"),
|
|
Dependency("physical", "mass_kg", "100", "kg", "range_min"),
|
|
Dependency("force", "thrust_profile", "high_burst", None, "provides"),
|
|
Dependency("force", "power_density_w_kg", "3000", "W/kg", "provides"),
|
|
Dependency("physical", "energy_density_wh_kg", "200", "Wh/kg", "provides"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Compressed Air Engine",
|
|
dimension="power_source",
|
|
description="Engine powered by compressed air stored in high-pressure tanks",
|
|
dependencies=[
|
|
Dependency("infrastructure", "fuel_infrastructure", "compressed_air_station", None, "requires"),
|
|
Dependency("physical", "mass_kg", "20", "kg", "range_min"),
|
|
Dependency("force", "thrust_profile", "moderate_continuous", None, "provides"),
|
|
Dependency("force", "power_density_w_kg", "100", "W/kg", "provides"),
|
|
Dependency("physical", "energy_density_wh_kg", "30", "Wh/kg", "provides"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Flywheel",
|
|
dimension="power_source",
|
|
description="Kinetic energy stored in a spinning rotor",
|
|
dependencies=[
|
|
Dependency("infrastructure", "fuel_infrastructure", "charging_station", None, "requires"),
|
|
Dependency("physical", "mass_kg", "50", "kg", "range_min"),
|
|
Dependency("force", "thrust_profile", "high_burst", None, "provides"),
|
|
Dependency("force", "power_density_w_kg", "2000", "W/kg", "provides"),
|
|
Dependency("physical", "energy_density_wh_kg", "50", "Wh/kg", "provides"),
|
|
],
|
|
),
|
|
Entity(
|
|
name="Gravity Downhill",
|
|
dimension="power_source",
|
|
description="Gravitational potential energy on slopes and descents",
|
|
dependencies=[
|
|
Dependency("infrastructure", "fuel_infrastructure", "none", None, "requires"),
|
|
Dependency("environment", "gravity", "true", None, "requires"),
|
|
Dependency("environment", "ground_surface", "true", None, "requires"),
|
|
Dependency("physical", "mass_kg", "0", "kg", "range_min"),
|
|
Dependency("force", "thrust_profile", "low_continuous", None, "provides"),
|
|
Dependency("force", "power_density_w_kg", "10", "W/kg", "provides"),
|
|
],
|
|
),
|
|
]
|
|
|
|
|
|
# ── All Power Sources ───────────────────────────────────────────
|
|
|
|
POWER_SOURCES: list[Entity] = (
|
|
COMBUSTION_SOURCES
|
|
+ TURBINE_SOURCES
|
|
+ ELECTRIC_SOURCES
|
|
+ RENEWABLE_SOURCES
|
|
+ BIOLOGICAL_SOURCES
|
|
+ ROCKET_SOURCES
|
|
+ EXOTIC_SOURCES
|
|
)
|
|
|
|
|
|
# ── Domains ─────────────────────────────────────────────────────
|
|
|
|
URBAN_COMMUTING = Domain(
|
|
name="urban_commuting",
|
|
description="Daily travel within a city, 1-50km range",
|
|
metric_bounds=[
|
|
MetricBound("speed", weight=0.25, norm_min=5, norm_max=120, unit="km/h"),
|
|
MetricBound("cost_efficiency", weight=0.25, norm_min=0.01, norm_max=2.0, unit="$/km", lower_is_better=True),
|
|
MetricBound("safety", weight=0.25, norm_min=0.0, norm_max=1.0, unit="0-1"),
|
|
MetricBound("availability", weight=0.15, norm_min=0.0, norm_max=1.0, unit="0-1"),
|
|
MetricBound("range_fuel", weight=0.10, norm_min=5, norm_max=500, unit="km"),
|
|
],
|
|
)
|
|
|
|
INTERPLANETARY = Domain(
|
|
name="interplanetary_travel",
|
|
description="Travel between planets within a solar system",
|
|
metric_bounds=[
|
|
MetricBound("speed", weight=0.30, norm_min=1000, norm_max=300000, unit="km/s"),
|
|
MetricBound("range_fuel", weight=0.30, norm_min=1e6, norm_max=1e10, unit="km"),
|
|
MetricBound("safety", weight=0.20, norm_min=0.0, norm_max=1.0, unit="0-1"),
|
|
MetricBound("cost_efficiency", weight=0.10, norm_min=1e3, norm_max=1e9, unit="$/km", lower_is_better=True),
|
|
MetricBound("range_degradation", weight=0.10, norm_min=100, norm_max=36500, unit="days"),
|
|
],
|
|
)
|
|
|
|
MARITIME_SHIPPING = Domain(
|
|
name="maritime_shipping",
|
|
description="Ocean cargo transport between ports, 100-40000km range",
|
|
metric_bounds=[
|
|
MetricBound("speed", weight=0.15, norm_min=5, norm_max=60, unit="km/h"),
|
|
MetricBound("cargo_capacity", weight=0.25, norm_min=1, norm_max=200000, unit="tons"),
|
|
MetricBound("cost_efficiency", weight=0.25, norm_min=0.001, norm_max=1.0, unit="$/ton-km", lower_is_better=True),
|
|
MetricBound("safety", weight=0.20, norm_min=0.0, norm_max=1.0, unit="0-1"),
|
|
MetricBound("range_fuel", weight=0.15, norm_min=100, norm_max=40000, unit="km"),
|
|
],
|
|
)
|
|
|
|
LAST_MILE_DELIVERY = Domain(
|
|
name="last_mile_delivery",
|
|
description="Short-range package delivery within neighborhoods, 0.5-15km",
|
|
metric_bounds=[
|
|
MetricBound("speed", weight=0.25, norm_min=2, norm_max=60, unit="km/h"),
|
|
MetricBound("cost_efficiency", weight=0.30, norm_min=0.01, norm_max=5.0, unit="$/km", lower_is_better=True),
|
|
MetricBound("cargo_capacity_kg", weight=0.20, norm_min=1, norm_max=500, unit="kg"),
|
|
MetricBound("safety", weight=0.15, norm_min=0.0, norm_max=1.0, unit="0-1"),
|
|
MetricBound("environmental_impact", weight=0.10, norm_min=0, norm_max=500, unit="g CO2/km", lower_is_better=True),
|
|
],
|
|
)
|
|
|
|
CROSS_COUNTRY_FREIGHT = Domain(
|
|
name="cross_country_freight",
|
|
description="Long-distance overland cargo transport, 200-5000km",
|
|
metric_bounds=[
|
|
MetricBound("speed", weight=0.20, norm_min=20, norm_max=200, unit="km/h"),
|
|
MetricBound("cargo_capacity", weight=0.25, norm_min=0.5, norm_max=100, unit="tons"),
|
|
MetricBound("cost_efficiency", weight=0.25, norm_min=0.01, norm_max=5.0, unit="$/ton-km", lower_is_better=True),
|
|
MetricBound("range_fuel", weight=0.20, norm_min=100, norm_max=5000, unit="km"),
|
|
MetricBound("reliability", weight=0.10, norm_min=0.0, norm_max=1.0, unit="0-1"),
|
|
],
|
|
)
|
|
|
|
ALL_DOMAINS = [
|
|
URBAN_COMMUTING,
|
|
INTERPLANETARY,
|
|
MARITIME_SHIPPING,
|
|
LAST_MILE_DELIVERY,
|
|
CROSS_COUNTRY_FREIGHT,
|
|
]
|
|
|
|
|
|
def load_transport_seed(repo) -> dict:
|
|
"""Load all transport seed data into the repository. Idempotent — safe to re-run."""
|
|
import sqlite3
|
|
from physcom.db.repository import Repository
|
|
repo: Repository
|
|
|
|
counts = {"platforms": 0, "power_sources": 0, "domains": 0}
|
|
|
|
for entity in PLATFORMS:
|
|
try:
|
|
repo.add_entity(entity)
|
|
counts["platforms"] += 1
|
|
except sqlite3.IntegrityError:
|
|
existing = repo.get_entity_by_name(entity.dimension, entity.name)
|
|
if existing:
|
|
repo.replace_entity_dependencies(existing.id, entity.dependencies)
|
|
|
|
for entity in POWER_SOURCES:
|
|
try:
|
|
repo.add_entity(entity)
|
|
counts["power_sources"] += 1
|
|
except sqlite3.IntegrityError:
|
|
existing = repo.get_entity_by_name(entity.dimension, entity.name)
|
|
if existing:
|
|
repo.replace_entity_dependencies(existing.id, entity.dependencies)
|
|
|
|
for domain in ALL_DOMAINS:
|
|
try:
|
|
repo.add_domain(domain)
|
|
counts["domains"] += 1
|
|
except sqlite3.IntegrityError:
|
|
pass
|
|
# Backfill metric units and lower_is_better on existing DBs.
|
|
for mb in domain.metric_bounds:
|
|
repo.ensure_metric(mb.metric_name, unit=mb.unit)
|
|
if mb.lower_is_better:
|
|
repo.backfill_lower_is_better(domain.name, mb.metric_name)
|
|
|
|
return counts
|