IpIteratesVector.hpp 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688
  1. // Copyright (C) 2004, 2006 International Business Machines and others.
  2. // All Rights Reserved.
  3. // This code is published under the Eclipse Public License.
  4. //
  5. // $Id: IpIteratesVector.hpp 2276 2013-05-05 12:33:44Z stefan $
  6. //
  7. // Authors: Carl Laird, Andreas Waechter IBM 2004-06-06
  8. #ifndef __IPITERATESVECTOR_HPP__
  9. #define __IPITERATESVECTOR_HPP__
  10. #include "IpCompoundVector.hpp"
  11. namespace Ipopt
  12. {
  13. /* forward declarations */
  14. class IteratesVectorSpace;
  15. /** Specialized CompoundVector class specifically for the algorithm
  16. * iterates. This class inherits from CompoundVector and is a
  17. * specialized class for handling the iterates of the Ipopt
  18. * Algorithm, that is, x, s, y_c, y_d, z_L, z_U, v_L, and v_U. It
  19. * inherits from CompoundVector so it can behave like a CV in most
  20. * calculations, but it has fixed dimensions and cannot be
  21. * customized
  22. */
  23. class IteratesVector : public CompoundVector
  24. {
  25. public:
  26. /** Constructors / Destructors */
  27. //@{
  28. IteratesVector(const IteratesVectorSpace* owner_space, bool create_new);
  29. virtual ~IteratesVector();
  30. //@}
  31. /** Make New methods */
  32. //@{
  33. /** Use this method to create a new iterates vector. The MakeNew
  34. * method on the Vector class also works, but it does not give
  35. * the create_new option.
  36. */
  37. SmartPtr<IteratesVector> MakeNewIteratesVector(bool create_new = true) const;
  38. /** Use this method to create a new iterates vector with a copy of
  39. * all the data.
  40. */
  41. SmartPtr<IteratesVector> MakeNewIteratesVectorCopy() const
  42. {
  43. SmartPtr<IteratesVector> ret = MakeNewIteratesVector(true);
  44. ret->Copy(*this);
  45. return ret;
  46. }
  47. /** Use this method to create a new iterates vector
  48. * container. This creates a new NonConst container, but the
  49. * elements inside the iterates vector may be const. Therefore,
  50. * the container can be modified to point to new entries, but the
  51. * existing entries may or may not be modifiable.
  52. */
  53. SmartPtr<IteratesVector> MakeNewContainer() const;
  54. //@}
  55. /** Iterates Set/Get Methods */
  56. //@{
  57. /** Get the x iterate (const) */
  58. SmartPtr<const Vector> x() const
  59. {
  60. return GetIterateFromComp(0);
  61. }
  62. /** Get the x iterate (non-const) - this can only be called if the
  63. * vector was created intenally, or the Set_x_NonConst method was
  64. * used. */
  65. SmartPtr<Vector> x_NonConst()
  66. {
  67. return GetNonConstIterateFromComp(0);
  68. }
  69. /** Create a new vector in the x entry */
  70. inline
  71. SmartPtr<Vector> create_new_x();
  72. /** Create a new vector in the x entry and copy the current values
  73. * into it. */
  74. SmartPtr<Vector> create_new_x_copy()
  75. {
  76. SmartPtr<const Vector> curr_x = GetComp(0);
  77. Set_x_NonConst(*curr_x->MakeNew());
  78. x_NonConst()->Copy(*curr_x);
  79. return x_NonConst();
  80. }
  81. /** Set the x iterate (const). Sets the pointer, does NOT copy
  82. * data. */
  83. void Set_x(const Vector& vec)
  84. {
  85. SetComp(0, vec);
  86. }
  87. /** Set the x iterate (non-const). Sets the pointer, does NOT copy
  88. * data. */
  89. void Set_x_NonConst(Vector& vec)
  90. {
  91. SetCompNonConst(0, vec);
  92. }
  93. /** Get the s iterate (const) */
  94. SmartPtr<const Vector> s() const
  95. {
  96. return GetIterateFromComp(1);
  97. }
  98. /** Get the s iterate (non-const) - this can only be called if the
  99. * vector was created intenally, or the Set_s_NonConst method was
  100. * used. */
  101. SmartPtr<Vector> s_NonConst()
  102. {
  103. return GetNonConstIterateFromComp(1);
  104. }
  105. /** Create a new vector in the s entry */
  106. inline
  107. SmartPtr<Vector> create_new_s();
  108. /** Create a new vector in the s entry and copy the current values
  109. * into it. */
  110. SmartPtr<Vector> create_new_s_copy()
  111. {
  112. SmartPtr<const Vector> curr_s = GetComp(1);
  113. Set_s_NonConst(*curr_s->MakeNew());
  114. s_NonConst()->Copy(*curr_s);
  115. return s_NonConst();
  116. }
  117. /** Set the s iterate (const). Sets the pointer, does NOT copy
  118. * data. */
  119. void Set_s(const Vector& vec)
  120. {
  121. SetComp(1, vec);
  122. }
  123. /** Set the s iterate (non-const). Sets the pointer, does NOT copy
  124. * data. */
  125. void Set_s_NonConst(Vector& vec)
  126. {
  127. SetCompNonConst(1, vec);
  128. }
  129. /** Get the y_c iterate (const) */
  130. SmartPtr<const Vector> y_c() const
  131. {
  132. return GetIterateFromComp(2);
  133. }
  134. /** Get the y_c iterate (non-const) - this can only be called if
  135. * the vector was created intenally, or the Set_y_c_NonConst
  136. * method was used. */
  137. SmartPtr<Vector> y_c_NonConst()
  138. {
  139. return GetNonConstIterateFromComp(2);
  140. }
  141. /** Create a new vector in the y_c entry */
  142. inline
  143. SmartPtr<Vector> create_new_y_c();
  144. /** Create a new vector in the y_c entry and copy the current
  145. * values into it. */
  146. SmartPtr<Vector> create_new_y_c_copy()
  147. {
  148. SmartPtr<const Vector> curr_y_c = GetComp(2);
  149. Set_y_c_NonConst(*curr_y_c->MakeNew());
  150. y_c_NonConst()->Copy(*curr_y_c);
  151. return y_c_NonConst();
  152. }
  153. /** Set the y_c iterate (const). Sets the pointer, does NOT copy
  154. * data. */
  155. void Set_y_c(const Vector& vec)
  156. {
  157. SetComp(2, vec);
  158. }
  159. /** Set the y_c iterate (non-const). Sets the pointer, does NOT
  160. * copy data. */
  161. void Set_y_c_NonConst(Vector& vec)
  162. {
  163. SetCompNonConst(2, vec);
  164. }
  165. /** Get the y_d iterate (const) */
  166. SmartPtr<const Vector> y_d() const
  167. {
  168. return GetIterateFromComp(3);
  169. }
  170. /** Get the y_d iterate (non-const) - this can only be called if
  171. * the vector was created intenally, or the Set_y_d_NonConst
  172. * method was used. */
  173. SmartPtr<Vector> y_d_NonConst()
  174. {
  175. return GetNonConstIterateFromComp(3);
  176. }
  177. /** Create a new vector in the y_d entry */
  178. inline
  179. SmartPtr<Vector> create_new_y_d();
  180. /** Create a new vector in the y_d entry and copy the current
  181. * values into it. */
  182. SmartPtr<Vector> create_new_y_d_copy()
  183. {
  184. SmartPtr<const Vector> curr_y_d = GetComp(3);
  185. Set_y_d_NonConst(*curr_y_d->MakeNew());
  186. y_d_NonConst()->Copy(*curr_y_d);
  187. return y_d_NonConst();
  188. }
  189. /** Set the y_d iterate (const). Sets the pointer, does NOT copy
  190. * data. */
  191. void Set_y_d(const Vector& vec)
  192. {
  193. SetComp(3, vec);
  194. }
  195. /** Set the y_d iterate (non-const). Sets the pointer, does NOT
  196. * copy data. */
  197. void Set_y_d_NonConst(Vector& vec)
  198. {
  199. SetCompNonConst(3, vec);
  200. }
  201. /** Get the z_L iterate (const) */
  202. SmartPtr<const Vector> z_L() const
  203. {
  204. return GetIterateFromComp(4);
  205. }
  206. /** Get the z_L iterate (non-const) - this can only be called if
  207. * the vector was created intenally, or the Set_z_L_NonConst
  208. * method was used. */
  209. SmartPtr<Vector> z_L_NonConst()
  210. {
  211. return GetNonConstIterateFromComp(4);
  212. }
  213. /** Create a new vector in the z_L entry */
  214. inline
  215. SmartPtr<Vector> create_new_z_L();
  216. /** Create a new vector in the z_L entry and copy the current
  217. * values into it. */
  218. SmartPtr<Vector> create_new_z_L_copy()
  219. {
  220. SmartPtr<const Vector> curr_z_L = GetComp(4);
  221. Set_z_L_NonConst(*curr_z_L->MakeNew());
  222. z_L_NonConst()->Copy(*curr_z_L);
  223. return z_L_NonConst();
  224. }
  225. /** Set the z_L iterate (const). Sets the pointer, does NOT copy
  226. * data. */
  227. void Set_z_L(const Vector& vec)
  228. {
  229. SetComp(4, vec);
  230. }
  231. /** Set the z_L iterate (non-const). Sets the pointer, does NOT
  232. * copy data. */
  233. void Set_z_L_NonConst(Vector& vec)
  234. {
  235. SetCompNonConst(4, vec);
  236. }
  237. /** Get the z_U iterate (const) */
  238. SmartPtr<const Vector> z_U() const
  239. {
  240. return GetIterateFromComp(5);
  241. }
  242. /** Get the z_U iterate (non-const) - this can only be called if
  243. * the vector was created intenally, or the Set_z_U_NonConst
  244. * method was used. */
  245. SmartPtr<Vector> z_U_NonConst()
  246. {
  247. return GetNonConstIterateFromComp(5);
  248. }
  249. /** Create a new vector in the z_U entry */
  250. inline
  251. SmartPtr<Vector> create_new_z_U();
  252. /** Create a new vector in the z_U entry and copy the current
  253. * values into it. */
  254. SmartPtr<Vector> create_new_z_U_copy()
  255. {
  256. SmartPtr<const Vector> curr_z_U = GetComp(5);
  257. Set_z_U_NonConst(*curr_z_U->MakeNew());
  258. z_U_NonConst()->Copy(*curr_z_U);
  259. return z_U_NonConst();
  260. }
  261. /** Set the z_U iterate (const). Sets the pointer, does NOT copy
  262. * data. */
  263. void Set_z_U(const Vector& vec)
  264. {
  265. SetComp(5, vec);
  266. }
  267. /** Set the z_U iterate (non-const). Sets the pointer, does NOT
  268. * copy data. */
  269. void Set_z_U_NonConst(Vector& vec)
  270. {
  271. SetCompNonConst(5, vec);
  272. }
  273. /** Get the v_L iterate (const) */
  274. SmartPtr<const Vector> v_L() const
  275. {
  276. return GetIterateFromComp(6);
  277. }
  278. /** Get the v_L iterate (non-const) - this can only be called if
  279. * the vector was created intenally, or the Set_v_L_NonConst
  280. * method was used. */
  281. SmartPtr<Vector> v_L_NonConst()
  282. {
  283. return GetNonConstIterateFromComp(6);
  284. }
  285. /** Create a new vector in the v_L entry */
  286. inline
  287. SmartPtr<Vector> create_new_v_L();
  288. /** Create a new vector in the v_L entry and copy the current
  289. * values into it. */
  290. SmartPtr<Vector> create_new_v_L_copy()
  291. {
  292. SmartPtr<const Vector> curr_v_L = GetComp(6);
  293. Set_v_L_NonConst(*curr_v_L->MakeNew());
  294. v_L_NonConst()->Copy(*curr_v_L);
  295. return v_L_NonConst();
  296. }
  297. /** Set the v_L iterate (const). Sets the pointer, does NOT copy
  298. * data. */
  299. void Set_v_L(const Vector& vec)
  300. {
  301. SetComp(6, vec);
  302. }
  303. /** Set the v_L iterate (non-const). Sets the pointer, does NOT
  304. * copy data. */
  305. void Set_v_L_NonConst(Vector& vec)
  306. {
  307. SetCompNonConst(6, vec);
  308. }
  309. /** Get the v_U iterate (const) */
  310. SmartPtr<const Vector> v_U() const
  311. {
  312. return GetIterateFromComp(7);
  313. }
  314. /** Get the v_U iterate (non-const) - this can only be called if
  315. * the vector was created intenally, or the Set_v_U_NonConst
  316. * method was used. */
  317. SmartPtr<Vector> v_U_NonConst()
  318. {
  319. return GetNonConstIterateFromComp(7);
  320. }
  321. /** Create a new vector in the v_U entry */
  322. inline
  323. SmartPtr<Vector> create_new_v_U();
  324. /** Create a new vector in the v_U entry and copy the current
  325. * values into it. */
  326. SmartPtr<Vector> create_new_v_U_copy()
  327. {
  328. SmartPtr<const Vector> curr_v_U = GetComp(7);
  329. Set_v_U_NonConst(*curr_v_U->MakeNew());
  330. v_U_NonConst()->Copy(*curr_v_U);
  331. return v_U_NonConst();
  332. }
  333. /** Set the v_U iterate (const). Sets the pointer, does NOT copy
  334. * data. */
  335. void Set_v_U(const Vector& vec)
  336. {
  337. SetComp(7, vec);
  338. }
  339. /** Set the v_U iterate (non-const). Sets the pointer, does NOT
  340. * copy data. */
  341. void Set_v_U_NonConst(Vector& vec)
  342. {
  343. SetCompNonConst(7, vec);
  344. }
  345. /** Set the primal variables all in one shot. Sets the pointers,
  346. * does NOT copy data */
  347. void Set_primal(const Vector& x, const Vector& s)
  348. {
  349. SetComp(0, x);
  350. SetComp(1, s);
  351. }
  352. void Set_primal_NonConst(Vector& x, Vector& s)
  353. {
  354. SetCompNonConst(0, x);
  355. SetCompNonConst(1, s);
  356. }
  357. /** Set the eq multipliers all in one shot. Sets the pointers,
  358. * does not copy data. */
  359. void Set_eq_mult(const Vector& y_c, const Vector& y_d)
  360. {
  361. SetComp(2, y_c);
  362. SetComp(3, y_d);
  363. }
  364. void Set_eq_mult_NonConst(Vector& y_c, Vector& y_d)
  365. {
  366. SetCompNonConst(2, y_c);
  367. SetCompNonConst(3, y_d);
  368. }
  369. /** Set the bound multipliers all in one shot. Sets the pointers,
  370. * does not copy data. */
  371. void Set_bound_mult(const Vector& z_L, const Vector& z_U, const Vector& v_L, const Vector& v_U)
  372. {
  373. SetComp(4, z_L);
  374. SetComp(5, z_U);
  375. SetComp(6, v_L);
  376. SetComp(7, v_U);
  377. }
  378. void Set_bound_mult_NonConst(Vector& z_L, Vector& z_U, Vector& v_L, Vector& v_U)
  379. {
  380. SetCompNonConst(4, z_L);
  381. SetCompNonConst(5, z_U);
  382. SetCompNonConst(6, v_L);
  383. SetCompNonConst(7, v_U);
  384. }
  385. /** Get a sum of the tags of the contained items. There is no
  386. * guarantee that this is unique, but there is a high chance it
  387. * is unique and it can be used for debug checks relatively
  388. * reliably.
  389. */
  390. TaggedObject::Tag GetTagSum() const
  391. {
  392. TaggedObject::Tag tag;
  393. if (IsValid(x()))
  394. tag = x()->GetTag() + tag;
  395. if (IsValid(s()))
  396. tag = s()->GetTag() + tag;
  397. if (IsValid(y_c()))
  398. tag = y_c()->GetTag() + tag;
  399. if (IsValid(y_d()))
  400. tag = y_d()->GetTag() + tag;
  401. if (IsValid(z_L()))
  402. tag = z_L()->GetTag() + tag;
  403. if (IsValid(z_U()))
  404. tag = z_U()->GetTag() + tag;
  405. if (IsValid(v_L()))
  406. tag = v_L()->GetTag() + tag;
  407. if (IsValid(v_U()))
  408. tag = v_U()->GetTag() + tag;
  409. return tag;
  410. }
  411. //@}
  412. private:
  413. /**@name Default Compiler Generated Methods (Hidden to avoid
  414. * implicit creation/calling). These methods are not implemented
  415. * and we do not want the compiler to implement them for us, so we
  416. * declare them private and do not define them. This ensures that
  417. * they will not be implicitly created/called.
  418. */
  419. //@{
  420. /** Default Constructor */
  421. IteratesVector();
  422. /** Copy Constructor */
  423. IteratesVector(const IteratesVector&);
  424. /** Overloaded Equals Operator */
  425. void operator=(const IteratesVector&);
  426. //@}
  427. const IteratesVectorSpace* owner_space_;
  428. /** private method to return the const element from the compound
  429. * vector. This method will return NULL if none is currently
  430. * set.
  431. */
  432. SmartPtr<const Vector> GetIterateFromComp(Index i) const
  433. {
  434. if (IsCompNull(i)) {
  435. return NULL;
  436. }
  437. return GetComp(i);
  438. }
  439. /** private method to return the non-const element from the
  440. * compound vector. This method will return NULL if none is
  441. * currently set.
  442. */
  443. SmartPtr<Vector> GetNonConstIterateFromComp(Index i)
  444. {
  445. if (IsCompNull(i)) {
  446. return NULL;
  447. }
  448. return GetCompNonConst(i);
  449. }
  450. };
  451. /** Vector Space for the IteratesVector class. This is a
  452. * specialized vector space for the IteratesVector class.
  453. */
  454. class IteratesVectorSpace : public CompoundVectorSpace
  455. {
  456. public:
  457. /** @name Constructors/Destructors. */
  458. //@{
  459. /** Constructor that takes the spaces for each of the iterates.
  460. * Warning! None of these can be NULL !
  461. */
  462. IteratesVectorSpace(const VectorSpace& x_space, const VectorSpace& s_space,
  463. const VectorSpace& y_c_space, const VectorSpace& y_d_space,
  464. const VectorSpace& z_L_space, const VectorSpace& z_U_space,
  465. const VectorSpace& v_L_space, const VectorSpace& v_U_space
  466. );
  467. virtual ~IteratesVectorSpace();
  468. //@}
  469. /** Method for creating vectors . */
  470. //@{
  471. /** Use this to create a new IteratesVector. You can pass-in
  472. * create_new = false if you only want a container and do not
  473. * want vectors allocated.
  474. */
  475. virtual IteratesVector* MakeNewIteratesVector(bool create_new = true) const
  476. {
  477. return new IteratesVector(this, create_new);
  478. }
  479. /** Use this method to create a new const IteratesVector. You must pass in
  480. * valid pointers for all of the entries.
  481. */
  482. const SmartPtr<const IteratesVector> MakeNewIteratesVector(const Vector& x, const Vector& s,
  483. const Vector& y_c, const Vector& y_d,
  484. const Vector& z_L, const Vector& z_U,
  485. const Vector& v_L, const Vector& v_U)
  486. {
  487. SmartPtr<IteratesVector> newvec = MakeNewIteratesVector(false);
  488. newvec->Set_x(x);
  489. newvec->Set_s(s);
  490. newvec->Set_y_c(y_c);
  491. newvec->Set_y_d(y_d);
  492. newvec->Set_z_L(z_L);
  493. newvec->Set_z_U(z_U);
  494. newvec->Set_v_L(v_L);
  495. newvec->Set_v_U(v_U);
  496. return ConstPtr(newvec);
  497. }
  498. /** This method overloads
  499. * ComooundVectorSpace::MakeNewCompoundVector to make sure that
  500. * we get a vector of the correct type
  501. */
  502. virtual CompoundVector* MakeNewCompoundVector(bool create_new = true) const
  503. {
  504. return MakeNewIteratesVector(create_new);
  505. }
  506. /** This method creates a new vector (and allocates space in all
  507. * the contained vectors. This is really only used for code that
  508. * does not know what type of vector it is dealing with - for
  509. * example, this method is called from Vector::MakeNew()
  510. */
  511. virtual Vector* MakeNew() const
  512. {
  513. return MakeNewIteratesVector();
  514. }
  515. //@}
  516. /** This method hides the CompoundVectorSpace::SetCompSpace method
  517. * since the components of the Iterates are fixed at
  518. * construction.
  519. */
  520. virtual void SetCompSpace(Index icomp, const VectorSpace& vec_space)
  521. {
  522. DBG_ASSERT(false && "This is an IteratesVectorSpace - a special compound vector for Ipopt iterates. The contained spaces should not be modified.");
  523. }
  524. private:
  525. /**@name Default Compiler Generated Methods (Hidden to avoid
  526. * implicit creation/calling). These methods are not implemented
  527. * and we do not want the compiler to implement them for us, so we
  528. * declare them private and do not define them. This ensures that
  529. * they will not be implicitly created/called. */
  530. //@{
  531. /** Default constructor */
  532. IteratesVectorSpace();
  533. /** Copy Constructor */
  534. IteratesVectorSpace(const IteratesVectorSpace&);
  535. /** Overloaded Equals Operator */
  536. IteratesVectorSpace& operator=(const IteratesVectorSpace&);
  537. //@}
  538. /** Contained Spaces */
  539. SmartPtr<const VectorSpace> x_space_;
  540. SmartPtr<const VectorSpace> s_space_;
  541. SmartPtr<const VectorSpace> y_c_space_;
  542. SmartPtr<const VectorSpace> y_d_space_;
  543. SmartPtr<const VectorSpace> z_L_space_;
  544. SmartPtr<const VectorSpace> z_U_space_;
  545. SmartPtr<const VectorSpace> v_L_space_;
  546. SmartPtr<const VectorSpace> v_U_space_;
  547. };
  548. inline
  549. SmartPtr<Vector> IteratesVector::create_new_x()
  550. {
  551. Set_x_NonConst(*owner_space_->GetCompSpace(0)->MakeNew());
  552. return x_NonConst();
  553. }
  554. inline
  555. SmartPtr<Vector> IteratesVector::create_new_s()
  556. {
  557. Set_s_NonConst(*owner_space_->GetCompSpace(1)->MakeNew());
  558. return s_NonConst();
  559. }
  560. inline
  561. SmartPtr<Vector> IteratesVector::create_new_y_c()
  562. {
  563. Set_y_c_NonConst(*owner_space_->GetCompSpace(2)->MakeNew());
  564. return y_c_NonConst();
  565. }
  566. inline
  567. SmartPtr<Vector> IteratesVector::create_new_y_d()
  568. {
  569. Set_y_d_NonConst(*owner_space_->GetCompSpace(3)->MakeNew());
  570. return y_d_NonConst();
  571. }
  572. inline
  573. SmartPtr<Vector> IteratesVector::create_new_z_L()
  574. {
  575. Set_z_L_NonConst(*owner_space_->GetCompSpace(4)->MakeNew());
  576. return z_L_NonConst();
  577. }
  578. inline
  579. SmartPtr<Vector> IteratesVector::create_new_z_U()
  580. {
  581. Set_z_U_NonConst(*owner_space_->GetCompSpace(5)->MakeNew());
  582. return z_U_NonConst();
  583. }
  584. inline
  585. SmartPtr<Vector> IteratesVector::create_new_v_L()
  586. {
  587. Set_v_L_NonConst(*owner_space_->GetCompSpace(6)->MakeNew());
  588. return v_L_NonConst();
  589. }
  590. inline
  591. SmartPtr<Vector> IteratesVector::create_new_v_U()
  592. {
  593. Set_v_U_NonConst(*owner_space_->GetCompSpace(7)->MakeNew());
  594. return v_U_NonConst();
  595. }
  596. } // namespace Ipopt
  597. #endif