Metadata-Version: 2.4
Name: cosapp
Version: 1.8.0.post1
Summary: CoSApp, the Collaborative System Approach.
Home-page: https://cosapp.readthedocs.io
Author: CoSApp Development Team
License: Apache-2.0
Keywords: cosapp,system simulation,system design
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: <3.15,>=3.10
Description-Content-Type: text/markdown
License-File: LICENSE.rst
Requires-Dist: pandas
Requires-Dist: jsonschema
Requires-Dist: numpy>1.12
Requires-Dist: scipy>=1.11
Requires-Dist: jinja2
Requires-Dist: networkx
Provides-Extra: extra
Requires-Dist: ipython; extra == "extra"
Requires-Dist: pythonfmu>=0.7; extra == "extra"
Requires-Dist: watchdog; extra == "extra"
Provides-Extra: tests
Requires-Dist: coverage; extra == "tests"
Requires-Dist: pytest; extra == "tests"
Requires-Dist: pyfmi; extra == "tests"
Provides-Extra: docs
Requires-Dist: sphinx; extra == "docs"
Requires-Dist: nbsphinx>=0.6.0; extra == "docs"
Requires-Dist: sphinx-copybutton; extra == "docs"
Requires-Dist: sphinx-mdinclude; extra == "docs"
Requires-Dist: jupyter_client; extra == "docs"
Requires-Dist: ipykernel; extra == "docs"
Requires-Dist: ipywidgets; extra == "docs"
Requires-Dist: plotly; extra == "docs"
Requires-Dist: pyfmi; extra == "docs"
Requires-Dist: pytest; extra == "docs"
Dynamic: license-file

# CoSApp - Collaborative System Approach

The primary goal of **CoSApp** is to help technical departments in the design of complex systems.
To do so, the framework allows the simulation of various systems representing the different parts of the final product in a common environment.
The benefit is the ability for each subsystem team to carry out design study with a direct feedback at product level.

The main features are:

### Butterfly effect

Couple your simulation models with CoSApp to get immediate impact on main product variables and iterate to converge on a better design.

### Design guidance

All systems can share design parameters associated with an acceptable range.
You can take advantage of those limited degrees of freedom without fear of breaking your collaborators' work.

### Flexible simulation workflows

CoSApp solvers can be combined into versatile, customized workflows that fit specific simulation intents.

