diff --git a/BREAKING.md b/BREAKING.md index 3e87343a..5a8883fd 100644 --- a/BREAKING.md +++ b/BREAKING.md @@ -4,7 +4,7 @@ This document describes breaking changes in CTModels releases and how to migrate your code. -## [0.19.4-beta] - unreleased +## [0.19.5] - 2026-09-17 ### No Breaking Changes @@ -674,6 +674,7 @@ The package automatically detects and handles both formats. All tests pass (3324 ### Migration Notes No action required for users. All existing code continues to work unchanged. This is an internal improvement that: + - Removes a redundant generic method - Improves type safety and method dispatch clarity - Maintains all existing public APIs @@ -770,11 +771,13 @@ Existing plotting code continues to work unchanged. ### Module and Type Renaming #### Overview + The InitialGuess module has been renamed to `Init` for better API ergonomics and more concise naming. This is a **breaking change** that requires users to update their imports and type references. #### What Changed ##### Module Name + ```julia # Before (0.8.2-beta and earlier) using CTModels.InitialGuess @@ -784,6 +787,7 @@ using CTModels: Init ``` ##### Type Names + ```julia # Before pre = CTModels.OptimalControlPreInit(...) @@ -829,11 +833,13 @@ pre_init = CTModels.PreInitialGuess(state=0.1, control=0.2) ### InitialGuess Validation Architecture Change #### Overview + Refactored the InitialGuess validation system to follow Single Responsibility Principle. This is an **internal architectural change** that does not affect the public API behavior but improves code organization. #### What Changed ##### Construction vs Validation Separation + ```julia # Before (0.8.1-beta and earlier) # initial_guess() validated internally, build_initial_guess() had mixed responsibilities @@ -844,6 +850,7 @@ Refactored the InitialGuess validation system to follow Single Responsibility Pr ``` ##### Validation Coverage Fix + ```julia # Before: This case was NOT validated (potential runtime error) bad_init = CTModels.InitialGuess(wrong_dimensions...) @@ -856,6 +863,7 @@ validated = CTModels.build_initial_guess(ocp, bad_init) # Throws IncorrectArgum #### Migration Required **No user code changes required** - this is an internal refactoring that: + - Maintains all existing public APIs - Fixes a validation gap for direct `AbstractInitialGuess` inputs - Improves error detection and code reliability @@ -874,13 +882,15 @@ validated = CTModels.build_initial_guess(ocp, bad_init) # Throws IncorrectArgum ### Module Migration to CTSolvers #### Overview + Major refactoring where several modules have been moved from CTModels to the new CTSolvers package. #### Moved Modules + The following modules are no longer part of CTModels and must be imported from CTSolvers: - **Options** → `using CTSolvers: Options` -- **Strategies** → `using CTSolvers: Strategies` +- **Strategies** → `using CTSolvers: Strategies` - **Orchestration** → `using CTSolvers: Orchestration` - **Optimization** → `using CTSolvers: Optimization` - **Modelers** → `using CTSolvers: Modelers` @@ -889,6 +899,7 @@ The following modules are no longer part of CTModels and must be imported from C #### Migration Guide ##### Before (CTModels < 0.8.0) + ```julia using CTModels using CTModels.Options @@ -897,6 +908,7 @@ using CTModels.Optimization ``` ##### After (CTModels ≥ 0.8.0) + ```julia using CTModels using CTSolvers: Options @@ -907,6 +919,7 @@ using CTSolvers: Optimization #### Specific Changes ##### Option Types + ```julia # Before using CTModels.Options @@ -918,6 +931,7 @@ opt = CTSolvers.OptionValue(100, :user) ``` ##### Strategy Types + ```julia # Before using CTModels.Strategies @@ -929,6 +943,7 @@ strategy = CTSolvers.DirectStrategy() ``` ##### Modelers + ```julia # Before using CTModels.Modelers @@ -940,6 +955,7 @@ modeler = CTSolvers.ADNLPModeler() ``` ##### DOCP Types + ```julia # Before using CTModels.DOCP diff --git a/CHANGELOG.md b/CHANGELOG.md index cdcce60f..1f50954e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ 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). -## [0.19.4-beta] - unreleased +## [0.19.5] - 2026-09-17 ### 📚 Documentation diff --git a/Project.toml b/Project.toml index ec8db667..89f9cb1a 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "CTModels" uuid = "34c4fa32-2049-4079-8329-de33c2a22e2d" -version = "0.19.4-beta" +version = "0.19.5" authors = ["Olivier Cots "] [deps] diff --git a/test/suite/serialization/test_multi_grids.jl b/test/suite/serialization/test_multi_grids.jl index 9c076273..ff055adb 100644 --- a/test/suite/serialization/test_multi_grids.jl +++ b/test/suite/serialization/test_multi_grids.jl @@ -159,14 +159,14 @@ function test_multi_grids() successful=Solutions.successful(sol_unified), ) + filename = tempname() + # Export - Serialization.export_ocp_solution( - sol_multi; filename="multi_grid_test", format=:JLD - ) + Serialization.export_ocp_solution(sol_multi; filename=filename, format=:JLD) # Import sol_reloaded = Serialization.import_ocp_solution( - ocp; filename="multi_grid_test", format=:JLD + ocp; filename=filename, format=:JLD ) # Verify time grid model type @@ -193,7 +193,7 @@ function test_multi_grids() Components.control(sol_multi)(t) atol=1e-8 end - remove_if_exists("multi_grid_test.jld2") + remove_if_exists(filename * ".jld2") end # ====================================================================