Commit c3043141 authored by Tjerk Vreeken's avatar Tjerk Vreeken

Use delay() operator in tests

Some tests were already addressed in 14c1702e, but not all.
parent 1a4be698
......@@ -28,6 +28,8 @@ equation
z = alias^2 + sin(time);
x_delayed = delay(x, 0.1);
if x > 0.5 then
switched = 1.0;
else
......
......@@ -26,10 +26,6 @@ class TestProblem(CSVMixin, ModelicaMixin, CollocatedIntegratedOptimizationProbl
kwargs["model_folder"] = data_path()
super().__init__(**kwargs)
def delayed_feedback(self):
# Delayed feedback
return [("x", "x_delayed", 0.1)]
def objective(self, ensemble_member):
# Quadratic penalty on state 'x' at final time
xf = self.state_at("x", self.times()[-1])
......
......@@ -27,10 +27,6 @@ class TestProblem(PIMixin, ModelicaMixin, CollocatedIntegratedOptimizationProble
model_folder=data_path(),
)
def delayed_feedback(self):
# Delayed feedback
return [("x", "x_delayed", 0.1)]
def objective(self, ensemble_member):
# Quadratic penalty on state 'x' at final time
xf = self.state_at("x", self.times("x")[-1], ensemble_member=ensemble_member)
......
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