Have a look at the [introduction](https://cosapp.readthedocs.io/en/stable/tutorials/00-Introduction.html#), containing many tutorials!

This code is the property of Safran SA.
It uses code coming from various open-source projects (see [LICENSE](https://gitlab.com/cosapp/cosapp/blob/master/LICENSE.rst) file).

# Citing

If you use CoSApp, please cite us!

Lac *et al.* (2024), [CoSApp: a Python library to create, simulate and design complex systems](https://doi.org/10.21105/joss.06292), Journal of Open Source Software 9(94), 6292. 

BibTeX entry:

```bibtex
@article{Lac.etal:joss2024,
    author={Étienne Lac and Guy {De Spiegeleer} and Adrien Delsalle and Frédéric Collonval and Duc-Trung Lê and Mathias Malandain},
    title={CoSApp: a Python library to create, simulate and design complex systems},
    journal={Journal of Open Source Software},
    year={2024},
    volume={9},
    number={94},
    pages={6292},
    doi={10.21105/joss.06292},
    publisher={The Open Journal}
}
```

# Try it now!

Run a Jupyter Lab instance with binder to try out CoSApp features through examples.

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gl/cosapp%2Fcosapp/master?urlpath=lab/tree/docs/tutorials)
[![lite-badge](https://jupyterlite.rtfd.io/en/latest/_static/badge.svg)]( https://cosapp.gitlab.io/cosapp/)

# History


## 1.8.0 (2026-11-27)

*Published on PyPI as post-release 1.8.0.post1, after a failed deployment of version 1.8.0, with no functional change. Conda packages keep version 1.8.0.*

### 🔥 New feature: Robust graph analysis

- Graph analysis is now built from the system instance, instead of being reconstructed from its class: systems assembled in scripts, or with constructor arguments, are supported (MR [#549](https://gitlab.com/cosapp/cosapp/-/merge_requests/549)).
- Graph analysis never makes the resolution fail (MR [#551](https://gitlab.com/cosapp/cosapp/-/merge_requests/551)). If the `compute` method of a system cannot be analysed, all its outputs are assumed to depend fully on all its inputs, except for the dependencies declared by `@relationship` methods; warnings are only issued for dependencies used by the problem to solve, and list the undeclared pairs of variables. Any other failure of graph analysis falls back to a dense Jacobian matrix.
- New syntax `@relationship(of, wrt=...)` for the declaration of dependency matrices of shape `(size of "of", size of "wrt")`, *i.e.* the usual Jacobian convention; both arguments may be lists of variables, related by the same matrix (MR [#550](https://gitlab.com/cosapp/cosapp/-/merge_requests/550)):

  ```python
  @relationship(["u", "v"], wrt=["x", "y"])
  def elementwise(self):
      return scipy.sparse.identity(self.u.size)
  ```

- Many analysis fixes (MR [#551](https://gitlab.com/cosapp/cosapp/-/merge_requests/551)): loops over non-evaluable iterables, arrays modified through local aliases, loop variables over aliases and expressions, local aliases leaking into other systems, pulled transients, dependency matrices with the true shapes of edges (scalar and vector variables), connections related element by element, subscripts by local variables, element-wise functions `abs`, `np.where` and `np.clip`, port properties, `@relationship` methods bypassed by internal dependency paths, and dependencies lost through non-inlined method calls.

See tutorial [Graph-based Jacobian analysis](https://cosapp.readthedocs.io/en/stable/tutorials/GraphAnalysis.html) for more details.

### 🔥 New feature: Efficient parallel Jacobian evaluations

Parallel finite-difference Jacobian evaluations (`FfdJacobianEvaluation` with a multi-processing or multi-threading execution policy) now exploit the sparsity pattern given by graph analysis, and keep their workers alive over whole simulations. Implicit time drivers accept them with option `jac`, as `NonLinearSolver` does:

```python
from cosapp.core.execution import ExecutionPolicy, ExecutionType
from cosapp.core.numerics.solve import FfdJacobianEvaluation

policy = ExecutionPolicy(workers_count=4, execution_type=ExecutionType.MULTI_THREADING)
CrankNicolson(dt=0.01, graph_analysis=True, jac=FfdJacobianEvaluation(execution_policy=policy))
```

- Groups of structurally independent columns are distributed among workers, instead of single columns, partial updates are expanded to whole groups, and sparse storage and resolution are available in parallel execution (MR [#552](https://gitlab.com/cosapp/cosapp/-/merge_requests/552)).
- Workers, and their replicas of the system, are kept over time steps by implicit time drivers (MR [#555](https://gitlab.com/cosapp/cosapp/-/merge_requests/555)), and over the resolutions of a `NonLinearSolver` nested in another driver, *e.g.* in a time driver (MR [#558](https://gitlab.com/cosapp/cosapp/-/merge_requests/558)), instead of being started and sent a copy of the system at each resolution.
- Replicas are synchronized at each resolution with the minimum necessary information: free inputs and mode variables of the system tree, clock time, and the state of time integration. They are created anew after structural transitions. Replicas kept from a previous resolution are checked against the original system: if they are inconsistent, *e.g.* if computations rely on a state not held by variables, a warning is issued, and replicas are created anew at each resolution.
- Results are identical to sequential evaluations.

Parallel evaluations pay off when Jacobian evaluations dominate the computational cost, *i.e.* for strongly coupled problems with expensive model evaluations; they used to be up to ten times slower than sequential evaluations in time simulations. Benchmarks of parallel evaluations are added to the `asv` suite (MR [#556](https://gitlab.com/cosapp/cosapp/-/merge_requests/556)).
See tutorial [Multiprocessing and multi-threading](https://cosapp.readthedocs.io/en/stable/tutorials/Multiprocessing.html) for more details (MR [#561](https://gitlab.com/cosapp/cosapp/-/merge_requests/561)).

### ⚠️ Upgrade notes

- Decorator `@relationship(object1, object2)` is deprecated: replace `@relationship("x", "y")` with `@relationship("y", wrt="x")`, in reverse order. In a future version, two positional arguments will be interpreted as `(of, wrt)` (MR [#550](https://gitlab.com/cosapp/cosapp/-/merge_requests/550)).
- `System.add_dependency`, which had no effect, is removed; use `@relationship` methods instead (MR [#550](https://gitlab.com/cosapp/cosapp/-/merge_requests/550)).
- Errors in the dependencies declared by `@relationship` methods (unknown variables, matrices of wrong shape) raise `RelationshipError`, a subclass of `ValueError`; other graph analysis failures issue warnings instead of exceptions (MR [#551](https://gitlab.com/cosapp/cosapp/-/merge_requests/551)). Errors detected by the decorator when the class is defined (variables related to themselves, methods decorated twice) raise `RelationshipError` as well, instead of a plain `ValueError` (MR [#568](https://gitlab.com/cosapp/cosapp/-/merge_requests/568)).
- Function `ir_from_cosapp` of `cosapp.core.ir.io` is removed, in favour of `ir_from_system`, building the IR from a system instance (MR [#549](https://gitlab.com/cosapp/cosapp/-/merge_requests/549)).
- `System.to_d3` and `System.to_n2` no longer write HTML files, and display inline; argument `show` is deprecated (MR [#542](https://gitlab.com/cosapp/cosapp/-/merge_requests/542)).
- Singular Jacobian matrices raise `SingularJacobianError`, a subclass of `ArithmeticError`: in `setup` of `DenseLUSolver` and `SparseLUSolver`, instead of `LinAlgWarning`, and in nested `NonLinearSolver` drivers and implicit time drivers, instead of `ArithmeticError` (MR [#564](https://gitlab.com/cosapp/cosapp/-/merge_requests/564)).
- Ports serialize the attributes set by derived classes, *e.g.* in `__init__`, instead of setting them anew at deserialization (MR [#554](https://gitlab.com/cosapp/cosapp/-/merge_requests/554)).
- Implicit time drivers report failed resolutions: a resolution giving no solution raises an `ArithmeticError` (`SingularJacobianError` with a singular Jacobian matrix), and time steps which did not converge log a warning, the simulation going on as before (MR [#563](https://gitlab.com/cosapp/cosapp/-/merge_requests/563)).

### Other new features & API changes

- Jacobian evaluations and nonlinear solvers can open sessions (context manager `session`) spanning several resolutions, in which workers of parallel evaluations are kept alive (MR [#555](https://gitlab.com/cosapp/cosapp/-/merge_requests/555)).
- `RelationshipError` is exposed in `cosapp.base` (MR [#568](https://gitlab.com/cosapp/cosapp/-/merge_requests/568)).
- New exception `SingularJacobianError`, exported by `cosapp.base`, raised when a linear system cannot be solved owing to a singular Jacobian matrix; attribute `jac_errors` gives the indices of unknowns with no influence, and of residues influenced by no unknown. LU solvers used without a valid factorization now raise an explicit `RuntimeError` (MR [#564](https://gitlab.com/cosapp/cosapp/-/merge_requests/564)).
- New option `secant_updates` of the Newton-Raphson solver (`NonLinearSolver`, implicit time drivers), enabled by default: with `secant_updates=False`, the Jacobian matrix is only updated by finite-difference evaluations, without secant (Broyden or Schubert) corrections (MR [#565](https://gitlab.com/cosapp/cosapp/-/merge_requests/565)).
- New property `TimeDerivative.previous`, value of the source variable of a rate at the latest update (MR [#555](https://gitlab.com/cosapp/cosapp/-/merge_requests/555)).

### Bug fixes & Code improvements

- Fix system display in VS Code notebooks, contributed by Haris Musaefendic (MR [#541](https://gitlab.com/cosapp/cosapp/-/merge_requests/541)).
- Fix graph analysis of variables and ports declared with keyword arguments or metadata (MR [#543](https://gitlab.com/cosapp/cosapp/-/merge_requests/543)).
- Refactor HTML renderers in `cosapp.tools.views`; embeddable D3 views now draw (MR [#544](https://gitlab.com/cosapp/cosapp/-/merge_requests/544)).
- Fix graph analysis of ports calling `super().setup()` (MR [#545](https://gitlab.com/cosapp/cosapp/-/merge_requests/545)), of ports with a custom `__init__` method (MR [#546](https://gitlab.com/cosapp/cosapp/-/merge_requests/546)), of port classes sharing the same name (MR [#547](https://gitlab.com/cosapp/cosapp/-/merge_requests/547)), and of attribute access in system `setup` (MR [#548](https://gitlab.com/cosapp/cosapp/-/merge_requests/548)).
- Fix implicit time drivers with a parallel Jacobian evaluation: arguments of the residue function were not passed to workers (MR [#553](https://gitlab.com/cosapp/cosapp/-/merge_requests/553)).
- Fix port attributes lost by serialization, which made parallel executions fail with ports depending on a global context (MR [#554](https://gitlab.com/cosapp/cosapp/-/merge_requests/554)).
- Fix wrong parallel Jacobian matrices with rates: replicas updated rates with perturbed values (MR [#555](https://gitlab.com/cosapp/cosapp/-/merge_requests/555)).
- Fix workers of parallel Jacobian evaluations left running when a simulation is interrupted by an exception (MR [#558](https://gitlab.com/cosapp/cosapp/-/merge_requests/558)).
- Fix graph analysis of subscripts of non-array properties, *e.g.* entries of dict or list properties (`self.coef["a"]`), which made the analysis of `compute` fail, or the dependencies of the other operands full (MR [#562](https://gitlab.com/cosapp/cosapp/-/merge_requests/562)).
- Fix the creation of `Singleton` instances, which was not thread-safe: threads creating the instance concurrently could each create their own (MR [#567](https://gitlab.com/cosapp/cosapp/-/merge_requests/567)).
- Fix failed resolutions ignored by implicit time drivers: they gave an unclear `ValueError`, or went unnoticed for the intrinsic problem, and time steps which did not converge were silently accepted (MR [#563](https://gitlab.com/cosapp/cosapp/-/merge_requests/563)).

### Documentation & Maintenance

- Document `@relationship(of, wrt=...)` and the fallback behaviour of graph analysis in tutorial *Graph-based Jacobian analysis* (MR [#550](https://gitlab.com/cosapp/cosapp/-/merge_requests/550), [#551](https://gitlab.com/cosapp/cosapp/-/merge_requests/551)).
- Add benchmarks of parallel Jacobian evaluations to the `asv` suite (MR [#556](https://gitlab.com/cosapp/cosapp/-/merge_requests/556)).
- Document parallel Jacobian evaluations in implicit time drivers in tutorial *Multiprocessing and multi-threading* (MR [#561](https://gitlab.com/cosapp/cosapp/-/merge_requests/561)).
- Remove deprecated keyword argument `ctx` from `ast.Constant` nodes, ahead of Python 3.15; a source code test prevents its reintroduction (MR [#559](https://gitlab.com/cosapp/cosapp/-/merge_requests/559)).
- Fix a `SyntaxWarning` (invalid escape sequence) in the docstring of `ZeroCrossing.from_comparison` (MR [#566](https://gitlab.com/cosapp/cosapp/-/merge_requests/566)).
- Shorten the keyboard interrupt test of worker pools (about 10 s less per test job), and remove commented-out code (MR [#560](https://gitlab.com/cosapp/cosapp/-/merge_requests/560)).


## 1.7.0 (2026-11-10)

### 🔥 New feature: Sparse Newton-Raphson resolution

With graph analysis (`graph_analysis=True`), the Newton-Raphson solver of `NonLinearSolver` and of implicit time drivers (`EulerImplicit`, `CrankNicolson`, `BdfIntegrator`) can now store the Jacobian matrix in sparse format, and solve linear systems with a sparse LU decomposition (MR [#528](https://gitlab.com/cosapp/cosapp/-/merge_requests/528), [#535](https://gitlab.com/cosapp/cosapp/-/merge_requests/535)):

```python
NonLinearSolver("solver", graph_analysis=True, sparse=True)
CrankNicolson(dt=0.01, graph_analysis=True, sparse=True)
```

- New solver options `sparse` (`"auto"` by default, `True` or `False`), `sparse_min_size` and `sparse_max_density`: in mode `"auto"`, sparse resolution is used for problems with at least 100 unknowns, and a Jacobian matrix density (ratio of structurally non-zero elements) of at most 5%. A linear solver set explicitly (`linear_solver=...`) is kept, with a warning if another one is recommended.
- Finite-difference Jacobian evaluations exploit the sparsity pattern at a cost proportional to the number of non-zero elements, and partial Jacobian updates are now available with graph analysis.
- Secant (Broyden) updates of the Jacobian matrix preserve its sparsity pattern (Schubert update), whatever its storage format, and are safeguarded against round-off noise (MR [#536](https://gitlab.com/cosapp/cosapp/-/merge_requests/536)).
- Graph analysis now scales linearly with array sizes: 0.12 s instead of 20 s for 18,000 unknowns. `@relationship` methods may return SciPy sparse matrices, recommended for large arrays (MR [#532](https://gitlab.com/cosapp/cosapp/-/merge_requests/532)).
- In implicit time drivers, the intrinsic problem of the system and the time-dependent problem are analysed separately, each with its own sparsity pattern (MR [#535](https://gitlab.com/cosapp/cosapp/-/merge_requests/535)).

On multi-particle dynamics integrated with `CrankNicolson`, the Newton-Raphson resolution of 6,000 unknowns takes 2.7 s instead of 466 s with dense resolution.
See tutorial [Graph-based Jacobian analysis](https://cosapp.readthedocs.io/en/stable/tutorials/GraphAnalysis.html) for more details.

### 🔥 New feature: Multi-threading

Following the multiprocessing capabilities introduced in [version 1.0](https://gitlab.com/cosapp/cosapp/-/releases/v1.0.0), CoSApp now supports multi-threading (MR [#525](https://gitlab.com/cosapp/cosapp/-/merge_requests/525)).
All features supporting parallel execution (`LinearDoE`, `MonteCarlo`, finite-difference Jacobian of `NonLinearSolver`, batch runs and system surrogates) can distribute computations on threads, with execution type `ExecutionType.MULTI_THREADING`:

```python
from cosapp.core.execution import ExecutionPolicy, ExecutionType

execution_policy = ExecutionPolicy(workers_count=4, execution_type=ExecutionType.MULTI_THREADING)
```

- Threads only run Python code in parallel with a *free-threaded* build of Python (3.14t or later).
  With standard builds, where the global interpreter lock (GIL) is enabled, threads only speed up computations releasing the GIL, such as large NumPy operations; creating a thread pool then logs an information message.
- With free-threaded Python, threads are as fast as processes started with method *fork*, and avoid the start-up cost of method *spawn* (several seconds per pool), the only one used on Windows and macOS.
- As with processes, each worker computes on its own copy of the system and its drivers, so that results do not depend on the execution type.
- `pyfmi` and `pythonfmu` have no free-threaded builds: FMU export is not available with free-threaded Python.
- With threads and processes alike, a keyboard interrupt (Ctrl+C) received while waiting for results is now raised right away, instead of once the next result is available; tasks already running complete before workers stop.

See tutorial [Multiprocessing and multi-threading](https://cosapp.readthedocs.io/en/stable/tutorials/Multiprocessing.html) for more details.

### ⚠️ Upgrade notes

- Execution status of systems is specific to each system tree, for thread-safety: class-level context manager `System.set_master` is removed, as well as class method `OptionalDriver.set_inhibited`, since inhibition of optional drivers by `Optimizer` and `Influence` only affects the owner system tree (MR [#510](https://gitlab.com/cosapp/cosapp/-/merge_requests/510)).
- Type checking of port variables is specific to each system tree: `BasePort.set_type_checking` is removed, and unpickling a port no longer validates its values (MR [#512](https://gitlab.com/cosapp/cosapp/-/merge_requests/512)).
- FMU export is adapted to `pythonfmu` 0.7, now required (`pythonfmu>=0.7`), and `pyfmi` is unpinned (MR [#513](https://gitlab.com/cosapp/cosapp/-/merge_requests/513)).
- Logging context state is specific to each thread. The log file is rotated at the start of each simulation, a batch run being logged as a single simulation (instead of rotating the log file at each batch point), and parallel workers never rotate the log file. A free-threaded Python 3.14 test job is added to CI (MR [#516](https://gitlab.com/cosapp/cosapp/-/merge_requests/516)).
- With `graph_analysis=True`, problems with at least 100 unknowns and a sparse Jacobian matrix are now solved with sparse resolution by default; option `sparse=False` restores dense resolution. Partial Jacobian updates now take place with graph analysis, and `NewtonRaphsonSolver.sparsity` returns the sparsity pattern as a SciPy CSR matrix (MR [#528](https://gitlab.com/cosapp/cosapp/-/merge_requests/528)).
- Exceptions raised during Newton-Raphson iterations, *e.g.* by the `compute` method of a system, or by a keyboard interrupt (Ctrl+C), are now propagated, instead of being silenced (MR [#529](https://gitlab.com/cosapp/cosapp/-/merge_requests/529)); `ValueError` exceptions are no longer reported as singular Jacobian matrices (MR [#533](https://gitlab.com/cosapp/cosapp/-/merge_requests/533)).

### Other new features & API changes

- Replace `UniversalClock` singleton by per-tree clocks (MR [#509](https://gitlab.com/cosapp/cosapp/-/merge_requests/509)).
- Support Python 3.14 (MR [#514](https://gitlab.com/cosapp/cosapp/-/merge_requests/514)).
- Rewrite of the N2 viewer (`cosapp.tools.view_model`), now free of external JavaScript libraries. It highlights the inputs modified by drivers (unknowns of the intrinsic problem or of solvers, transients and rates) as well as mode variables, and shows port types and shortened variable names (*e.g.* `system.k` for `system.inwards.k`) on hover. The first argument of `view_model` is renamed `system`; arguments `draw_potential_connections` and `include_orphan_vars` are deprecated, and ignored (MR [#526](https://gitlab.com/cosapp/cosapp/-/merge_requests/526)).
- Add method `System.to_n2`, returning the N2 diagram of the system as an `IPython.display.IFrame`, like `System.to_d3` (MR [#539](https://gitlab.com/cosapp/cosapp/-/merge_requests/539)).

### Bug fixes & Code improvements

- Fix a bug in `MultiFiCoKriging` revealed in SciPy 1.16 (MR [#505](https://gitlab.com/cosapp/cosapp/-/merge_requests/505)).
- Fix attribute `max_abs_step` not transmitted to pulled transients (MR [#506](https://gitlab.com/cosapp/cosapp/-/merge_requests/506)).
- Avoid deprecated `inplace` keyword in `DataFrame.rename` (MR [#508](https://gitlab.com/cosapp/cosapp/-/merge_requests/508)).
- Minor refactoring pass: `Module` methods, type hints in `cosapp.utils.helpers`, removal of obsolete Python version checks (MR [#515](https://gitlab.com/cosapp/cosapp/-/merge_requests/515)).
- Fix `Optimizer` warning about unknown solver option `disp` with SciPy 1.18 (MR [#517](https://gitlab.com/cosapp/cosapp/-/merge_requests/517)).
- Fix `KeyError` raised by `Observer.__del__` during garbage collection (MR [#518](https://gitlab.com/cosapp/cosapp/-/merge_requests/518)).
- Fix `DSVRecorder` raw data when recording into a file, which made parallel runs hang (MR [#520](https://gitlab.com/cosapp/cosapp/-/merge_requests/520)).
- Fix `DSVRecorder` writing records into new files without headers, which lost the first record (MR [#521](https://gitlab.com/cosapp/cosapp/-/merge_requests/521)).
- Fix `Pool` worker dispatch: explicit worker 0, and default dispatch (MR [#522](https://gitlab.com/cosapp/cosapp/-/merge_requests/522)).
- Fix `Pool.activate`, which did not stop workers when an exception was raised (MR [#523](https://gitlab.com/cosapp/cosapp/-/merge_requests/523)).
- Fix silent failures of transfers between `Pool` and worker processes: tasks or results which cannot be pickled made pools wait forever; they now raise an error, or are reported as error results (MR [#524](https://gitlab.com/cosapp/cosapp/-/merge_requests/524)).
- Fix several bugs in `SparseLUSolver`: Jacobian matrix not stored by `setup`, wrong `eval` (LU permutations ignored), pickling failure after resolution, and silent failure with singular matrices (MR [#527](https://gitlab.com/cosapp/cosapp/-/merge_requests/527)).
- Fix exceptions silenced by `return` statements in `finally` clauses, in `NewtonRaphsonSolver` and `TimeUnknownDict.pop`; clean-up of nonlinear solvers is now exception-safe (MR [#529](https://gitlab.com/cosapp/cosapp/-/merge_requests/529)).
- Fix graph analysis of slice updates: augmented assignments (`+=`, `-=`, etc.) were ignored, and statements reading a slice of a previously assigned variable corrupted its dependencies (MR [#530](https://gitlab.com/cosapp/cosapp/-/merge_requests/530)).
- Fix graph analysis of systems inheriting `setup` or `@relationship` methods from a base class (MR [#531](https://gitlab.com/cosapp/cosapp/-/merge_requests/531)).
- Fix misreported singular Jacobian matrices in `NewtonRaphsonSolver`: only failures of the linear solver are reported as such, and iterations stop on infinite residues (MR [#533](https://gitlab.com/cosapp/cosapp/-/merge_requests/533)).
- Fix bounds and step limits of unknowns ignored by implicit time drivers when the system has an intrinsic problem; the intrinsic problem is now solved by a dedicated solver (MR [#534](https://gitlab.com/cosapp/cosapp/-/merge_requests/534)).
- Fix spurious warning of implicit time drivers with options `graph_analysis=True` and `sparse=True`, when the system has no intrinsic problem (MR [#538](https://gitlab.com/cosapp/cosapp/-/merge_requests/538)).

### Documentation & Maintenance

- Isolate `FMUForwardHandler` logging tests from global root logger state (MR [#507](https://gitlab.com/cosapp/cosapp/-/merge_requests/507)).
- Loosen tolerance levels in SciPy solver tests, for robustness (MR [#511](https://gitlab.com/cosapp/cosapp/-/merge_requests/511)).
- Update the tutorial on parallel execution, now titled *Multiprocessing and multi-threading*: both execution types, all features supporting parallel execution, and a new section on multi-threading (MR [#525](https://gitlab.com/cosapp/cosapp/-/merge_requests/525)).
- CI/CD: Add a Windows test job (Python 3.13), run in scheduled pipelines, and as an optional manual job otherwise (MR [#519](https://gitlab.com/cosapp/cosapp/-/merge_requests/519)).
- Document sparse resolution in tutorial *Graph-based Jacobian analysis* (MR [#528](https://gitlab.com/cosapp/cosapp/-/merge_requests/528), [#535](https://gitlab.com/cosapp/cosapp/-/merge_requests/535)).
- Add benchmarks of graph analysis and sparse Newton-Raphson resolution to the `asv` suite (MR [#537](https://gitlab.com/cosapp/cosapp/-/merge_requests/537)).


## 1.6.2 (2026-10-06)

### New features & API changes

- Add method `System.show_tree` (MR [#502](https://gitlab.com/cosapp/cosapp/-/merge_requests/502)).
- Decorator `relationship` is now accessible in module `cosapp.core.ir` (MR [#504](https://gitlab.com/cosapp/cosapp/-/merge_requests/504)).

### Bug fixes & Code improvements

- Fix IR bug for sub-systems declared with keyword arguments (MR [#496](https://gitlab.com/cosapp/cosapp/-/merge_requests/496)).
- Handle calls to `super()` methods (`setup`, `compute`) in IR analysis (MR [#497](https://gitlab.com/cosapp/cosapp/-/merge_requests/497)).
- Handle sub-systems created by class method factories in IR analysis (MR [#498](https://gitlab.com/cosapp/cosapp/-/merge_requests/498)).
- Fix `graph_analysis` for multi-point design problems; also fixes several independent, pre-existing dependency-tracking gaps surfaced along the way (self-referencing port variables, nested sub-system relations, named equations) (MR [#501](https://gitlab.com/cosapp/cosapp/-/merge_requests/501)).
- Fix `graph_analysis` with input-to-input connectors, *e.g.* the automatic variable "pulling" triggered by connecting two input ports of sibling sub-systems; also adds support for inlining simple sibling-method calls, `@property` getters, and loops over port-tuple properties in `compute()` (MR [#499](https://gitlab.com/cosapp/cosapp/-/merge_requests/499)).

### Documentation & Maintenance

- Fix incorrect docstring in `BdfIntegrator`; improve tests on `BdfWeights.push_step` (MR [#500](https://gitlab.com/cosapp/cosapp/-/merge_requests/500)).


## 1.6.1 (2026-06-26)

### Bug fixes & Code improvements

- Handle IR model for System setup with kwargs (MR [#492](https://gitlab.com/cosapp/cosapp/-/merge_requests/492)).
- Fix a bug in `FixedPointSolver` (MR [#493](https://gitlab.com/cosapp/cosapp/-/merge_requests/493)).

### Documentation & Maintenance

- Update module list in API documentation (MR [#491](https://gitlab.com/cosapp/cosapp/-/merge_requests/491)).
- Update environment files for benchmarks, binder & Jupyter Lite (MR [#489](https://gitlab.com/cosapp/cosapp/-/merge_requests/489)).
- CI/CD: Update Docker build prerequisites (MR [#490](https://gitlab.com/cosapp/cosapp/-/merge_requests/490)).
- CI/CD: Remove unnecessary tick box on tests in MR template (MR [#494](https://gitlab.com/cosapp/cosapp/-/merge_requests/494)).


## 1.6.0 (2026-06-10)

### 🔥 New feature: Variable dependency graph analysis

This new feature improves performance by enabling graph coloring during gradient computations in `NonLinearSolver` and implicit time drivers. At present, it is an opt-in feature, activated by argument `graph_analysis`; for example:

```python
solver = system.add_driver(NonLinearSolver("solver", graph_analysis=True))
```

MRs [#445](https://gitlab.com/cosapp/cosapp/-/merge_requests/445), [#446](https://gitlab.com/cosapp/cosapp/-/merge_requests/446), [#451](https://gitlab.com/cosapp/cosapp/-/merge_requests/451), [#474](https://gitlab.com/cosapp/cosapp/-/merge_requests/474), [#476](https://gitlab.com/cosapp/cosapp/-/merge_requests/476), [#477](https://gitlab.com/cosapp/cosapp/-/merge_requests/477), [#478](https://gitlab.com/cosapp/cosapp/-/merge_requests/478), [#482](https://gitlab.com/cosapp/cosapp/-/merge_requests/482).

### Bug fixes & Code improvements

- Fix a bug in implicit time driver transition (MR [#479](https://gitlab.com/cosapp/cosapp/-/merge_requests/479)).
- Improve the serialization of system properties (MR [#481](https://gitlab.com/cosapp/cosapp/-/merge_requests/481)).
- Add `*args, **kwargs` arguments to `RunSingleCase.add_problem` (MR [#486](https://gitlab.com/cosapp/cosapp/-/merge_requests/486)).
- Various code quality improvements (MRs [#484](https://gitlab.com/cosapp/cosapp/-/merge_requests/484), [#485](https://gitlab.com/cosapp/cosapp/-/merge_requests/485), [#487](https://gitlab.com/cosapp/cosapp/-/merge_requests/487))

### Documentation & Maintenance

- New tutorial on graph analysis (MR [#482](https://gitlab.com/cosapp/cosapp/-/merge_requests/482)).
- Latest supported Python version set to 3.13 due to remaining issues with Python 3.14 (MR [#475](https://gitlab.com/cosapp/cosapp/-/merge_requests/475)).


## 1.5.0 (2026-04-15)

### Bug fixes & Code improvements

- Fix a bug with connectors after system swap (MR [#457](https://gitlab.com/cosapp/cosapp/-/merge_requests/457)).
- Fix a bug on the jsonification of custom objects (MR [#453](https://gitlab.com/cosapp/cosapp/-/merge_requests/453)).
- Fix a logging bug with Python>3.11 (MR [#454](https://gitlab.com/cosapp/cosapp/-/merge_requests/454)).
- Ensure that port description is transmitted during pulling (MR [#461](https://gitlab.com/cosapp/cosapp/-/merge_requests/461)).
- Fix a minor bug in solver problem (MR [#464](https://gitlab.com/cosapp/cosapp/-/merge_requests/464)).
- Improve logger performance (MR [#462](https://gitlab.com/cosapp/cosapp/-/merge_requests/462)).
- Add a setter for variable description (MR [#466](https://gitlab.com/cosapp/cosapp/-/merge_requests/466)).
- Improve context manager `no_exception` for testing (MRs [#465](https://gitlab.com/cosapp/cosapp/-/merge_requests/465)).
- Fix a bad formatting of error and warning messages issued by driver `ValidityCheck` (MRs [#470](https://gitlab.com/cosapp/cosapp/-/merge_requests/470)).
- General refactoring pass and code improvements (MRs [#459](https://gitlab.com/cosapp/cosapp/-/merge_requests/459), [#460](https://gitlab.com/cosapp/cosapp/-/merge_requests/460), [#463](https://gitlab.com/cosapp/cosapp/-/merge_requests/463), [#466](https://gitlab.com/cosapp/cosapp/-/merge_requests/466), [#467](https://gitlab.com/cosapp/cosapp/-/merge_requests/467), [#468](https://gitlab.com/cosapp/cosapp/-/merge_requests/468)).

### Documentation & Maintenance

- Update the tutorial on ports (MR [#469](https://gitlab.com/cosapp/cosapp/-/merge_requests/469)).
- Fix coverage capture in CI/CD script (MR [#455](https://gitlab.com/cosapp/cosapp/-/merge_requests/455)).
- Move legacy benchmark files (MR [#456](https://gitlab.com/cosapp/cosapp/-/merge_requests/456)).
- Pin `pyfmi` version due to test regressions (MR [#458](https://gitlab.com/cosapp/cosapp/-/merge_requests/458)).
- Reactivate skipped logging tests for FMU exporter (MR [#471](https://gitlab.com/cosapp/cosapp/-/merge_requests/471)).


## 1.4.0 (2025-12-14)

### New features & API changes

- Add the possibility to declare unknowns and equations in implicit time drivers (MR [#447](https://gitlab.com/cosapp/cosapp/-/merge_requests/447)).
- Simplify `System.add_inward` and `add_outward` (MR [#448](https://gitlab.com/cosapp/cosapp/-/merge_requests/448)).

### Bug fixes & Code improvements

- Fix `WeakSet` pickling for Python 3.14 (MR [#451](https://gitlab.com/cosapp/cosapp/-/merge_requests/451)).
- Fix minor bugs in tests on dynamic systems (MR [#450](https://gitlab.com/cosapp/cosapp/-/merge_requests/450)).
- Fix bugs with implicit time drivers (MR [#449](https://gitlab.com/cosapp/cosapp/-/merge_requests/449)).
- Fix bug with nested solvers (MR [#443](https://gitlab.com/cosapp/cosapp/-/merge_requests/443)).

### Documentation & Maintenance

- New `Docker` container serving `JupyterLite` image (MR [#444](https://gitlab.com/cosapp/cosapp/-/merge_requests/444)).
- Update CI script (MR [#442](https://gitlab.com/cosapp/cosapp/-/merge_requests/442)).


## 1.3.0 (2025-09-18)

### New features & API changes

- Deprecation of methods `NonLinearSolver.extend` and `RunSingleCase.extend`, replaced by new methods `add_problem` (MR [#430](https://gitlab.com/cosapp/cosapp/-/merge_requests/430)).
- Declaring integer-valued `numpy` arrays no longer raises a warning (MR [#428](https://gitlab.com/cosapp/cosapp/-/merge_requests/428)).
- Harmonize solver option "history" between `NonLinearSolver` and `Optimizer` (MR [#432](https://gitlab.com/cosapp/cosapp/-/merge_requests/432)).
  `Optimizer` option "monitored" is now deprecated, in favour of "history".
  Moreover, option "history" can now be set at recorder creation:

  ```python
  solver = system.add_solver(NonLinearSolver("solver"))

  solver.add_recorder(DataFrameRecorder(...), history=True)
  ```

### Bug fixes & Code improvements

- Add missing initial data in solver convergence path (MR [#431](https://gitlab.com/cosapp/cosapp/-/merge_requests/431)).
- Handle zero-sized `numpy` arrays in mathematical algorithms (MR [#433](https://gitlab.com/cosapp/cosapp/-/merge_requests/433)).
- Fix bugs with multidimensional arrays as unknowns or transient variables (MR [#434](https://gitlab.com/cosapp/cosapp/-/merge_requests/434)).
- Fix bug on targets during mathematical problem extension (MR [#435](https://gitlab.com/cosapp/cosapp/-/merge_requests/435)).
- Fix bug on target detection during system problem assembly (MR [#436](https://gitlab.com/cosapp/cosapp/-/merge_requests/436)).
- Fix target initialization issue in implicit time drivers (MR [#437](https://gitlab.com/cosapp/cosapp/-/merge_requests/437)).
- New deprecation decorator (MR [#429](https://gitlab.com/cosapp/cosapp/-/merge_requests/429)).
- Improved type hints and general refactoring pass (MR [#438](https://gitlab.com/cosapp/cosapp/-/merge_requests/438)).

### Documentation

- Updated tutorial on targets (MR [#440](https://gitlab.com/cosapp/cosapp/-/merge_requests/440)).


## 1.2.0 (2025-06-13)

### New features & API changes

- New function `cosapp.systems.batch_run` and support class `BatchRunner` to obtain the response surface of a system over a set of test points, with multiprocessing support (MRs [#423](https://gitlab.com/cosapp/cosapp/-/merge_requests/423), [#424](https://gitlab.com/cosapp/cosapp/-/merge_requests/424)).
- Support of multiprocessing for `System.make_surrogate` (MR [#422](https://gitlab.com/cosapp/cosapp/-/merge_requests/422)).
- Removed deprecated property `data` for recorders (MR [#421](https://gitlab.com/cosapp/cosapp/-/merge_requests/421)).
- New method `System.get_variable` to obtain a variable object (containing unit, description and so on) from its contextual name in a system (MR [#417](https://gitlab.com/cosapp/cosapp/-/merge_requests/417)).
- Deprecation of function `BasePort.get_details`, replaced by methods `get_variable` and `variable_dict` (MR [#420](https://gitlab.com/cosapp/cosapp/-/merge_requests/420)).
- Expose protected property `System.problem` in the scope of method `setup_run` (MR [#419](https://gitlab.com/cosapp/cosapp/-/merge_requests/419)).

### Bug fixes & Code improvements

- Modified call sequence in `System.call_setup_run`, to make sure that the system tree is setup before drivers are (MR [#418](https://gitlab.com/cosapp/cosapp/-/merge_requests/418)).
- Improved type hints and general refactoring pass (MR [#425](https://gitlab.com/cosapp/cosapp/-/merge_requests/425)).

### Documentation

- Updated tutorial on multi-point design (MR [#426](https://gitlab.com/cosapp/cosapp/-/merge_requests/426)).


## 1.1.0 (2025-04-28)

### New features & API changes

- New implicit time drivers: backward Euler and order 1-4 Backward Difference Formula (BDF) integrators (MRs [#405](https://gitlab.com/cosapp/cosapp/-/merge_requests/405), [#415](https://gitlab.com/cosapp/cosapp/-/merge_requests/415)).
- Add new signal `system_update_signal` for all time drivers, emitted at each time step (MR [#406](https://gitlab.com/cosapp/cosapp/-/merge_requests/406)).
- Improvement of driver `MonteCarlo` (MR [#409](https://gitlab.com/cosapp/cosapp/-/merge_requests/409)).
- Expose exception `EventError` in module `cosapp.multimode` (MR [#407](https://gitlab.com/cosapp/cosapp/-/merge_requests/407)).

### Bug fixes & Code improvements

- Improved type hints and general refactoring pass (MRs [#400](https://gitlab.com/cosapp/cosapp/-/merge_requests/400), [#408](https://gitlab.com/cosapp/cosapp/-/merge_requests/408), [#410](https://gitlab.com/cosapp/cosapp/-/merge_requests/410), [#416](https://gitlab.com/cosapp/cosapp/-/merge_requests/416)).
- Support for polynomials with multi-dimensional coefficients in `TwoPointCubicPolynomial` (MR [#404](https://gitlab.com/cosapp/cosapp/-/merge_requests/404)).

### Documentation

- Updated section on "Tips & Tricks" (MR [#412](https://gitlab.com/cosapp/cosapp/-/merge_requests/412)).
- Updated tutorial on time drivers (MR [#415](https://gitlab.com/cosapp/cosapp/-/merge_requests/415)).

### Dependency management

- Update of the `JupyterLite` image (MRs [#401](https://gitlab.com/cosapp/cosapp/-/merge_requests/401), [#402](https://gitlab.com/cosapp/cosapp/-/merge_requests/402), [#403](https://gitlab.com/cosapp/cosapp/-/merge_requests/403), [#411](https://gitlab.com/cosapp/cosapp/-/merge_requests/411), [#413](https://gitlab.com/cosapp/cosapp/-/merge_requests/413)).


## 1.0.1 (2025-03-24)

### Bug fixes & Improvements

- New transient variables dynamically added during transitions are now accounted for in time drivers (MRs [#394](https://gitlab.com/cosapp/cosapp/-/merge_requests/394), [#396](https://gitlab.com/cosapp/cosapp/-/merge_requests/396)).
- Bug fixes in `CrankNicolson` (MRs [#395](https://gitlab.com/cosapp/cosapp/-/merge_requests/395), [#397](https://gitlab.com/cosapp/cosapp/-/merge_requests/397)).
- Refactoring of `state_io` functions (MR [#398](https://gitlab.com/cosapp/cosapp/-/merge_requests/398)).


## 1.0.0 (2025-03-12)

### 🔥 New feature: Parallel execution of drivers

The parallelization of certain drivers was implemented by [Adrien Delsalle](https://gitlab.com/adriendelsalle) and [Gaétan Laurens](https://gitlab.com/GtnLrs) (MRs [#330](https://gitlab.com/cosapp/cosapp/-/merge_requests/330), [#332](https://gitlab.com/cosapp/cosapp/-/merge_requests/332), [#334](https://gitlab.com/cosapp/cosapp/-/merge_requests/334), [#335](https://gitlab.com/cosapp/cosapp/-/merge_requests/335), [#339](https://gitlab.com/cosapp/cosapp/-/merge_requests/339), [#341](https://gitlab.com/cosapp/cosapp/-/merge_requests/341), [#345](https://gitlab.com/cosapp/cosapp/-/merge_requests/345), [#348](https://gitlab.com/cosapp/cosapp/-/merge_requests/348), [#353](https://gitlab.com/cosapp/cosapp/-/merge_requests/353), [#357](https://gitlab.com/cosapp/cosapp/-/merge_requests/357), [#365](https://gitlab.com/cosapp/cosapp/-/merge_requests/365), [#374](https://gitlab.com/cosapp/cosapp/-/merge_requests/374), [#390](https://gitlab.com/cosapp/cosapp/-/merge_requests/390)):
- `LinearDoE` and `MonteCarlo`;
- `NonLinearSolver` (computation of the Jacobian matrix in parallel).

This major feature relies on a robust serialization of systems, drivers and recorders, using either `pickle` or `json`.
The serialization of all drivers, in particular, allows for the parallel execution of the drivers listed above, even when they contain sub-drivers.

#### Example

In the example below, using the `Ballistics` system from the advanced time driver tutorial, we compute the initial velocity leading to a targetted end point, after an imposed flight time of two seconds.
This design case implies a `RungeKutta` time driver, embedded into a `NonLinearSolver` driver.
For the latter, we request a parallel computation of the Jacobian matrix by forward finite differences, using three workers.

```python
from cosapp.drivers import NonLinearSolver, RungeKutta
from cosapp.core.numerics.solve import FfdJacobianEvaluation
from cosapp.utils.execution import ExecutionPolicy, ExecutionType

# Set test case
point = Ballistics("point")
ncpus = 3  # compute the Jacobian matrix using 3 workers

solver = point.add_driver(
    NonLinearSolver(
        "solver",
        jac=FfdJacobianEvaluation(
            execution_policy=ExecutionPolicy(ncpus, ExecutionType.MULTI_PROCESSING)
        ),
    )
)
driver = solver.add_child(RungeKutta(time_interval=(0, 2), dt=0.1, order=3))

# Set design problem: compute initial velocity that leads to a target point
solver.add_unknown("v0").add_equation("x == [10, 0, 0]")

# Define a time simulation scenario
driver.set_scenario(
    init={"x": [0, 0, 0], "v": "v0"},
    values={"point.mass": 1.5, "point.k": 0.9},
)

# Set initial guess & solve
point.v0 = np.ones(3)
point.run_drivers()
```

### Other new features & API changes

- Implementation of second-order, implicit time driver `CrankNicolson` (MRs [#377](https://gitlab.com/cosapp/cosapp/-/merge_requests/377)).
  This driver essentially works like a nonlinear solver, solving for both transient variables and intrinsic unknowns of the system of interest.
  Therefore, it is highly recommended for dynamic systems containing algebraic loops or intrinsic constraints, instead of nesting a nonlinear solver inside an explicit time driver.
- Detect the occurrence of multiple primary events at the same time (MR [#376](https://gitlab.com/cosapp/cosapp/-/merge_requests/376)).
- Add the possibility to filter events with a Boolean expression evaluated in a specific context, other than that of the event owner (MR [#375](https://gitlab.com/cosapp/cosapp/-/merge_requests/375)).
- Add `numpy.where` and `logspace` to the scope of evaluable expressions, used in equations and boundary conditions, *e.g.* (MR [#382](https://gitlab.com/cosapp/cosapp/-/merge_requests/382)).

### Bug fixes and code improvements

- Bug fix in `EvalString` serialization (MR [#383](https://gitlab.com/cosapp/cosapp/-/merge_requests/383)).
- Bug fix in the serialization of events (MR [#386](https://gitlab.com/cosapp/cosapp/-/merge_requests/386)).
- Bug fix in `MonteCarlo` with a time subdriver (MRs [#378](https://gitlab.com/cosapp/cosapp/-/merge_requests/378), [#392](https://gitlab.com/cosapp/cosapp/-/merge_requests/392)).
- Prevent name clashes for ports and sub-systems (MR [#381](https://gitlab.com/cosapp/cosapp/-/merge_requests/381)).
- Other bug fixes (MRs [#379](https://gitlab.com/cosapp/cosapp/-/merge_requests/379), [#380](https://gitlab.com/cosapp/cosapp/-/merge_requests/380), [#389](https://gitlab.com/cosapp/cosapp/-/merge_requests/389)).

### Documentation

- Add Crank-Nicolson driver in time driver tutorial (MR [#385](https://gitlab.com/cosapp/cosapp/-/merge_requests/385)).
- New tutorial on multiprocessing (MR [#391](https://gitlab.com/cosapp/cosapp/-/merge_requests/391)).

### Dependency management

- Compatibility with `numpy` 2, with retrocompatibility with version 1 (MRs [#309](https://gitlab.com/cosapp/cosapp/-/merge_requests/309), [#387](https://gitlab.com/cosapp/cosapp/-/merge_requests/387)).
- Compatibility with `pytest` 8.3 was restored (MR [#388](https://gitlab.com/cosapp/cosapp/-/merge_requests/388)).
- The code is no longer compatible with Python 3.8, as it now contains type hints of the kind `list[str]` or `dict[str, float]` (instead of `typing.List` and `typing.Dict`), introduced in Python 3.9.


## 0.19.2 (2025-01-23)

### Bug fixes and code improvements

- Improve the system transition mechanism (MR [#370](https://gitlab.com/cosapp/cosapp/-/merge_requests/370)).
- Fix bug in event cascade resolution (MRs [#371](https://gitlab.com/cosapp/cosapp/-/merge_requests/371) & [#372](https://gitlab.com/cosapp/cosapp/-/merge_requests/372)).

### Maintenance and code quality

- Improve type hints (MR [#369](https://gitlab.com/cosapp/cosapp/-/merge_requests/369)).


## 0.19.1 (2025-01-07)

### Bug fixes and code quality

- Fix dealiasing bug for custom objects (MR [#362](https://gitlab.com/cosapp/cosapp/-/merge_requests/362)).
- Fix bug in `ExplicitTimeDriver.set_scenario` (MR [#363](https://gitlab.com/cosapp/cosapp/-/merge_requests/363)).
- Fix bug with array transients (MR [#364](https://gitlab.com/cosapp/cosapp/-/merge_requests/364)).
- Suppress unnecessary exception in `PeriodicEvent.tick` (MR [#366](https://gitlab.com/cosapp/cosapp/-/merge_requests/366)).
- Improve the handling of timed events (MR [#367](https://gitlab.com/cosapp/cosapp/-/merge_requests/367)).


## 0.19.0 (2024-12-04)

### New features & API changes

- Improve the performance of unknowns and residues (MRs [#350](https://gitlab.com/cosapp/cosapp/-/merge_requests/350), [#352](https://gitlab.com/cosapp/cosapp/-/merge_requests/352), by [Gaétan Laurens](https://gitlab.com/GtnLrs)).
  In particular, this version introduces the possiblity to declare as unknown any settable attribute of an input object (that is an object contained in an input port), which until now was only possible for input port variables.
  Example:

  ```python
  from cosapp.base import System
  from cosapp.drivers import NonLinearSolver
  from dataclasses import dataclass

  @dataclass
  class Foo:
    a: float
    x: float

  class SomeSystem(System):
      def setup(self):
          self.add_inward("foo", Foo(a=1.0, x=1.0))
          self.add_outward("y", 0.0)

      def compute(self):
          self.y = self.foo.a - self.foo.x**3
  
  system = SomeSystem("system")
  solver = system.add_driver(NonLinearSolver("solver"))

  solver.add_unknown("foo.x")   # attribute `x` can now be manipulated by the solver
  solver.add_equation("y == 0")

  system.foo.a = -2.0
  system.run_drivers()

  import pytest, math
  assert system.foo.x == pytest.approx(math.cbrt(system.foo.a))
  ```

- Fix bug in `TwoPointCubicInterpolator` with multidimensional arrays (MR [#355](https://gitlab.com/cosapp/cosapp/-/merge_requests/355)).
- Allow filtered events in merged events (MR [#356](https://gitlab.com/cosapp/cosapp/-/merge_requests/356)):

  ```python
  system.event.trigger = Event.merge(
      event_a,
      event_b.filter("x > 0"),
  )
  ```

- Introduction of periodic events (MR [#360](https://gitlab.com/cosapp/cosapp/-/merge_requests/360)):

  ```python
  from cosapp.multimode import PeriodicTrigger

  system.event_a.trigger = PeriodicTrigger(period=2.3)
  system.event_b.trigger = PeriodicTrigger(period=0.25, t0=0.33)
  ```

### Documentation

- Add instructions on how to perform benchmarks with `asv_runner` in main README file (MR [#358](https://gitlab.com/cosapp/cosapp/-/merge_requests/358)).

### Maintenance and code quality

- Fix import error in JupyterLite (MR [#351](https://gitlab.com/cosapp/cosapp/-/merge_requests/351)).
- Minor code refactoring (MR [#354](https://gitlab.com/cosapp/cosapp/-/merge_requests/354)).
- Use public runners for all CI jobs (MR [#359](https://gitlab.com/cosapp/cosapp/-/merge_requests/359)).


## 0.18.0 (2024-10-24)

### New features & API changes

- Improved data recording mechanism for `NonLinearSolver`, to facilitate convergence path analysis (MR [#312](https://gitlab.com/cosapp/cosapp/-/merge_requests/312)).
- New driver `FixedPointSolver`, solving algebraic loops by fixed-point iterations (MRs [#315](https://gitlab.com/cosapp/cosapp/-/merge_requests/315) & [#322](https://gitlab.com/cosapp/cosapp/-/merge_requests/322)).
- New method `Driver.available_options`, returning the list of options available for a particular driver (MR [#316](https://gitlab.com/cosapp/cosapp/-/merge_requests/316)).
- New method `System.pull_design_method`, to promote sub-system design methods at parent level easily (MR [#314](https://gitlab.com/cosapp/cosapp/-/merge_requests/314)).
- Bug fix in FMU exporter (MR [#324](https://gitlab.com/cosapp/cosapp/-/merge_requests/324)).
- Bug fixes in system transition logic (MR [#338](https://gitlab.com/cosapp/cosapp/-/merge_requests/338)).
- New method `System.init_mode` called before each time simulation, for mode initialization (MR [#347](https://gitlab.com/cosapp/cosapp/-/merge_requests/347)).

### Documentation

- Fix bad rendering of tutorial notebooks on time simulations (MR [#321](https://gitlab.com/cosapp/cosapp/-/merge_requests/321)).
- Fix bad rendering of mermaid graph in logger documentation (MR [#326](https://gitlab.com/cosapp/cosapp/-/merge_requests/326)).
- Updated tutorial on advanced time simulations and on design methods (MR [#343](https://gitlab.com/cosapp/cosapp/-/merge_requests/343)).
- Add a section on `FixedPointSolver` in the driver tutorial (MR [#346](https://gitlab.com/cosapp/cosapp/-/merge_requests/346)).

### Maintenance and code quality

- Improved type hints for drivers (MR [#318](https://gitlab.com/cosapp/cosapp/-/merge_requests/318)).
- Updated JupyterLite image (MR [#313](https://gitlab.com/cosapp/cosapp/-/merge_requests/313)).
- Add new test on `swap_system` (MR [#342](https://gitlab.com/cosapp/cosapp/-/merge_requests/342)).
- Various updates of CI/CD settings (MRs [#317](https://gitlab.com/cosapp/cosapp/-/merge_requests/317), [#319](https://gitlab.com/cosapp/cosapp/-/merge_requests/319) [#320](https://gitlab.com/cosapp/cosapp/-/merge_requests/320), [#336](https://gitlab.com/cosapp/cosapp/-/merge_requests/336), [#337](https://gitlab.com/cosapp/cosapp/-/merge_requests/337)).
- Various test improvements (MRs [#340](https://gitlab.com/cosapp/cosapp/-/merge_requests/340), [#342](https://gitlab.com/cosapp/cosapp/-/merge_requests/342)).


## 0.17.0 (2024-06-18)

### New features & API changes

- A JupyterLite image including CoSApp is now available in the main README file (MR [#300](https://gitlab.com/cosapp/cosapp/-/merge_requests/300)).
- Fix a bug with primary event initialization (MR [#293](https://gitlab.com/cosapp/cosapp/-/merge_requests/293)).
- Improved API for partial connections: name mappings can now be given as lists mixing variable names and dictionaries, which is convenient when most variable names are identical, and only a few differ (MRs [#294](https://gitlab.com/cosapp/cosapp/-/merge_requests/294), [#295](https://gitlab.com/cosapp/cosapp/-/merge_requests/295) & [#306](https://gitlab.com/cosapp/cosapp/-/merge_requests/306)).
  Example:

  ```python
  from cosapp.base import System
  
  class SomeSystem(System):
      def setup(self):
          foo = self.add_child(Foo('foo'), pulling=['a', 'b', {'c': 'c_foo'}])
          bar = self.add_child(Bar('bar'))

          self.connect(foo, bar, ['x', 'y', {'z': 'v'}])
  ```
  
- New utility function `cosapp.tools.views.show_tree` displaying the hierarchical tree of a system similar to a folder tree in a filesystem (MRs [#296](https://gitlab.com/cosapp/cosapp/-/merge_requests/296)-[#298](https://gitlab.com/cosapp/cosapp/-/merge_requests/298)).

### Bug fixes and code quality

- New attribute `Residue.variables` providing the names of the variables involved in the residue (MR [#299](https://gitlab.com/cosapp/cosapp/-/merge_requests/299)).
- Minor bug fix in Newton-Raphson algorithm (MR [#303](https://gitlab.com/cosapp/cosapp/-/merge_requests/303)).
- Fix bad markdown rendering of systems (MR [#292](https://gitlab.com/cosapp/cosapp/-/merge_requests/292)).
- Improved type hints throughout the code (MR [#307](https://gitlab.com/cosapp/cosapp/-/merge_requests/307)).
- Other improvements (MRs [#291](https://gitlab.com/cosapp/cosapp/-/merge_requests/291), [#301](https://gitlab.com/cosapp/cosapp/-/merge_requests/301), [#302](https://gitlab.com/cosapp/cosapp/-/merge_requests/302), [#304](https://gitlab.com/cosapp/cosapp/-/merge_requests/304), [#305](https://gitlab.com/cosapp/cosapp/-/merge_requests/305), [#307](https://gitlab.com/cosapp/cosapp/-/merge_requests/307), [#308](https://gitlab.com/cosapp/cosapp/-/merge_requests/308)).

### Maintenance

- Pin dependency to `numpy` v1, until full migration to v2 (MR [#310](https://gitlab.com/cosapp/cosapp/-/merge_requests/310)).


## 0.16.0 (2024-04-18)

### Bug fixes and code quality

- Primary events triggered within the same time step are now correctly captured (MR [#287](https://gitlab.com/cosapp/cosapp/-/merge_requests/287)).
  A bug persists when several primary events occur at the exact same time, though, as only one will be retained.
- Fix bug preventing events from occurring during the first time step of a simulation (MR [#288](https://gitlab.com/cosapp/cosapp/-/merge_requests/288)).
- Fix a bug causing recorders to crash when inspecting ports with properties (MR [#282](https://gitlab.com/cosapp/cosapp/-/merge_requests/282)).
- Algebraic and time-dependent problems are now dissociated (MR [#284](https://gitlab.com/cosapp/cosapp/-/merge_requests/284)). As a consequence, invoking `self.problem.clear()` during transitions, for instance, no longer affects time-dependent unknowns such as transients.
- Fix ambiguous warning message raised by `RunSingleCase` (MR [#279](https://gitlab.com/cosapp/cosapp/-/merge_requests/279)).
- Various refactoring passes (MRs [#283](https://gitlab.com/cosapp/cosapp/-/merge_requests/283) and [#286](https://gitlab.com/cosapp/cosapp/-/merge_requests/286)).

### Maintenance

- Updated description inside the conda recipe (MR [#276](https://gitlab.com/cosapp/cosapp/-/merge_requests/276)).
- Pin `pytest` version due to a bug in version 8.1 (MR [#280](https://gitlab.com/cosapp/cosapp/-/merge_requests/280)).
- Add a "Citing" section in the main README file (MR [#281](https://gitlab.com/cosapp/cosapp/-/merge_requests/281)).
- The module parser was updated (MR [#285](https://gitlab.com/cosapp/cosapp/-/merge_requests/285)).
- Force `sphinx` < 7.3 in the documentation building environment, owing to an incompatibility with `sphinx-mdinclude` (MR [#289](https://gitlab.com/cosapp/cosapp/-/merge_requests/289)). This is a temporary patch until root cause is fixed.


## 0.15.4 (2024-02-28)

### Bug fixes and code quality

- Fix bug raised in `NonLinearSolver` for systems with rates (MR [#268](https://gitlab.com/cosapp/cosapp/-/merge_requests/268)).
- Minor refactoring pass (MR [#274](https://gitlab.com/cosapp/cosapp/-/merge_requests/274)).

### Maintenance

- Drop Python 3.8 support and add Python 3.11 test pipeline (MR [#270](https://gitlab.com/cosapp/cosapp/-/merge_requests/270)).
- Update installation and contribution guidelines (MR [#270](https://gitlab.com/cosapp/cosapp/-/merge_requests/270)).
- Update dependency list (MRs [#269](https://gitlab.com/cosapp/cosapp/-/merge_requests/269) and [#270](https://gitlab.com/cosapp/cosapp/-/merge_requests/270)).

### JOSS article

Publication of an article on CoSApp in the [Journal of Open-Source Software](https://joss.theoj.org/), referenced to version 0.15.4 (MR [#271](https://gitlab.com/cosapp/cosapp/-/merge_requests/271)).


## 0.15.3 (2023-12-19)

### Bug fixes and code quality

- Fix minor bug in `NonLinearSolver` (MR [#261](https://gitlab.com/cosapp/cosapp/-/merge_requests/261)).
- Fix incorrect return type hints in `System` (MR [#259](https://gitlab.com/cosapp/cosapp/-/merge_requests/259)).
- Improve support for read-only properties in system getters and setters (MR [#264](https://gitlab.com/cosapp/cosapp/-/merge_requests/264)).

### Maintenance

- Remove deprecated dependency for compatibility with Python 3.12 (MR [#258](https://gitlab.com/cosapp/cosapp/-/merge_requests/258)).
- Force `pythonfmu` < 0.6.3 in dependency list, to prevent a crash during tests (MR [#262](https://gitlab.com/cosapp/cosapp/-/merge_requests/262)). Temporary fix until root cause is identified.


## 0.15.2 (2023-10-14)

### Bug fixes

- Fix crash with `VisJs` rendering of sub-systems (MR [#252](https://gitlab.com/cosapp/cosapp/-/merge_requests/252)).
- Fix minor bug in `EvalString` (MR [#253](https://gitlab.com/cosapp/cosapp/-/merge_requests/253)).
- Fix bad synchronization of mode variables during transitions (MR [#254](https://gitlab.com/cosapp/cosapp/-/merge_requests/254)).
- Improve error message when pulling variables with different roles (MR [#255](https://gitlab.com/cosapp/cosapp/-/merge_requests/255)).
- Fix `TypeError` when passing `pulling` argument as a tuple in `System.add_child` (MR [#256](https://gitlab.com/cosapp/cosapp/-/merge_requests/256)).


## 0.15.1 (2023-09-18)

### New features & API changes

- The representation of `MathematicalProblem` objects now indicates the number of unknowns and equations, for a better readability (MR [#249](https://gitlab.com/cosapp/cosapp/-/merge_requests/249)).
- Optional argument `execution_index` in `System.add_child` and `Driver.add_child` can now take a negative value, with a behaviour following that of `list.insert` (MR [#250](https://gitlab.com/cosapp/cosapp/-/merge_requests/250)).

### Bug fixes and code quality

- Add missing field "time" in `ExplicitTimeRecorder.event_data`, when no recorder is set (MR [#245](https://gitlab.com/cosapp/cosapp/-/merge_requests/245)).
- Fix bug with recorders inspecting systems with iterators (MRs [#246](https://gitlab.com/cosapp/cosapp/-/merge_requests/246) and [#247](https://gitlab.com/cosapp/cosapp/-/merge_requests/247)).
- Fix bug with `NonLinearSolver` with NumPy array residues (MR [#248](https://gitlab.com/cosapp/cosapp/-/merge_requests/248)).
- Fix initialization bug of targets involving expressions (MR [#249](https://gitlab.com/cosapp/cosapp/-/merge_requests/249)).


## 0.15.0 (2023-07-20)

### New features & API changes

- Suppression of default `RunSingleCase` subdriver `runner` in `NonLinearSolver` drivers (MR [#239](https://gitlab.com/cosapp/cosapp/-/merge_requests/239)).
- Enable target initialization in multi-point design problems (MR [#233](https://gitlab.com/cosapp/cosapp/-/merge_requests/233)).
- New utility function `swap_system` to replace on the fly a subsystem by another `System` instance (MR [#238](https://gitlab.com/cosapp/cosapp/-/merge_requests/238)).

### Bug fixes and code quality

- Refactor driver `Optimizer` (MR [#240](https://gitlab.com/cosapp/cosapp/-/merge_requests/240)).
- Various bug fixes (MRs [#234](https://gitlab.com/cosapp/cosapp/-/merge_requests/234), [#235](https://gitlab.com/cosapp/cosapp/-/merge_requests/235), [#241](https://gitlab.com/cosapp/cosapp/-/merge_requests/241)).

### Documentation

- New tutorial on `swap_system` (MR [#243](https://gitlab.com/cosapp/cosapp/-/merge_requests/243)).
- General update of tutorials (MRs [#232](https://gitlab.com/cosapp/cosapp/-/merge_requests/232) and [#242](https://gitlab.com/cosapp/cosapp/-/merge_requests/242)).


## 0.14.1 (2023-06-08)

### Bug fixes and code quality

- Fix incorrect output file name in `cosapp.tools.parse_module` (MR [#229](https://gitlab.com/cosapp/cosapp/-/merge_requests/229)).
- Refactoring pass (MR [#230](https://gitlab.com/cosapp/cosapp/-/merge_requests/230)).

### Documentation

- Upgrade documentation build stack (MRs [#224](https://gitlab.com/cosapp/cosapp/-/merge_requests/224) and [#226](https://gitlab.com/cosapp/cosapp/-/merge_requests/226)).
- Fix bad rendering of ports and systems (MRs [#227](https://gitlab.com/cosapp/cosapp/-/merge_requests/227) and [#228](https://gitlab.com/cosapp/cosapp/-/merge_requests/228)).


## 0.14.0 (2023-05-17)

### New features & API changes

* Improved performance, through a revised clean/dirty mechanism (MR [#215](https://gitlab.com/cosapp/cosapp/-/merge_requests/215)).
* Possibility to add a contextual description to sub-systems and ports of a system, as well as sub-drivers (MR [#216](https://gitlab.com/cosapp/cosapp/-/merge_requests/216)). This feature is useful for automatic documentation tools, and has been included in the Markdown representation of systems (also used in function `cosapp.tools.display_doc`). Example:
  
  ```python
  from cosapp.base import System
  from my_module import FlowPort
  
  class MySystem(System):
      def setup(self):
          self.add_input(FlowPort, "fl_in1", desc="Primary inlet flow port")
          self.add_input(FlowPort, "fl_in2", desc="Secondary inlet flow port")
  
          self.add_output(FlowPort, "fl_out")
  ```
  
* New hook function `_parse_module_config`, returning pre-defined settings for `cosapp.tools.parse_module` (MR [#218](https://gitlab.com/cosapp/cosapp/-/merge_requests/218)). This allows module maintainers to simply call
  
  ```python
  from cosapp.tools import parse_module
  import my_module
  
  parse_module(my_module)
  ```

  instead of, *e.g.*,

  ```python
  parse_module(
      my_module,
      ctor_config={
          "ComplexSystem1": [
              dict(n=1, foo=0.5),
              dict(n=2, foo=0.1),
          ],
          "ComplexSystem2": [
              dict(xi=0.0, __alias__="ComplexSystem2_a"),
              dict(xi=1.0, __alias__="ComplexSystem2_b"),
          ],
      },
      excludes=["Foo*", "*Bar?"],
  )
  ```

  provided `my_module._parse_module_config()` returns a dictionary specifying the values of `ctor_config`, `excludes`, *etc.*

* Make `SolverResults` a `dataclass`, for easier handling of `NonLinearSolver.results`, *e.g.* (MR [#220](https://gitlab.com/cosapp/cosapp/-/merge_requests/220)).
* Expose attribute `problem` in system setup (MR [#221](https://gitlab.com/cosapp/cosapp/-/merge_requests/221)). Previously, `problem` was only exposed in method `System.transition`.

### Bug fixes and code quality

* Fix bug in `NonLinearSolver` log message (MR [#214](https://gitlab.com/cosapp/cosapp/-/merge_requests/214)).
* Add missing JSON file in PyPI and conda packages, preventing the use of `cosapp.tools.parse_module` (MR [#219](https://gitlab.com/cosapp/cosapp/-/merge_requests/219)).

### Documentation

* Illustrate port and sub-system description in tutorials (MR [#215](https://gitlab.com/cosapp/cosapp/-/merge_requests/215)).


## 0.13.1 (2023-04-03)

### Bug fixes and code quality

* Update test baseline to pass in a Python 3.11 environment (MR [#200](https://gitlab.com/cosapp/cosapp/-/merge_requests/200)).
* Creation of a dummy system factory, mostly for tests (MR [#201](https://gitlab.com/cosapp/cosapp/-/merge_requests/201)).
* Improve clean/dirty mechanism (MR [#202](https://gitlab.com/cosapp/cosapp/-/merge_requests/202)) and fix incorrect clean/dirty status with surrogate models (MR [#205](https://gitlab.com/cosapp/cosapp/-/merge_requests/205)).
* Fix bug in function `cosapp.tools.display_doc` for classes with setup arguments (MR [#208](https://gitlab.com/cosapp/cosapp/-/merge_requests/208)).
* Various code quality improvements (MRs [#211](https://gitlab.com/cosapp/cosapp/-/merge_requests/211), [#212](https://gitlab.com/cosapp/cosapp/-/merge_requests/212)).

### Documentation

Note: extensive use of self-documenting f-strings (introduced in Python 3.8) has made tutorials incompatible with Python 3.7.

* Updated tutorials (MRs [#203](https://gitlab.com/cosapp/cosapp/-/merge_requests/203), [#206](https://gitlab.com/cosapp/cosapp/-/merge_requests/206), [#207](https://gitlab.com/cosapp/cosapp/-/merge_requests/207), [#210](https://gitlab.com/cosapp/cosapp/-/merge_requests/210)).
* The image used in binder is now based on Python 3.10 (MR [#204](https://gitlab.com/cosapp/cosapp/-/merge_requests/204)).

### Module parser

* New function `parse_module` in `cosapp.tools` collecting all system and port classes within a Python module. This parser, generating a JSON file containing the description of all CoSApp symbols, is primarily meant to be used for constructional GUI applications, developed separately (MRs [#192](https://gitlab.com/cosapp/cosapp/-/merge_requests/192) & [#209](https://gitlab.com/cosapp/cosapp/-/merge_requests/209)).


## 0.13.0 (2023-02-09)

### Python 3.10 support

The code is now tested for Python 3.8, 3.9 and 3.10.
Support of Python 3.7 is thus officially dropped, although no version-specific Python code was introduced in this version of CoSApp.

### New features & API changes

* Module `connectors` moved from `cosapp.core` to `cosapp.ports` (MR [#189](https://gitlab.com/cosapp/cosapp/-/merge_requests/189)).
* New "direct" (with no unit conversion) connector classes `PlainConnector`, `CopyConnector` and `DeepCopyConnector`, in `cosapp.ports.connectors` (MR [#188](https://gitlab.com/cosapp/cosapp/-/merge_requests/188)).
* New method `MathematicalProblem.is_empty()`, equivalent to `shape == (0, 0)` (MR [#186](https://gitlab.com/cosapp/cosapp/-/merge_requests/186)).
* Improved VisJs graph rendering, by limiting node size for long system names (MR [#184](https://gitlab.com/cosapp/cosapp/-/merge_requests/184)).
* New utility functions `get_state` and `set_state` in `cosapp.utils`, for quick system data recovery (MR [#193](https://gitlab.com/cosapp/cosapp/-/merge_requests/193)):

  ```python
  from cosapp.utils import get_state, set_state
  
  s = SomeSystem('s')
  # ... many design steps, say
  
  # Save state in local object
  designed = get_state(s)
  
  s.drivers.clear()
  s.add_driver(SomeDriver('driver'))
  
  try:
      s.run_drivers()
  except:
      # Recover previous state
      set_state(s, designed)
  ```

* Functions `radians`, `degrees` and `arctan2`/`atan2` have been added to the scope of `EvalString` objects, and can therefore be used in equations, *e.g.* (MR [#178](https://gitlab.com/cosapp/cosapp/-/merge_requests/178)).
* Recorders can now record constant properties (MR [#181](https://gitlab.com/cosapp/cosapp/-/merge_requests/181)).
* Deprecation of `System.get_unsolved_problem` in favour of new method `assembled_problem` (MR [#174](https://gitlab.com/cosapp/cosapp/-/merge_requests/174)).
* Inner off-design problem of systems is now exposed as attribute `problem`, but only within the `transition` method (MR [#174](https://gitlab.com/cosapp/cosapp/-/merge_requests/174)). This allows users to add or remove off-design constraints during event-driven transitions, while keeping this property inaccessible the rest of the time.

  ```python
  from cosapp.base import System
  from math import sin, cos
  
  class SomeSystem(System):
      def setup(self):
          self.add_inward('x', 0.0)
          self.add_inward('y', 0.0)
          self.add_outward('z', 0.0)
          a = self.add_event('event_a', trigger='x > y')
          b = self.add_event('event_b', trigger='x < y')
      
      def compute(self):
          self.z = cos(self.x) * sin(self.y)
  
      def transition(self):
          offdesign = self.problem
          if self.event_a.present:
              offdesign.clear()
              offdesign.add_equation('z == 0.5').add_unknown('x')
          if self.event_b.present:
              offdesign.clear()
  ```

### Bug fixes and code quality

* Fix serialization bugs for systems with setup parameters (MR [#180](https://gitlab.com/cosapp/cosapp/-/merge_requests/180)) and `None` variables (MR [#172](https://gitlab.com/cosapp/cosapp/-/merge_requests/172)).
* Bug fix on event time calculation involving array transients (MR [#177](https://gitlab.com/cosapp/cosapp/-/merge_requests/177)).
* Bug fix on possible name conflicts in connector storage (MR [#173](https://gitlab.com/cosapp/cosapp/-/merge_requests/173)).
* Fix inconsistent behaviour of `System.add_child` when a `pulling` error is raised (MR [#197](https://gitlab.com/cosapp/cosapp/-/merge_requests/197)).
* Various code quality improvements (MRs [#175](https://gitlab.com/cosapp/cosapp/-/merge_requests/175), [#185](https://gitlab.com/cosapp/cosapp/-/merge_requests/185), [#186](https://gitlab.com/cosapp/cosapp/-/merge_requests/186), [#187](https://gitlab.com/cosapp/cosapp/-/merge_requests/187), [#190](https://gitlab.com/cosapp/cosapp/-/merge_requests/190), [#191](https://gitlab.com/cosapp/cosapp/-/merge_requests/191), [#194](https://gitlab.com/cosapp/cosapp/-/merge_requests/194)).

### Documentation

* Updated time driver tutorial (MR [#182](https://gitlab.com/cosapp/cosapp/-/merge_requests/182)).
* Updated Tips & Tricks (MR [#196](https://gitlab.com/cosapp/cosapp/-/merge_requests/196)).
* Other updates (MRs [#176](https://gitlab.com/cosapp/cosapp/-/merge_requests/176), [#195](https://gitlab.com/cosapp/cosapp/-/merge_requests/195), [#198](https://gitlab.com/cosapp/cosapp/-/merge_requests/198)).

## 0.12.3 (2022-09-21)

### New features & API changes

* Improved user experience:
  * Auto-completion for dynamically added attributes of systems (ports, subsystems, inwards, outwards, events...) and drivers (sub-drivers) (MRs [#164](https://gitlab.com/cosapp/cosapp/-/merge_requests/164) and [#166](https://gitlab.com/cosapp/cosapp/-/merge_requests/166));
  * Improved representation of mathematical problems, in particular for loop equations and multi-point design problems (MRs [#159](https://gitlab.com/cosapp/cosapp/-/merge_requests/159), [#160](https://gitlab.com/cosapp/cosapp/-/merge_requests/160) and [#163](https://gitlab.com/cosapp/cosapp/-/merge_requests/163)).
* New method `System.new_problem` to facilitate the creation of dynamic design methods, *e.g.* (MR [#162](https://gitlab.com/cosapp/cosapp/-/merge_requests/162)).

### Documentation

* Updated tutorials (MRs [#169](https://gitlab.com/cosapp/cosapp/-/merge_requests/169) and [#170](https://gitlab.com/cosapp/cosapp/-/merge_requests/170)).

### Bug fixes and code quality

* Bug fix on unknown dealiasing (MR [#157](https://gitlab.com/cosapp/cosapp/-/merge_requests/157)).
* Bug fix on port variable export (MR [#158](https://gitlab.com/cosapp/cosapp/-/merge_requests/158)).
* Bug fix on system serialization (MR [#161](https://gitlab.com/cosapp/cosapp/-/merge_requests/161)).
* Bug fix on subsystem read-only constants (MR [#167](https://gitlab.com/cosapp/cosapp/-/merge_requests/167)).
* Various code quality improvements (MRs [#154](https://gitlab.com/cosapp/cosapp/-/merge_requests/154), [#155](https://gitlab.com/cosapp/cosapp/-/merge_requests/155), [#162](https://gitlab.com/cosapp/cosapp/-/merge_requests/162), [#168](https://gitlab.com/cosapp/cosapp/-/merge_requests/168)).

## 0.12.2 (2022-05-26)

### New features & API changes

* Automatic tolerance in `NonLinearSolver` (MRs [#148](https://gitlab.com/cosapp/cosapp/-/merge_requests/148) and [#152](https://gitlab.com/cosapp/cosapp/-/merge_requests/152)).
* `Optimizer.set_objective` is deprecated, in favour of `set_minimum` and `set_maximum` (MR [#150](https://gitlab.com/cosapp/cosapp/-/merge_requests/150)).
* Loop residues are no longer normalized (MR [#151](https://gitlab.com/cosapp/cosapp/-/merge_requests/151)).
* Improved type hints for ports, systems and drivers, in functions whose return type depends on arguments, such as `System.add_child`, `add_driver`, *etc.* (MR [#145](https://gitlab.com/cosapp/cosapp/-/merge_requests/145)).

### Documentation

* Updated tutorials (MRs [#144](https://gitlab.com/cosapp/cosapp/-/merge_requests/144), [#147](https://gitlab.com/cosapp/cosapp/-/merge_requests/147) and [#154](https://gitlab.com/cosapp/cosapp/-/merge_requests/154)).

### Bug fixes and code quality

* Fix inconsistent behaviour of recorders (MR [#143](https://gitlab.com/cosapp/cosapp/-/merge_requests/143)).
* Fix bug on event initialization (MR [#146](https://gitlab.com/cosapp/cosapp/-/merge_requests/146)).
* Fix bad markdown formatting of ports occurring in `jupyterlab` 3.4 (MR [#149](https://gitlab.com/cosapp/cosapp/-/merge_requests/149)).
* Fix failed test caused by a regression in `pytest` 7.1 (MR [#142](https://gitlab.com/cosapp/cosapp/-/merge_requests/142)).

## 0.12.1 (2022-02-25)

### New features & API changes

* Simplification of driver `Optimizer`:
  * Suppression of sub-driver `runner` (MR [#136](https://gitlab.com/cosapp/cosapp/-/merge_requests/136)). This change introduces new methods `set_objective`, `add_unknowns` and `add_constraints` in driver `Optimizer`.
  * Optimization constraints are now declared with human-readable expressions in `Optimizer.add_constraints` (MR [#138](https://gitlab.com/cosapp/cosapp/-/merge_requests/138)).

  Before:
    
  ```python
  from cosapp.drivers import Optimizer
  
  s = SomeSystem('s')
  optim = s.add_driver(Optimizer('optim'))
  
  optim.runner.set_objective('cost')
  optim.runner.add_unknown(['a', 'b', 'p_in.x'])
  # Enter constraints as non-negative expressions:
  optim.runner.add_constraints([
      "b - a",  # b >= a
      "a",      # a >= 0
      "1 - a",  # a <= 1
  ])
  optim.runner.add_constraints(
      "p_out.y",
      inequality = False,  # p_out.y == 0
  )
  
  s.run_drivers()
  ```
  
  After:
    
  ```python
  optim.set_objective('cost')
  optim.add_unknown(['a', 'b', 'p_in.x'])
  optim.add_constraints(
      "b >= a",
      "0 <= a <= 1",
      "p_out.y == 0",
  )
  ```

  * New, convenient iterators and setters for ports (MR [#137](https://gitlab.com/cosapp/cosapp/-/merge_requests/137)):
  
  ```python
  from cosapp.base import Port, System
  
  class XyzPort(Port):
      def setup(self):
          self.add_variable('x')
          self.add_variable('y')
          self.add_variable('z')
  
  class SomeSystem(System):
      def setup(self):
          self.add_input(XyzPort, 'p_in')
          self.add_output(XyzPort, 'p_out')
      
      def compute(self):
          self.p_out.set_from(self.p_in)  # assign values from `p_in`
          self.p_out.z = 0.0
  
  s = SomeSystem('s')
  # Multi-variable setter `set_values`
  s.p_in.set_values(x=1, y=-0.5, z=0.1)
  
  s.run_once()
  # Dict-like (key, value) iterator `items`:
  for varname, value in s.p_out.items():
      print(f"p_out.{varname} = {value})
  ```

### Documentation

* Updated tutorials on ports (MR [#139](https://gitlab.com/cosapp/cosapp/-/merge_requests/139)) and on optimization (MR [#140](https://gitlab.com/cosapp/cosapp/-/merge_requests/140)).

### Bug fixes and code quality

* Fix bug in Jacobian computation for negative perturbations (MR [#129](https://gitlab.com/cosapp/cosapp/-/merge_requests/129)).
* Fix bug in `RunOnce` and `RunSingleCase` recorders with `hold=False` (MR [#130](https://gitlab.com/cosapp/cosapp/-/merge_requests/130)).
* Resolve input aliasing in time driver scenarios (MR [#135](https://gitlab.com/cosapp/cosapp/-/merge_requests/135)).
* Fix bugs with events (MRs [#123](https://gitlab.com/cosapp/cosapp/-/merge_requests/123), [#126](https://gitlab.com/cosapp/cosapp/-/merge_requests/126), [#128](https://gitlab.com/cosapp/cosapp/-/merge_requests/128)).
* Discard empty connectors, and send a warning (MR [#132](https://gitlab.com/cosapp/cosapp/-/merge_requests/132)).
* Other code quality improvements (MRs [#127](https://gitlab.com/cosapp/cosapp/-/merge_requests/127), [#131](https://gitlab.com/cosapp/cosapp/-/merge_requests/131), [#133](https://gitlab.com/cosapp/cosapp/-/merge_requests/133), [#134](https://gitlab.com/cosapp/cosapp/-/merge_requests/134)).

## 0.12.0 (2022-01-17)

### New features

* Implementation of multimode systems and hybrid continuous/discrete time solver (MRs [#100](https://gitlab.com/cosapp/cosapp/-/merge_requests/100), [#103](https://gitlab.com/cosapp/cosapp/-/merge_requests/103), [#105](https://gitlab.com/cosapp/cosapp/-/merge_requests/105)-[#108](https://gitlab.com/cosapp/cosapp/-/merge_requests/108), [#110](https://gitlab.com/cosapp/cosapp/-/merge_requests/110)-[#121](https://gitlab.com/cosapp/cosapp/-/merge_requests/121)):
  * Possibility to declare events and mode variables in systems.
  * New method `System.transition` describing system transition upon the occurrence of events.
  * Event detection in `ExplicitTimeDriver`.

* Possibility to specify a stop criterion in time simulation scenarios (MR [#107](https://gitlab.com/cosapp/cosapp/-/merge_requests/107)).

### Documentation

* New tutorial on hybrid time simulations and multimode systems (MRs [#116](https://gitlab.com/cosapp/cosapp/-/merge_requests/116) and [#120](https://gitlab.com/cosapp/cosapp/-/merge_requests/120)).
* Updated build config file following up a bug fix in [github.com/readthedocs](https://github.com/readthedocs/readthedocs.org) (MR [#109](https://gitlab.com/cosapp/cosapp/-/merge_requests/109)).

## 0.11.8 (2021-11-24)

### New features & API evolutions

* New module `cosapp.base` (MR [#96](https://gitlab.com/cosapp/cosapp/-/merge_requests/96)) containing base classes for user-defined classes (in particular, `Port`, `System` and `Driver`). Also contains `BaseConnector`, base class for custom connectors (see "User-defined and peer-to-peer connectors" below), as well as CoSApp-specific exceptions `ScopeError`, `UnitError` and `ConnectorError`.
**Note:** `Port`, `System` and `Driver` can still be imported from `cosapp.ports`, `cosapp.systems` and `cosapp.drivers`, respectively.

* Public API `cosapp.base.SurrogateModel` to define custom surrogate models used in `System.make_surrogate` (MR [#97](https://gitlab.com/cosapp/cosapp/-/merge_requests/97)).
Pre-defined models have been moved to module `cosapp.utils.surrogate_models`.

* System-to-system connections (MR [#94](https://gitlab.com/cosapp/cosapp/-/merge_requests/94)).

```python
class LegacyPortToPort(System):
    def setup(self):
        a = self.add_child(ModelA('a'))
        b = self.add_child(ModelB('b'))

        # Explicit port-to-port connections
        self.connect(a.p_in, b.p_out)
        self.connect(a.outwards, b.inwards, {'y': 'x'})

class Alternative(System):
  """Same as `LegacyPortToPort`, with alternative connection syntax"""
    def setup(self):
        a = self.add_child(ModelA('a'))
        b = self.add_child(ModelB('b'))

        # Alternative syntax: connect systems, with port or variable mapping
        self.connect(a, b, {'p_in': 'p_out', 'y': 'x'})
```

* User-defined and peer-to-peer connectors (MR [#87](https://gitlab.com/cosapp/cosapp/-/merge_requests/87) and MR [#98](https://gitlab.com/cosapp/cosapp/-/merge_requests/98)).

```python
import numpy
from copy import deepcopy
from cosapp.base import Port, System, BaseConnector

class DeepCopyConnector(BaseConnector):
  """User-defined deep-copy connector"""
    def transfer(self) -> None:
        source, sink = self.source, self.sink

        for target, origin in self.mapping.items():
            value = getattr(source, origin)
            setattr(sink, target, deepcopy(value))

class CustomPort(Port):
    def setup(self):
        self.add_variable('x', 0.0)
        self.add_variable('y', 1.0)

    class Connector(BaseConnector):
      """Connector for peer-to-peer connections"""
        def transfer(self) -> None:
            source, sink = self.source, self.sink
            sink.x = source.y
            sink.y = -source.x

class MyModel(System):
    def setup(self):
        self.add_input(CustomPort, 'p_in')
        self.add_output(CustomPort, 'p_out')

        self.add_inward('entry', numpy.identity(3))
        self.add_outward('exit', numpy.zeros_like(self.entry))

class Assembly(System):
    def setup(self):
        a = self.add_child(MyModel('a'))
        b = self.add_child(MyModel('b'))

        self.connect(a, b, {'exit', 'entry'}, cls=DeepCopyConnector)
        self.connect(a.p_in, b.p_out)  # will use CustomPort.Connector
```

### Documentation

* Updated tutorials (MR [#102](https://gitlab.com/cosapp/cosapp/-/merge_requests/102)).
  * Include latest API evolutions in tutorials on ports and systems.
  * New tutorial on user-defined connectors.
  * New section on user-defined surrogate models.

### Bug fixes and code quality

* Simplify loop resolution (MR [#77](https://gitlab.com/cosapp/cosapp/-/merge_requests/77), [#101](https://gitlab.com/cosapp/cosapp/-/merge_requests/101)).
* Improve connector transfer (MR [#99](https://gitlab.com/cosapp/cosapp/-/merge_requests/99)).
* Update binder settings, to take advantage of prebuilt plotly extension for jupyter lab (MR [#95](https://gitlab.com/cosapp/cosapp/-/merge_requests/95)).
* Other code quality improvements (MR [#76](https://gitlab.com/cosapp/cosapp/-/merge_requests/76), [#82](https://gitlab.com/cosapp/cosapp/-/merge_requests/82), [#90](https://gitlab.com/cosapp/cosapp/-/merge_requests/90)).

## 0.11.7 (2021-09-21)

### New features

* Possibility to define unknowns and equations at solver level (MR [#65](https://gitlab.com/cosapp/cosapp/-/merge_requests/65)).
Minor API evolution facilitating the definition of nonlinear problems and of multi-point design problems.

```python
engine = Turbofan('engine')
solver = engine.add_driver(NonLinearSolver('solver'))

# Add design points:
takeoff = solver.add_child(RunSingleCase('takeoff'))
cruise = solver.add_child(RunSingleCase('cruise'))

# Unknowns defined at solver level regarded as *design* unknowns
solver.add_unknown(['fan.diameter', 'core.turbine.inlet.area'])

# Local off-design equations can be directly defined at case level
takeoff.add_equation('thrust == 1.2e5')
cruise.add_equation('Mach == 0.8')
```

* New recursive iterator `tree()` for systems and drivers, yielding all elements in a composite tree (MR [#68](https://gitlab.com/cosapp/cosapp/-/merge_requests/68)).

```python
head = CompositeSystem('head')

bottom_to_top = [s.name for s in head.tree()]
top_to_bottom = [s.name for s in head.tree(downwards=True)]
```

* Visitor pattern for composite collections of systems, drivers and ports (MR [#68](https://gitlab.com/cosapp/cosapp/-/merge_requests/68)).

```python
from cosapp.patterns.visitor import Visitor, send as send_visitor

class DataCollector(Visitor):
    def __init__(self):
        self.data = {}

    def visit_system(self, system):
        key = system.full_name()
        self.data.setdefault(key, {})
        self.data[key]['children'] = [
            child.name for child in system.children.values()
        ]
        send_visitor(self, system.inputs.values())

    def visit_port(self, port):
        # specify what to do with a port

    def visit_driver(self, driver):
        # specify what to do with a driver

head = CompositeSystem('head')
collector = DataCollector()

send_visitor(collector, head.tree())
print(collector.data)
```

### Documentation

* New tutorials, and new "Tips & Tricks" notebook (MR [#71](https://gitlab.com/cosapp/cosapp/-/merge_requests/71)).

### Bug fixes and code quality

* Improved tests on clean/dirty status (MR [#66](https://gitlab.com/cosapp/cosapp/-/merge_requests/66)).
* Bug fix in tutorial notebook on validation (MR [#67](https://gitlab.com/cosapp/cosapp/-/merge_requests/67)).
* Code quality improvements (MR [#69](https://gitlab.com/cosapp/cosapp/-/merge_requests/69)).
* Make `System.exec_order` a view on `System.children` dictionary keys, rather than an independent attribute (MR [#70](https://gitlab.com/cosapp/cosapp/-/merge_requests/70)). Execution order can still be specified, via a dedicated setter for `exec_order`.
* Fix solver bugs occurring when system structure changes (MR [#73](https://gitlab.com/cosapp/cosapp/-/merge_requests/73)).

## 0.11.6 (2021-06-25)

### Bug fixes and code quality

* Resolve unknown aliasing for pulled input variables (MR [#58](https://gitlab.com/cosapp/cosapp/-/merge_requests/58)).
* Resolve bugs and issues related to `add_target` (MR [#61](https://gitlab.com/cosapp/cosapp/-/merge_requests/61)).
* Fix wrong comparison of Jacobian matrix `jac is None` after converting it as a `numpy` array (MR [#56](https://gitlab.com/cosapp/cosapp/-/merge_requests/56)).
* Set transparent background in `PortMarkdownFormatter` (MR [#59](https://gitlab.com/cosapp/cosapp/-/merge_requests/59)).
* Other code quality improvements (MR [#55](https://gitlab.com/cosapp/cosapp/-/merge_requests/55), [#57](https://gitlab.com/cosapp/cosapp/-/merge_requests/57), [#60](https://gitlab.com/cosapp/cosapp/-/merge_requests/60)).

## 0.11.5 (2021-05-07)

### New features

* **New [binder container](https://mybinder.org/v2/gl/cosapp%2Fcosapp/master?urlpath=lab/tree/docs/tutorials)**,
  allowing anyone to run interactively the tutorials used in the online documentation 
  (MR [#30](https://gitlab.com/cosapp/cosapp/-/merge_requests/30) and [#36](https://gitlab.com/cosapp/cosapp/-/merge_requests/36)).

* **Deferred equations to set targets:**

  New method `add_target`, defining a deferred equation on on a target variable (MR [#48](https://gitlab.com/cosapp/cosapp/-/merge_requests/48)).
  In effect, `add_target` creates an equation whose right-hand side is evaluated dynamically prior to each execution of the nonlienar solver.

  In the example below, the feature is illustrated in design mode. Outward `z` is a function of two independent variables `x` and `y`.
  When design method `'target_z'` is activated, the actual value of `z`, set interactively, is used as a target value, with unknown `y`:
  
```python
class SystemWithTarget(System):
    def setup(self):
        self.add_inward('x', 1.0)
        self.add_inward('y', 1.0)
        self.add_outward('z', 1.0)

        # Define design problem with a target on `z`
        design = self.add_design_method('target_z')
        design.add_unknown('y').add_target('z')

    def compute(self):
        self.z = self.x * self.y**2

s = SystemWithTarget('s')

solver = s.add_driver(NonLinearSolver('solver', tol=1e-9))
# Activate design method 'target_z': outward `z` becomes a target
solver.runner.design.extend(s.design_methods['target_z'])

s.x = 0.5
s.y = 0.5
s.z = 2.0  # set target
s.run_drivers()
assert s.y == pytest.approx(2)  # solution of x * y**2 == 2
assert s.z == pytest.approx(2)

s.z = 4.0  # dynamically set new target
s.run_drivers()
assert s.y == pytest.approx(np.sqrt(8))  # solution of x * y**2 == 4
assert s.z == pytest.approx(4)
```
  Targets can be also be declared in off-design mode, by calling `self.add_target(...)` in `System.setup`.

### Documentation

* Updated tutorials on `System`, `Driver`, and design methods (MR [#41](https://gitlab.com/cosapp/cosapp/-/merge_requests/41)).
* Typo fix and improvements in time driver tutorial (MR [#33](https://gitlab.com/cosapp/cosapp/-/merge_requests/33))

### Bug fixes, minor improvements and code quality

* Report variable name in unit-related Connector warning message (MR [#32](https://gitlab.com/cosapp/cosapp/-/merge_requests/32)).
* Automatically include field `time` in `DataFrame` recorders attached to a time driver (MR [#34](https://gitlab.com/cosapp/cosapp/-/merge_requests/34)).
* Bug fix in `MonteCarlo` driver (MR [#37](https://gitlab.com/cosapp/cosapp/-/merge_requests/37)).
* Replace `conda` by `mamba` in CI scripts (MR [#39](https://gitlab.com/cosapp/cosapp/-/merge_requests/39)).
* Revamp markdown and JS rendering of systems and ports (MR [#40](https://gitlab.com/cosapp/cosapp/-/merge_requests/40) and [#43](https://gitlab.com/cosapp/cosapp/-/merge_requests/43), [#47](https://gitlab.com/cosapp/cosapp/-/merge_requests/47) and [#51](https://gitlab.com/cosapp/cosapp/-/merge_requests/51)).
* Fix bug in `rate` type inference (MR [#44](https://gitlab.com/cosapp/cosapp/-/merge_requests/44)).
* Other code quality improvement (MR [#35](https://gitlab.com/cosapp/cosapp/-/merge_requests/35), [#38](https://gitlab.com/cosapp/cosapp/-/merge_requests/38), [#42](https://gitlab.com/cosapp/cosapp/-/merge_requests/42), [#46](https://gitlab.com/cosapp/cosapp/-/merge_requests/46), [#50](https://gitlab.com/cosapp/cosapp/-/merge_requests/50), [#52](https://gitlab.com/cosapp/cosapp/-/merge_requests/52), [#53](https://gitlab.com/cosapp/cosapp/-/merge_requests/53)).

## 0.11.4 (2021-03-08)

### New features

* Recorders:
  It is now possible to add evaluable expressions in recorders (MR [#27](https://gitlab.com/cosapp/cosapp/-/merge_requests/27)):
  
```python
point = PointMass('point')
driver = point.add_driver(RungeKutta(order=3, time_interval=(0, 2), dt=0.01))

recorder = driver.add_recorder(recorders.DataFrameRecorder(
    includes=['x', 'a', 'norm(v)']),  # norm(v) will be recorded in DataFrame
    period=0.1,
)
```
### Documentation

* New tutorial on `SystemSurrogate` (MR [#15](https://gitlab.com/cosapp/cosapp/-/merge_requests/15)).

### Bug fixes, minor improvements and code quality

* Initialization bug in time simulations (MR [#23](https://gitlab.com/cosapp/cosapp/-/merge_requests/23)).
* Bug in nonlinearity estimation in `NumericalSolver` (MR [#22](https://gitlab.com/cosapp/cosapp/-/merge_requests/22)).
* Do not raise `ArithmeticError` when an unknown is declared several time (MR [#18](https://gitlab.com/cosapp/cosapp/-/merge_requests/18)).
* Suppress deprecation warnings raised by `numpy` (MR [#20](https://gitlab.com/cosapp/cosapp/-/merge_requests/20) and [#24](https://gitlab.com/cosapp/cosapp/-/merge_requests/24)).
* Suppress undue warning raised by `numpy` in `NonLinearSolver` (MR [#19](https://gitlab.com/cosapp/cosapp/-/merge_requests/19)).
* Fix incompatibility between `pandas` and `xlrd` (MR [#21](https://gitlab.com/cosapp/cosapp/-/merge_requests/21)).
* Other code quality improvement (MR [#16](https://gitlab.com/cosapp/cosapp/-/merge_requests/16), [#17](https://gitlab.com/cosapp/cosapp/-/merge_requests/17), [#26](https://gitlab.com/cosapp/cosapp/-/merge_requests/26), [#27](https://gitlab.com/cosapp/cosapp/-/merge_requests/27)).

## 0.11.3 (2020-12-16)

### New features

* Surrogate models:
  It is now possible to create a surrogate model at any system level with new method `System.make_surrogate` (MR [#3](https://gitlab.com/cosapp/cosapp/-/merge_requests/3) and [#12](https://gitlab.com/cosapp/cosapp/-/merge_requests/12)):
  
```python
plane = Aeroplane('plane')  # system with subsystems engine1 and engine2

# Say engine systems have one input parameter `fuel_rate`
# and possibly several outputs, and many sub-systems

# Create training schedule for input data
doe = pandas.DataFrame(
    # loads of input data
    columns=['fuel_rate', 'fan.diameter', ..]  # input names
)
plane.engine1.make_surrogate(doe)  # generates output data and train model

plane.run_once()  # executes the surrogate model of `engine1` instead of original compute()

# dump model to file
plane.engine1.dump_surrogate('engine.bin')
# load model into `engine2`:
plane.engine2.load_surrogate('engine.bin')

# deactivate surrogate model on demand
plane.engine1.active_surrogate = plane.engine2.active_surrogate = False
```

### Bug fixes, minor improvements and code quality

* Add several US-common unit conversions (MR [#2](https://gitlab.com/cosapp/cosapp/-/merge_requests/2)).
* New method to export cosapp system structure into a dictionary (MR [#5](https://gitlab.com/cosapp/cosapp/-/merge_requests/5))
* Make recorders capture port and system properties (MR [#8](https://gitlab.com/cosapp/cosapp/-/merge_requests/8)).
* Fix Module/System naming bug: *'inwards' and 'outwards' are allowed as Module/System names* (MR [#9](https://gitlab.com/cosapp/cosapp/-/merge_requests/9)).
* Broad code quality improvement (MR [#11](https://gitlab.com/cosapp/cosapp/-/merge_requests/11)).

  * Replace `typing.NoReturn` by `None` when appropriate.
  * Rewording pass, typo and error fixes in tutorial notebooks.
  * Suppress a `DeprecationWarning` raised by `numpy` in class `Variable`.
  * Reformat many strings as Python f-strings, for clarity.
  * Symplify many occurrences of `str.join()` for just two elements.

Global rewording of tutorial notebooks, including a few error fixes.

## 0.11.2 (2020-09-28)

First open-source version.
No major code change; mostly updates of license files, URLs in docs, and CI scripts.

## 0.11.1 (2020-07-22)

### Features

* Add the possibility to set boundary condition of transient simulation from interpolate profile.
* Add the possibility to prescribe a maximum step for transient variables.

### Bugs and code quality

* Bug fix in `RunOnce` driver, preventing undue call to `run_once` method.
* Bug fix in AssignString: force copy for numpy arrays.
* New tutorial for advanced features of time simulations in CosApp.

## 0.11.0 (2020-05-12)

### Features

* Improve documentation at various places, add documentation about the cosapp packages structure and sequence diagram for transient simulation.
* Add a advanced logger feature for CoSApp simulations.
* Update FMU export to PythonFMU 0.6.0
* New method `System.add_property` allowing users to create read-only properties.

### Bugs and code quality

* Suppress deprecation warnings raised by external dependencies. 
* Fix bug in AssignString with arrays, `AssignString` of the kind `'x = [0, 1, 2]'` won't change variable `x` into an array of integers,  if `x` is declared as an array of floats.
* Fix `TimeStackUnknown` not able to stack transient variables defined on a children System or with partially pulled transient variable.
* Fix the bug related to the initialization of `rate` attributes in systems.

## 0.10.2 (2020-04-21)

### Features

* [BETA] Export CoSApp System as FMU

### Bugs and code quality

* Apply Broyden correction on Jacobian matrix for iteration without Jacobian update
* Support varying time step
* Fix time not being set before `setup_run` are called.
* Fix reference for residues in `IterativeConnector` (it equals 1. now)
* Drop pyhamcrest for pytest

## 0.10.1 (2020-01-15)

### Features

* Time varying boundary conditions are now possible:

```python
system = MySystem('something')  # system with transient variables x and v
driver = system.add_driver(RungeKutta(time_interval=(0, 2), dt=0.01, order=3))

driver.set_scenario(
    init = {'x': 0.5, 'v': 0},  # initial conditions
    values =
    {
        'omega': 0.7,
        'F_ext': '0.6 * cos(omega * t)'  # explicit time-dependency
    }
)
```

### Bugs and code quality

* Fix various bug on the transient simulation front
* Correct implementation of step limitation in the Newton-Raphson solver
* Using a logger at `DEBUG` level will now display the call stack through the systems and drivers
* Rework of the Python evaluable string to be more efficient

## 0.10.0 (2019-10-23)

* Introduce continuous time simulations with dedicated time drivers (see `TimeDriver` notebook in tutorials).
* Suppress notion of (un)freeze; all variables are considered as known, unless explicitly declared as unknowns.
* Drivers no longer use ports.
* Connectors are now stored by parent system.
* Migrate to pytest.

### API Changes

* Ports:

  * `add_variable("x", units="m", types=Number)` => `add_variable("x", unit="m", dtype=Number)`
  * `freeze` => removed
  * `unfreeze` => replaced by `add_unknown` in Systems and Drivers
  * `connect_to` => replaced by `connect` at system level
  
* Systems:

  * `time_ref` is no longer an argument of method `compute`:
  
    `def compute(self, time_ref):` => `def compute(self):`
       
  * Create a new connection between `a.in1` and `b.out`:
  
    `self.a.in1.connect_to(self.b.out)` => `self.connect(self.a.in1, self.b.out)`
       
  * `add_residues` => `add_equation`
  * `set_numerical_default` => Pass keyword to `add_unknown`
  * `add_inward("x", units="m", types=Number)` => `add_inward("x", unit="m", dtype=Number)`
  * `add_outward("x", units="m", types=Number)` => `add_outward("x", unit="m", dtype=Number)`
  
* Drivers:

  * `add_unknowns(maximal_absolute_step, maximal_relative_step, low_bound, high_bound)` => `add_unknown(max_abs_step, max_rel_step, lower_bound, upper_bound)`
  * `add_equations` => `add_equation`
  * Equations are now represented by a unique string, instead of two strings (left-hand-side, right-hand-side):
  
    `add_equations("a", "b")` => `add_equation("a == b")`  
    
    `add_equations([("x", "2 * y + 1"), ("a", "b")])` => `add_equation(["x == 2 * y + 1", "a == b"])`  
        
  * For `NonLinearSolver`:
  
    `fatol` and `xtol` => `tol`  
    
    `maxiter` => `max_iter`  
        
  * For `Optimizer`:
  
    `ftol` => `tol`
    
    `maxiter` => `max_iter`

## 0.9.6 (2019-10-10)

* More correction for VISjs viewer and System HTML representation

## 0.9.5 (2019-09-25)

* Correct D3 & VISjs Viewers

## 0.9.4 (2019-09-25)

* Introduce an optional environment variable `COSAPP_CONFIG_DIR`

## 0.9.3 (2019-07-25)

### API Changes

* MonteCarlo:

  * `Montecarlo` => `MonteCarlo`
  * `Montecarlo.add_input_vars` => `MonteCarlo.add_random_variable`
  * `Montecarlo.add_response_vars` => `MonteCarlo.add_response`

* MonteCarlo has been improved by using Sobol random generator
* Viewers code on `System` is moved in a subpackage of `cosapp.tools`
* Residue reference is now calculated only once
* Various bug fix

## 0.9.2 (2019-07-01)
* In nonlinear solver, store LU factorization of the Jacobian matrix, rather than its inverse.
* Minor refactoring of the core source code, with no API changes

## 0.9.1 (2019-04-23)

* Create `Variable` class to manage variable attributes
* `watchdog` is now optional
* Configuration is now inside a folder `$HOME/.cosapp.d`
* API changes:
  - `get_latest_solution` => `save_solution`
  - `load_solver_solution` => `load_solution`
* Various bug fix

## 0.9.0 (2019-03-04)

This release introduces lots of API changes:

* Core ports and unit are available in `cosapp.ports`
* Core systems are available in `cosapp.systems`
* Core drivers are available in `cosapp.drivers`
* Core recorders are available in `cosapp.recorders`
* Core tools are available in `cosapp.tools`
* Core notebook tools are available in `cosapp.notebook` (! this is now a separated package)
* `data` have been renamed in `inwards` and `add_data` in `add_inward`
* `locals` have been renamed in `outwards` and `add_locals` in `add_outward`
* `BaseRecorder.record_iteration` renamed in `BaseRecorder.record_state`

- Huge code refractoring: cosapp is now a [Python namespace](https://packaging.python.org/guides/packaging-namespace-packages).
- `cosapp.notebook` has been moved to an independent package `cosapp_notebook`. But it is still accessible from `cosapp.notebook`.
- Introduce *Signal* / *Slot* pattern to connect to internal event (implementation from [signalslot](https://github.com/Numergy/signalslot), included in `cosapp.core.signal`)
    * `Module.setup_ran`: Signal emitted after the `call_setup_run` execution
    * `Module.computed`: Signal emitted after the full `compute` stack (i.e.: `_postcompute`)
    * `Module.clean_ran`: Signal emitted after the `call_clean_run` execution
    * `BaseRecorder.state_recorded`: Signale emitted after the `record_state` execution

## 0.8.0 (2018-10-26)

- Add Jacobian partial matrix update
- Add numerical features to variables to ease convergence control
- Add monitoring of solver residues
- Add restoration of solver result for initialization
- Rework residues and unknowns handling (remove virtual port and pulling port)
- Rework optimizer to be more homogeneous with non-linear solver
- Improve linear Monte Carlo computation time
- Improve data viewer for non-linear solver
- Create viewer for Monte Carlo
- Add dropdown widget for enum variables

## 0.7.0 (2018-09-17)

- Add helper functions to present solver evolutions
- Add new d3 visualization of systems

## 0.6.0 (2018-08-14)

- Implement clean-dirty policy
- Restore compatibility with Python 3.4
- Display influence matrix

## 0.5.0 (2018-07-20)

- Simplify drivers structure, all actions for a case are supported by a single class `RunSingleCase`
- Add support for vector variables; they can be partially (un)frozen and are handled correctly by the solver.
- Add `MonteCarlo` driver
- Add recording data capability

## 0.4.0 (2018-06-15)

- `System` and `Driver` have now a common ancestor `Module` => `Driver` variables are now stored as data or locals
- Add visualization of `System` connections based on N2 graph (syntax: `cosapp.viewmodel(mySystem)`)

## 0.3.0 (2018-04-05)

**API changes:** `System.add_driver` and `Driver.add_child` take now an instance of `Driver`

- Add external code caller System
- Add validation range attributes on variables
- Add variable visibility
- Add metamodel training and DoE generator
- Add helper function to list inputs and outputs variables of a `System`

## 0.2.0 (2018-03-01)

* Stabilization of the user API

## 0.1.0 (2018-01-02)

* First release.
