Skip to content

Commit 872c069

Browse files
committed
Fix tests.
1 parent 91d64ba commit 872c069

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

examples/vdp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def run_vdp(force_recompile=True, plot=True):
2424
# Optimize
2525
mo.define_optimization(constraints={"u":(-1, 0.75)},
2626
objective_terms=["objectiveIntegrand"])
27-
res_ocp_df = mo.optimize()
27+
res_ocp_df = mo.optimize(calculate_objective_terms_integrals=False)
2828

2929
# Plot
3030
if plot:
@@ -68,7 +68,7 @@ def run_vdp_optimize_with_input(force_recompile=False, plot=True):
6868
mo.define_optimization(constraints={"u":(-1, 0.75)},
6969
objective_terms=["objectiveIntegrand"],
7070
prescribed_inputs={"u_prescribed": u_traj})
71-
res_ocp_df = mo.optimize()
71+
res_ocp_df = mo.optimize(calculate_objective_terms_integrals=False)
7272

7373
# Plot
7474
if plot:

wedoco_optimo/model.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ def transfer_model(self, model: str, modelica_files=list[str], force_recompile:
8181
self.u = ca.vcat([self.dae.var(name) for name in self.dae.u()])
8282
self.y = ca.vcat([self.dae.var(name) for name in self.dae.y()])
8383

84-
# Create the symbolic functions and integrator
85-
self._create_functions()
86-
8784
# Define the time grid
8885
self.define_time_grid(start_time=0.0, end_time=10.0, dt=0.1)
8986

87+
# Create the symbolic functions and integrator
88+
self._create_functions()
89+
9090
return fmu_file_path
9191

9292
def _create_functions(self):

0 commit comments

Comments
 (0)