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
'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
Trueif wrapped by an instance ofwrapper_type;False, otherwise.
- Return type: