Konjugate v2.0.0: choose how your model is integrated
Konjugate 2.0.0 is out. It is the biggest release so far, and the change that matters most is simple to say: a model no longer has to be stepped with Euler. You can now choose how it is integrated, run by run, and the app tells you when another choice would serve you better.
This post goes through what is new and what to watch for when you upgrade. The full list is in the release notes on GitHub.
Choose how your model is integrated
Euler, node by node, is still the default and is unchanged. The Run dialog's Method now offers three more, each stepping the whole model at once:

- Runge–Kutta 4 is the classical fourth-order method. You can set how many steps it takes inside each global step. A model split into several nodes gives the same numbers as the same model written as one node, to fourth order.
- Adaptive (Dormand–Prince 5(4)) chooses its own step size to stay within a tolerance. It always lands exactly on global steps, schedules and interventions.
- Stiff is for models with very fast and very slow parts together. It uses Rodas4, with Konjugate's own linear algebra, and BDF is a second solver for large models with thousands of states. When a finding says a model is stiff, it offers Use Stiff in one click.
The method belongs to the run, not the model. You can run the same model with Euler for a quick look and with another method for the final answer.
A node can also use Verlet, a second-order method that keeps an oscillation's energy bounded. A node whose states do not split into positions and speeds is refused, with an explanation.
The question mark beside Method opens a short guide, Choosing a method. It gives plain signs for when to switch, such as "energy grows in an oscillator that should keep it" or "Adaptive takes tiny steps", and links each to the benchmark that shows it.

Every method works everywhere: on the serial, thread-pool and partitioned backends (the same bits on each), in checkpoints and continued runs, in the stability analysis, in C++ and Python code export and in the web edition.
Switches are found exactly
Models with switches, such as converters, rectifiers, thermostats and bouncing contacts, have always been awkward for fixed-step methods, which only notice a switch at the next step. Under Runge–Kutta 4, Adaptive and Stiff, Konjugate now finds the instant a condition in a state's equation changes and steps to it exactly. The method then keeps its full accuracy.
On the switched buck converter, Runge–Kutta 4 goes from an observed order of 1.21 to 3.96 once its switches are located. Results list the events. A condition that chatters is bounded and reported. Euler node by node is unchanged, and names the conditions it does not locate.
Editors: one equation per state
The node and relationship editors were redesigned around one idea: a state has one equation, and you should see all of it.

- A node's Equations tab shows each state's whole equation. You type the node's own term, and each relationship's or program's part appears as a chip, named in the node's own terms, with its sign. Clicking a chip opens where that part is written.
- A relationship's card shows the same rows from its side. One way / Both ways at the top of its Equations tab sets its direction.
- Parameters can have a symbol of their own, such as ω for angular velocity, used in every equation. Typing an unknown symbol offers to add it as a parameter in one step.
- Add › Node creates a node with one state and opens its card. Add › Edge lets you pick two ends on the canvas or from a list and opens the new relationship's card. One undo removes either. These replace the old node and relationship builders.
- Every part of an equation has its own value in the results. A relationship has a Results tab, and each chip shows its value while results are open.
Rates and Updates
Every state is now either a Rate, integrated over the step, or an Update, set at the end of the step. Both read the values from the start of the step, so the order in which terms are worked out never changes a result, and loops of Updates are allowed. A node, or a whole subsystem, can have its Updates settled within the step, and a loop that did not settle is reported among the run's findings.
Older files keep their numbers: a file that gives no kinds is read so that it behaves exactly as before, and one undoable step writes the kinds into it without changing any number.
Programs, FMI and the web edition
- Program SDK version 2 for C++ and Python. Programs declare their memory and ports, units are converted at the ports, and programs run under every method, in exported code and in FMUs. A Check program command and a Convert to version 2 button come with it. Older programs keep working with the same numbers.
- FMU import runs the FMI standard's Reference FMUs and matches FMPy bit for bit. A bug in FMI 3 value references, which could make a second output read the simulation time, is fixed. On the export side, exported code and FMUs again give the engine's numbers for models with Updates and substeps, and an FMU can be exported under Stiff.
- The web edition keeps you in the app. An example's guide opens in a panel next to the canvas, your project is saved in the browser as you work, and a first-time visitor is offered the three-minute tutorial or an example.
Benchmarks
Konjugate 2.0.0 was checked against exact solutions and independent tools, and every release now runs those accuracy checks. A separate post covers what the benchmarks show, where Konjugate leads and where it trails, and how to reproduce all of it from a clone.
Your files keep their numbers
This was a requirement from the start. Files from any earlier release open in 2.0.0 and give the same numbers, to the bit. This is checked for every bundled example against the 1.4.15 engine, and for files saved by 1.4.15 and 0.3.2.
There is one visible difference, and it is a fix. Long runs used to skip a sample, because the interval was added up and drifted: a 600 s run at 0.1 s produced 6000 samples and missed the one at 306.0 s. Samples are now counted in global steps from the start, so a long run has the extra sample. Every state value is the same. If a script compares sample counts, you may notice.
Sharing files with someone on an older version. A file that chooses Runge–Kutta 4, Adaptive or Stiff opens in 1.4.15, but runs there with Euler node by node, without a warning. Its result records explicitEuler, so you can tell, but it will not tell you itself. From 2.0.0 on, an unknown method or required feature is refused by name, so this cannot happen again.
Fixes worth knowing about
- Run until now belongs to the open project. It used to be one value for the whole window, carried from project to project. Bundled examples with long steps, such as Tank Calibration, used to refuse Start as they opened. They now start with their own defaults.
- Opening a project no longer drops its run length, which a later save used to lose.
- Validation runs in linear time. A model with 16,000 relationships between distinct node pairs took 166 s before.
- A parameter fit's limits now hold. It reports the best values that respect them.
Upgrading
Konjugate tells you when a new version exists. Installing and updating Konjugate explains how updates reach each kind of install, including that the Microsoft Store and Chocolatey can take a few days after a release. The web edition is at web.konjugate.com, and the desktop app is at konjugate.com.
If you hit something that looks wrong, the Help & feedback button on the left edge of the app builds a report for you.
Follow Konjugate on LinkedIn for updates, or subscribe via RSS.
Comments
Post a Comment