Commit 424f2685 authored by Jorn Baayen's avatar Jorn Baayen

Modelica unit test: Set u_max from parameters() method to test parameter expressions.

parent 494b96ab
......@@ -5,7 +5,7 @@ model TestModelWithInitial
parameter Real k = 1.0;
parameter Real u_max = 2;
parameter Real u_max;
input Real u(fixed=false, min = -2, max = u_max);
output Real y;
......
......@@ -25,6 +25,11 @@ class TestProblem(ModelicaMixin, CollocatedIntegratedOptimizationProblem):
# Collocation points
return np.linspace(0.0, 1.0, 21)
def parameters(self, ensemble_member):
parameters = super().parameters(ensemble_member)
parameters['u_max'] = 2.0
return parameters
def pre(self):
# Do nothing
pass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment