CogniPilot

MODELICA LIBRARY · ENGINEERING REFERENCE

function

Control.Mpc.PartialNlpSolver

Interface for the per-iteration step solver of the transcribed problem

Public declarations

Explicit source declarations; dimensions, modifications and defaults are shown as written, without evaluation.

RoleNameTypeDimensions / attributes / defaultDescription
inputjacobianReal[:, :]Residual Jacobian with respect to the stacked decision step
inputresidualReal[size(jacobian, 1)]Residual at the current iterate
inputregularizationReal(min=0.0)Diagonal damping the solver may add where applicable
outputstepReal[size(jacobian, 2)]Decision-variable step
outputacceptedBooleanFalse when the solve must be rejected

Modelica declarations and implementation

Show parameters, interfaces and source

Parameters, inputs, outputs, defaults and equations from the source file.

function PartialNlpSolver
  "Interface for the per-iteration step solver of the transcribed problem"
  input Real jacobian[:, :]
    "Residual Jacobian with respect to the stacked decision step";
  input Real residual[size(jacobian, 1)] "Residual at the current iterate";
  input Real regularization(min=0.0)
    "Diagonal damping the solver may add where applicable";
  output Real step[size(jacobian, 2)] "Decision-variable step";
  output Boolean accepted "False when the solve must be rejected";
end PartialNlpSolver;