Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,46 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased] - YYYY-MM-DD

### Added
- Model Registry System: Plugin-based architecture for resistance and consumption models using `@register_model` decorator.
- Generic Vessel Classes: Ship, Glider, AUV, and Aircraft classes replacing hard-coded vessel types.
- Resistance Models: Three pluggable resistance models:
- `ice_froude`: Froude number-based ice resistance with configurable k/b/n coefficients
- `wind_drag`: Angle-dependent wind drag with interpolation options (linear/cubic/spline)
- `wave_kreitner`: Kreitner wave resistance with beam/length/block coefficient parameters
- Consumption Models: Three pluggable consumption models:
- `polynomial_fuel`: Speed and resistance-based fuel consumption with polynomial coefficients
- `polynomial_battery`: Speed and depth-based battery consumption for underwater vehicles
- `constant_consumption`: Fixed-rate consumption for simple vehicles
- Configuration Validation: Comprehensive JSON schema for vessel configurations with detailed parameter documentation including units.
- Documentation:
- Vessel configuration gallery with ready-to-use examples (`docs/config/vessel_gallery.md`)
- Resistance models theory documentation (`docs/methods/resistance_models.md`)
- Complete model parameters reference (`docs/reference/model_parameters.md`)
- Example Configurations: Updated vessel configs for SDA, SDA_wind, Slocum, and BoatyMcBoatFace using new format.
- Unit Tests: 27 comprehensive tests covering model registry, all resistance/consumption models, generic vessel classes, and factory.

### Changed
- Vessel Configuration Format: `vessel_type` replaced with `vessel_class` + explicit model specifications.
- Configuration Structure: All vessel-specific parameters (beam, force_limit, etc.) now explicitly defined in model params rather than top-level.
- VesselFactory: Simplified factory using VESSEL_CLASSES mapping instead of hard-coded requirements dictionary.
- Physical Constants: Now configurable per-vessel (gravity, air_density, rho_water) with sensible defaults.
- Model Composition: Vessels compose multiple resistance models; total resistance is sum of all active models.

### Removed
- Legacy Vessel Classes (BREAKING): Deleted 12 hard-coded vessel files:
- `SDA.py`, `SDA_wind.py`, `example_ship.py` (ships)
- `slocum.py` (gliders)
- `boatymcboatface.py` (AUVs)
- `twin_otter.py`, `windracer.py` (aircraft)
- `abstract_ship.py`, `abstract_glider.py`, `abstract_alr.py`, `abstract_plane.py`, `abstract_uav.py` (abstract classes)
- Configuration Fields (BREAKING):
- `vessel_type` (replaced by `vessel_class`)
- `hull_type` (slender/blunt distinction now encoded in k/b/n coefficients)
- Top-level `beam`, `force_limit` (now in resistance model params)

## [1.1.11] - 2026-07-02

### Added
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ This will ensure your code passes all style checks before submission.
- Use the issue tracker to report bugs or request features.
- For bug reports, please include:
- A clear and concise description of the bug and what you expected to happen.
- Steps to reproduce the behavior.
- Steps to reproduce the behaviour.
- Screenshots and configuration/data files if relevant.
- For feature/enhancement requests, please include:
- A clear description of the problem or feature you want.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pip install --group test

## Usage

PolarRoute operates by creating an environmental mesh, adding vessel performance characteristics, and optimizing routes between waypoints. Environmental meshes are created using [MeshiPhi](https://github.com/bas-amop/MeshiPhi), which is installed automatically when installing PolarRoute.
PolarRoute operates by creating an environmental mesh, adding vessel performance characteristics, and optimising routes between waypoints. Environmental meshes are created using [MeshiPhi](https://github.com/bas-amop/MeshiPhi), which is installed automatically when installing PolarRoute.

### Quick Start (CLI)

Expand All @@ -55,7 +55,7 @@ create_mesh examples/environment_config/grf_example.config.json -o mesh.json
# Add vessel performance model
add_vehicle examples/vessel_config/SDA.config.json mesh.json -o vessel_mesh.json

# Optimize routes
# Optimise routes
optimise_routes examples/route_config/traveltime.config.json vessel_mesh.json examples/waypoints_example.csv -o routes.json
```

Expand Down
Loading
Loading