csnlp.wrappers.NonRetroactiveWrapper#

class csnlp.wrappers.NonRetroactiveWrapper(nlp)[source]#

Bases: Wrapper[SymType], Generic[SymType]

Same as Wrapper, but the wrapped NLP instance must have no variable, parameter or objective specified; in other words, the wrapper must wrap the NLP before it gets defined.

Parameters:
nlpNlp

The NLP instance to be wrapped.

Raises:
ValueError

Raises if the objective, variables, dual variables, parameters or constraints are already defined in this NLP instance.

Methods

is_wrapped(wrapper_type)

Gets whether the NLP instance is wrapped or not by the given wrapper type.

Attributes

unwrapped

'Returns the original NLP of the wrapper.

is_wrapped(wrapper_type)#

Gets whether the NLP instance is wrapped or not by the given wrapper type.

Parameters:
wrapper_typetype of Wrapper

Type of wrapper to check if the NLP is wrapped with.

Returns:
bool

True if wrapped by an instance of wrapper_type; False, otherwise.

Return type:

bool

property unwrapped: Nlp[SymType]#

‘Returns the original NLP of the wrapper.

Examples using csnlp.wrappers.NonRetroactiveWrapper#

Linear MPC control

Linear MPC control

MPC controller for PWA systems

MPC controller for PWA systems

Multiple Scenario MPC

Multiple Scenario MPC

Simple open-loop MPC controller

Simple open-loop MPC controller

Scenario-based MPC

Scenario-based MPC

How scaling can help convergence

How scaling can help convergence