pockit.optimizer.ipopt
def
solve( system: pockit.base.systembase.SystemBase, guess: pockit.base.variablebase.VariableBase | list[typing.Union[pockit.base.variablebase.VariableBase, typing.Iterable[float]]], optimizer_options: Optional[dict] = None) -> tuple[pockit.base.variablebase.VariableBase | list[typing.Union[pockit.base.variablebase.VariableBase, typing.Iterable[float]]], typing.Any]:
Solve the system using IPOPT.
If the system has only one phase and no static variables, guess can
be a single Variable object. Otherwise, guess should be a list of
Variable objects, one for each Phase, followed by an array
as values of static variables.
Optimizer options should be a dictionary of options to pass to Ipopt. See Ipopt documentation for available options. Options will be passed verbatimly.
Arguments:
- system:
Systemto solve. - guess: Guess to the solution.
- optimizer_options: Options to pass to IPOPT.
Returns:
The value returned by IPOPT parsed as the same format as
guess(a singleVariableobject or a list ofVariableobjects and a array for static values), and the raw output returned by IPOPT.