7#ifndef __SENSAPPLICATION_HPP__
8#define __SENSAPPLICATION_HPP__
75 if(
GetRawPtr(controller) != NULL && NULL != DirectionalD_X && NULL != DirectionalD_Z_L
76 && NULL != DirectionalD_Z_U && NULL != DirectionalD_L )
79 for(
Index i = 0; i < controller->nx(); ++i )
81 SX[i] = DirectionalD_X[i];
83 for(
Index i = 0; i < controller->nzu(); ++i )
85 SZU[i] = DirectionalD_Z_U[i];
87 for(
Index i = 0; i < controller->nzl(); ++i )
89 SZL[i] = DirectionalD_Z_L[i];
91 for(
Index i = 0; i < controller->nl(); ++i )
93 SL[i] = DirectionalD_L[i];
106 if(
GetRawPtr(controller) != NULL && NULL != SensitivityM_X && NULL != SensitivityM_Z_L
107 && NULL != SensitivityM_Z_U && NULL != SensitivityM_L )
109 for(
Index i = 0; i < controller->nx() * controller->np(); ++i )
111 SX[i] = SensitivityM_X[i];
113 for(
Index i = 0; i < controller->nzu() * controller->np(); ++i )
115 SZU[i] = SensitivityM_Z_U[i];
117 for(
Index i = 0; i < controller->nzl() * controller->np(); ++i )
119 SZL[i] = SensitivityM_Z_L[i];
121 for(
Index i = 0; i < controller->nl() * controller->np(); ++i )
123 SL[i] = SensitivityM_L[i];
132 return (
GetRawPtr(controller) != NULL) ? controller->nx() : -1;
136 return (
GetRawPtr(controller) != NULL) ? controller->nl() : -1;
140 return (
GetRawPtr(controller) != NULL) ? controller->nzu() : -1;
144 return (
GetRawPtr(controller) != NULL) ? controller->nzl() : -1;
148 return (
GetRawPtr(controller) != NULL) ? controller->np() : -1;
ApplicationReturnStatus
Return codes for the Optimize call for an application.
#define DECLARE_STD_SIPOPT_EXCEPTION(__except_type)
Storing the reference count of all the smart pointers that currently reference it.
Number * DirectionalD_Z_L
SmartPtr< OptionsList > Options()
Index nx()
accessor methods to get sizing info
SmartPtr< IpoptData > ip_data_
SmartPtr< IpoptNLP > ip_nlp_
bool run_sens_
storing options values
SmartPtr< IpoptCalculatedQuantities > ip_cq_
SmartPtr< OptionsList > options_
SmartPtr< const OptionsList > Options() const
Get the options list for setting options (const version)
Number * DirectionalD_Z_U
SensApplication(SmartPtr< Journalist > jnlst, SmartPtr< OptionsList > options, SmartPtr< RegisteredOptions > reg_options)
SmartPtr< RegisteredOptions > reg_options_
SensAlgorithmExitStatus Run()
void GetDirectionalDerivatives(Number *SX, Number *SL, Number *SZL, Number *SZU)
Copy over value of Directional Derivatives K^(-1)N_p(p-p0)
void GetSensitivityMatrix(Number *SX, Number *SL, Number *SZL, Number *SZU)
Copy over value of ds/dp.
bool compute_red_hessian_
SmartPtr< SensAlgorithm > controller
ApplicationReturnStatus ipopt_retval_
void SetIpoptAlgorithmObjects(SmartPtr< IpoptApplication > app_ipopt, ApplicationReturnStatus ipopt_retval)
Number * SensitivityM_Z_U
SmartPtr< Journalist > Jnlst()
SmartPtr< Journalist > jnlst_
Number * SensitivityM_Z_L
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
SmartPtr< PDSystemSolver > pd_solver_
Template class for Smart Pointers.
This file contains a base class for all exceptions and a set of macros to help with exceptions.
SmartPtr< const U > ConstPtr(const SmartPtr< U > &smart_ptr)
U * GetRawPtr(const SmartPtr< U > &smart_ptr)
ipindex Index
Type of all indices of vectors, matrices etc.
ipnumber Number
Type of all numbers.