- 19 Jan, 2023 2 commits
-
-
Use sets instead of lists to compare keys and values of dicts.
-
Add unit tests for the alias tools in alias_tools.py.
-
- 12 Jan, 2023 1 commit
-
-
Sjoerd Geevers authored
The newest version of numpy (1.24.1) causes an error when reading a list of casadi variables into a numpy array. This has been fixed by first converting the casadi variables to floats.
-
- 15 Dec, 2022 1 commit
-
-
- 08 Dec, 2022 3 commits
-
-
When multiple aliases present, allow aliases to be written as output. Only one of such variables is written in the output.
-
When multiple aliases present, allow aliases to be written as outputs (if present in the DataConfig).
-
Joris Bentvelsen authored
These two packages are relatively unstable or known to make substantial (backwards-incompatible) changes. We therefore pin them to release series with bug fixes only. From here on the workflow is to bump the major version manually when making a new release.
-
- 24 Nov, 2022 4 commits
-
-
Different nominals should not influence the results of a simulation/optimization model substantially. A similar test is already present for optimization.
-
The code assumed in various places that the model would have at least one parameter. While this is in practise the case, this does not have be so. We allow a simulation model to have zero parameters.
-
A set of casadi symbols was defined twice in the code. This lead to the casadi substitution function to point to two different objects. In this commit the double definition is removed.
-
Sjoerd Geevers authored
We fix flake8 to version 5 for now, since the Python 3.8.15 version fails for flake8 version 6.0.0.
-
- 04 Nov, 2022 1 commit
-
-
Olav van Duin authored
-
- 27 Oct, 2022 2 commits
-
-
- 25 Oct, 2022 1 commit
-
-
Joris Bentvelsen authored
-
- 18 Oct, 2022 1 commit
-
-
- 13 Oct, 2022 2 commits
-
-
Teresa Piovesan authored
-
Teresa Piovesan authored
-
- 10 Aug, 2022 4 commits
-
-
Teresa Piovesan authored
-
Teresa Piovesan authored
One can pass to Ipopt parameters or do the substitution before hand. We now do the latter, to allow to solve for equations of the type x^k where k is a parameter. Note that this is not an issue in optimization problem, as in CollIntOpt the parameter substitution is already done.
-
Teresa Piovesan authored
-
Teresa Piovesan authored
-
- 23 May, 2022 3 commits
-
-
Vreeken authored
-
Vreeken authored
A string representation of the branch indices was used, and subsequently the _length_ of said string was used in the splitting logic as well. This works fine for k <= 9, but no longer matches the number of splits (or uniquely identifies the branch) for k >= 10. This commit turns the concatenated string into a tuple, such that the logic holds for k of arbitrary magnitude.
-
Vreeken authored
-
- 25 Mar, 2022 3 commits
-
-
For performance reasons, the internal storage was changed from NumPy arrays to lists in 516cd10f. The extract_results() method then also started returning lists, which is different from the equivalent method in optimization that returns arrays. This is somewhat confusing, and can trip up code that is shared between simulation and optimization implementations. This commit brings simulation's extract_results() in line with that of otpimization by returning NumPy arrays as well. Note that we keep the internal storage as lists for performance reasons. As such, a call to extract_results() is expensive, and should be done as little as possible, e.g. once in post().
-
Only PIMixin had extract_results() defined, whereas its implementation relied on internal storage structures of IOMixin. We move the method to IOMixin such that it also works when using e.g. CSVMixin.
-
-
- 29 Oct, 2021 1 commit
-
-
In case partial history was present, the delay expressions with missing values were correctly logged a warning for. However, in case no history was provided at all, these warnings were not logged due to the if-check not catching this. This commit makes sure that warnings are logged also in that scenario. Closes #1130
-
- 05 Oct, 2021 1 commit
-
-
Vreeken authored
-
- 21 Sep, 2021 1 commit
-
-
We would silently continue execution if `constraints()` returns None due to it being falsy (just like an empty list). Generally though, returning None is a user error where they forgot to return a value. To make this error easier to catch, we now raise an Exception. Note that returning None from `path_constraints()` already resulted in an error.
-
- 05 Sep, 2021 1 commit
-
-
Vreeken authored
The debug check is a debug _check_, and should not have any side effects like converting the NLP to SX instead of MX.
-
- 20 Jul, 2021 4 commits
-
-
-
-
Vreeken authored
To compare two Timeseries, users were forced to compare the `.times` and `.values` properties of two Timeseries objects. This commit implements the __eq__ operator, such that users can just do `ts_a == ts_b`.
-
Vreeken authored
The `stretch_values` function would only work if the subslice Timeseries extended to the end of the existing `io.times_sec`. In other words, it would only ever prepend with NaNs, and never append them (contrary to what the nearby comment stated). This commit makes sure that we can call `set_timeseries` with slices that neither start nor end with the first and last value of `io.times_sec`. This can be useful when e.g. importing 1000 times with CSVMixin, but overriding `times()` to just run timestep 100-150.
-
- 16 Feb, 2021 1 commit
-
-
Vreeken authored
Since version 1.20, NumPy warns about the use of np.bool as an alias of bool. Instead, the suggestion is to just use `bool` as the type specifier.
-
- 29 Jan, 2021 1 commit
-
-
It can be useful to check whether the nominals for variables were chosen correctly by looking at the state output. Solvers like CPLEX and Gurobi typically prefer to have state vector entries being no larger than 1E4. Solvers like IPOPT generally prefer them smaller than 1E2. If _any_ state vector entry of a certain variable exceeds this `tol_up` threshold (1E4 by default), a message is logged. Aside from the maximum magnitude of state vector entries, the accuracy of the solution can also be effected negatively if a too large a nominal is chosen. The added check routine can however not be sure if the solution just happened to be approximately zero, or if the nominal was chosen incorrectly. A message is logged when _all_ state vector entries of a certain variable are smaller (in absolute terms) than the `tol_down` criterion. Note that it may not be possible to both satisfy correct scaling of the coefficients in the Jacobian and the state vector entries. Sometimes a trade-off between the two would be required, i.e. a coefficient that's rather small, _and_ state vector entries that are rather small. This is preferred over only one of the two being doubly small.
-
- 18 Jan, 2021 1 commit
-
-
Vreeken authored
Sometimes it can be useful to skip the `theta = 0`, e.g. when a good seed is available from a previous run. This commit adds an option `theta_start` for the user to specify what theta to start the homotopy process at. The default value of this new option is the current (before this commit) starting theta value of 0.
-
- 14 Sep, 2020 1 commit
-
-
Vreeken authored
Delay history handling would fail if there was more than one delayed expression in a model. The simple fix is to not unpack the list that the call to `delayed_feedback_function` returns. The tests have been amended to make sure that this case is covered.
-