From 91f22cc874d2d7b7acb6897a72a3d2633e308107 Mon Sep 17 00:00:00 2001 From: tjstienstra Date: Wed, 13 Mar 2024 10:38:22 +0100 Subject: [PATCH] Clarify that the objective should not contain any known symbols --- opty/utils.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/opty/utils.py b/opty/utils.py index c7410d4a..76637c41 100644 --- a/opty/utils.py +++ b/opty/utils.py @@ -238,9 +238,10 @@ def create_objective_function( Parameters ---------- objective : sympy.Expr - The objective function to be minimized, which is a function of the - states and inputs. The objective function can contain non-nested - indefinite integrals of time, e.g. ``Integral(f(t)**2, t)``. + The objective function to be minimized. It should solely depend on the + states, inputs, and unknown symbols. Any known symbols should be + substituted beforehand. Additionally, the objective function can contain + non-nested indefinite integrals of time, e.g. ``Integral(f(t)**2, t)``. state_symbols : iterable of symbols The state variables. input_symbols : iterable of symbols