CppAD: A C++ Algorithmic Differentiation Package  20130102
void cppad_ipopt::jac_g_map ( cppad_ipopt_fg_info *  fg_info,
size_t  m,
size_t  n,
size_t  K,
const CppAD::vector< size_t > &  L,
const CppAD::vector< size_t > &  p,
const CppAD::vector< size_t > &  q,
const CppAD::vector< CppAD::vectorBool > &  pattern_jac_r,
CppAD::vector< size_t > &  I,
CppAD::vector< size_t > &  J,
CppAD::vector< std::map< size_t, size_t > > &  index_jac_g 
)

Create mapping from CppAD to Ipopt sparse representations of Jacobian of g.

The functions $ f : {\bf R}^n \rightarrow {\bf R} $ and $ g : {\bf R}^n \rightarrow {\bf R}^m $ are defined by the Users Representation.

Parameters:
fg_infoFor k = 0 , ... , K-1, for ell = 0 , ... , L[k], the function call
	fg_info->index(k, ell, I, J);	
is made by jac_g_map. The values k and ell are inputs. The input size of I ( J ) is greater than or equal p[k] ( q[k] ) and this size is not changed. The input values of the elements of I and J are not specified. The output value of the elements of I define

\[ I_{k, \ell} = ( {\rm I[0]} , \cdots , {\rm I[p[k]-1]} ) \]

The output value of the elements of J define

\[ J_{k, \ell} = ( {\rm J[0]} , \cdots , {\rm J[q[k]-1]} ) \]

mis the dimension of the range space for $ g(x) $; i.e., $ g(x) \in {\bf R}^m $.
nis the dimension of the domain space for $ f(x) $ and $ g(x) $; i.e., $ x \in {\bf R}^n $.
Kis the number of functions $ r_k ( u ) $ used for the representation of $ f(x) $ and $ g(x) $.
Lis a vector with size K. For k = 0 , ... , K-1, L[k] is the number of terms that use $ r_k (u) $ in the representation of $ f(x) $ and $ g(x) $.
pis a vector with size K. For k = 0 , ... , K-1, p[k] is dimension of the range space for $ r_k (u) $; i.e., $ r_k (u) \in {\bf R}^{p(k)} $.
qis a vector with size K. For k = 0 , ... , K-1, q[k] is dimension of the domain space for $ r_k (u) $; i.e., $ u \in {\bf R}^{q(k)} $.
pattern_jac_ris a vector with size K. For k = 0 , ... , K-1, pattern_jac_r[k] is a CppAD sparsity pattern for the Jacobian of the function $ r_k : {\bf R}^{q(k)} \rightarrow {\bf R}^{p(k)} $. As such, pattern_jac_r[k].size() == p[k] * q[k].
Iis a work vector of length greater than or equal p[k] for all k. The input and output value of its elements are unspecified. The size of I is not changed.
Jis a work vector of length greater than or equal q[k] for all k. The input and output value of its elements are unspecified. The size of J is not changed.
index_jac_g,:On input, this is empty; i.e., index_jac_g.size() == 0. On output, it is the index mapping from $ (i, j) $ in the Jacobian of $ g(x) $ to the corresponding index value used by Ipopt to represent the Jacobian. Furthermore, if index_jac_g[i].find(j) == index_jac_g[i].end(), then the $ (i, j)$ entry in the Jacobian of $ g(x) $ is always zero.

Definition at line 110 of file jac_g_map.cpp.

Referenced by cppad_ipopt::cppad_ipopt_nlp::cppad_ipopt_nlp().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines