Ipopt 3.12.10

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
IpIteratesVector.hpp
Go to the documentation of this file.
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 2472 2014-04-05 17:47:20Z stefan $
6 //
7 // Authors: Carl Laird, Andreas Waechter IBM 2004-06-06
8
9 #ifndef __IPITERATESVECTOR_HPP__
10 #define __IPITERATESVECTOR_HPP__
11
12 #include "IpCompoundVector.hpp"
13
14 namespace Ipopt
15 {
16 /* forward declarations */
17 class IteratesVectorSpace;
18
27 class IteratesVector : public CompoundVector
28 {
29 public:
32 IteratesVector(const IteratesVectorSpace* owner_space, bool create_new);
33
34 virtual ~IteratesVector();
36
43 SmartPtr<IteratesVector> MakeNewIteratesVector(bool create_new = true) const;
44
48 SmartPtr<IteratesVector> MakeNewIteratesVectorCopy() const
49 {
50 SmartPtr<IteratesVector> ret = MakeNewIteratesVector(true);
51 ret->Copy(*this);
52 return ret;
53 }
54
61 SmartPtr<IteratesVector> MakeNewContainer() const;
63
67 SmartPtr<const Vector> x() const
68 {
69 return GetIterateFromComp(0);
70 }
71
75 SmartPtr<Vector> x_NonConst()
76 {
77 return GetNonConstIterateFromComp(0);
78 }
79
81 inline
82 SmartPtr<Vector> create_new_x();
83
86 SmartPtr<Vector> create_new_x_copy()
87 {
88 SmartPtr<const Vector> curr_x = GetComp(0);
89 Set_x_NonConst(*curr_x->MakeNew());
90 x_NonConst()->Copy(*curr_x);
91 return x_NonConst();
92 }
93
96 void Set_x(const Vector& vec)
97 {
98 SetComp(0, vec);
99 }
100
103 void Set_x_NonConst(Vector& vec)
104 {
105 SetCompNonConst(0, vec);
106 }
107
109 SmartPtr<const Vector> s() const
110 {
111 return GetIterateFromComp(1);
112 }
113
117 SmartPtr<Vector> s_NonConst()
118 {
119 return GetNonConstIterateFromComp(1);
120 }
121
123 inline
124 SmartPtr<Vector> create_new_s();
125
128 SmartPtr<Vector> create_new_s_copy()
129 {
130 SmartPtr<const Vector> curr_s = GetComp(1);
131 Set_s_NonConst(*curr_s->MakeNew());
132 s_NonConst()->Copy(*curr_s);
133 return s_NonConst();
134 }
135
138 void Set_s(const Vector& vec)
139 {
140 SetComp(1, vec);
141 }
142
145 void Set_s_NonConst(Vector& vec)
146 {
147 SetCompNonConst(1, vec);
148 }
149
151 SmartPtr<const Vector> y_c() const
152 {
153 return GetIterateFromComp(2);
154 }
155
159 SmartPtr<Vector> y_c_NonConst()
160 {
161 return GetNonConstIterateFromComp(2);
162 }
163
165 inline
166 SmartPtr<Vector> create_new_y_c();
167
170 SmartPtr<Vector> create_new_y_c_copy()
171 {
172 SmartPtr<const Vector> curr_y_c = GetComp(2);
173 Set_y_c_NonConst(*curr_y_c->MakeNew());
174 y_c_NonConst()->Copy(*curr_y_c);
175 return y_c_NonConst();
176 }
177
180 void Set_y_c(const Vector& vec)
181 {
182 SetComp(2, vec);
183 }
184
187 void Set_y_c_NonConst(Vector& vec)
188 {
189 SetCompNonConst(2, vec);
190 }
191
193 SmartPtr<const Vector> y_d() const
194 {
195 return GetIterateFromComp(3);
196 }
197
201 SmartPtr<Vector> y_d_NonConst()
202 {
203 return GetNonConstIterateFromComp(3);
204 }
205
207 inline
208 SmartPtr<Vector> create_new_y_d();
209
212 SmartPtr<Vector> create_new_y_d_copy()
213 {
214 SmartPtr<const Vector> curr_y_d = GetComp(3);
215 Set_y_d_NonConst(*curr_y_d->MakeNew());
216 y_d_NonConst()->Copy(*curr_y_d);
217 return y_d_NonConst();
218 }
219
222 void Set_y_d(const Vector& vec)
223 {
224 SetComp(3, vec);
225 }
226
229 void Set_y_d_NonConst(Vector& vec)
230 {
231 SetCompNonConst(3, vec);
232 }
233
235 SmartPtr<const Vector> z_L() const
236 {
237 return GetIterateFromComp(4);
238 }
239
243 SmartPtr<Vector> z_L_NonConst()
244 {
245 return GetNonConstIterateFromComp(4);
246 }
247
249 inline
250 SmartPtr<Vector> create_new_z_L();
251
254 SmartPtr<Vector> create_new_z_L_copy()
255 {
256 SmartPtr<const Vector> curr_z_L = GetComp(4);
257 Set_z_L_NonConst(*curr_z_L->MakeNew());
258 z_L_NonConst()->Copy(*curr_z_L);
259 return z_L_NonConst();
260 }
261
264 void Set_z_L(const Vector& vec)
265 {
266 SetComp(4, vec);
267 }
268
271 void Set_z_L_NonConst(Vector& vec)
272 {
273 SetCompNonConst(4, vec);
274 }
275
277 SmartPtr<const Vector> z_U() const
278 {
279 return GetIterateFromComp(5);
280 }
281
285 SmartPtr<Vector> z_U_NonConst()
286 {
287 return GetNonConstIterateFromComp(5);
288 }
289
291 inline
292 SmartPtr<Vector> create_new_z_U();
293
296 SmartPtr<Vector> create_new_z_U_copy()
297 {
298 SmartPtr<const Vector> curr_z_U = GetComp(5);
299 Set_z_U_NonConst(*curr_z_U->MakeNew());
300 z_U_NonConst()->Copy(*curr_z_U);
301 return z_U_NonConst();
302 }
303
306 void Set_z_U(const Vector& vec)
307 {
308 SetComp(5, vec);
309 }
310
313 void Set_z_U_NonConst(Vector& vec)
314 {
315 SetCompNonConst(5, vec);
316 }
317
319 SmartPtr<const Vector> v_L() const
320 {
321 return GetIterateFromComp(6);
322 }
323
327 SmartPtr<Vector> v_L_NonConst()
328 {
329 return GetNonConstIterateFromComp(6);
330 }
331
333 inline
334 SmartPtr<Vector> create_new_v_L();
335
338 SmartPtr<Vector> create_new_v_L_copy()
339 {
340 SmartPtr<const Vector> curr_v_L = GetComp(6);
341 Set_v_L_NonConst(*curr_v_L->MakeNew());
342 v_L_NonConst()->Copy(*curr_v_L);
343 return v_L_NonConst();
344 }
345
348 void Set_v_L(const Vector& vec)
349 {
350 SetComp(6, vec);
351 }
352
355 void Set_v_L_NonConst(Vector& vec)
356 {
357 SetCompNonConst(6, vec);
358 }
359
361 SmartPtr<const Vector> v_U() const
362 {
363 return GetIterateFromComp(7);
364 }
365
369 SmartPtr<Vector> v_U_NonConst()
370 {
371 return GetNonConstIterateFromComp(7);
372 }
373
375 inline
376 SmartPtr<Vector> create_new_v_U();
377
380 SmartPtr<Vector> create_new_v_U_copy()
381 {
382 SmartPtr<const Vector> curr_v_U = GetComp(7);
383 Set_v_U_NonConst(*curr_v_U->MakeNew());
384 v_U_NonConst()->Copy(*curr_v_U);
385 return v_U_NonConst();
386 }
387
390 void Set_v_U(const Vector& vec)
391 {
392 SetComp(7, vec);
393 }
394
397 void Set_v_U_NonConst(Vector& vec)
398 {
399 SetCompNonConst(7, vec);
400 }
401
404 void Set_primal(const Vector& x, const Vector& s)
405 {
406 SetComp(0, x);
407 SetComp(1, s);
408 }
409 void Set_primal_NonConst(Vector& x, Vector& s)
410 {
411 SetCompNonConst(0, x);
412 SetCompNonConst(1, s);
413 }
414
417 void Set_eq_mult(const Vector& y_c, const Vector& y_d)
418 {
419 SetComp(2, y_c);
420 SetComp(3, y_d);
421 }
422 void Set_eq_mult_NonConst(Vector& y_c, Vector& y_d)
423 {
424 SetCompNonConst(2, y_c);
425 SetCompNonConst(3, y_d);
426 }
427
430 void Set_bound_mult(const Vector& z_L, const Vector& z_U, const Vector& v_L, const Vector& v_U)
431 {
432 SetComp(4, z_L);
433 SetComp(5, z_U);
434 SetComp(6, v_L);
435 SetComp(7, v_U);
436 }
437 void Set_bound_mult_NonConst(Vector& z_L, Vector& z_U, Vector& v_L, Vector& v_U)
438 {
439 SetCompNonConst(4, z_L);
440 SetCompNonConst(5, z_U);
441 SetCompNonConst(6, v_L);
442 SetCompNonConst(7, v_U);
443 }
444
450 TaggedObject::Tag GetTagSum() const
451 {
452 TaggedObject::Tag tag = 0;
453
454 if (IsValid(x())) {
455 tag += x()->GetTag();
456 }
457 if (IsValid(s())) {
458 tag += s()->GetTag();
459 }
460 if (IsValid(y_c())) {
461 tag += y_c()->GetTag();
462 }
463 if (IsValid(y_d())) {
464 tag += y_d()->GetTag();
465 }
466 if (IsValid(z_L())) {
467 tag += z_L()->GetTag();
468 }
469 if (IsValid(z_U())) {
470 tag += z_U()->GetTag();
471 }
472 if (IsValid(v_L())) {
473 tag += v_L()->GetTag();
474 }
475 if (IsValid(v_U())) {
476 tag += v_U()->GetTag();
477 }
478
479 return tag;
480 }
482
483 private:
492 IteratesVector();
493
495 IteratesVector(const IteratesVector&);
496
498 void operator=(const IteratesVector&);
500
501 const IteratesVectorSpace* owner_space_;
502
507 SmartPtr<const Vector> GetIterateFromComp(Index i) const
508 {
509 if (IsCompNull(i)) {
510 return NULL;
511 }
512 return GetComp(i);
513 }
514
519 SmartPtr<Vector> GetNonConstIterateFromComp(Index i)
520 {
521 if (IsCompNull(i)) {
522 return NULL;
523 }
524 return GetCompNonConst(i);
525 }
526
527 };
528
532 class IteratesVectorSpace : public CompoundVectorSpace
533 {
534 public:
540 IteratesVectorSpace(const VectorSpace& x_space, const VectorSpace& s_space,
541 const VectorSpace& y_c_space, const VectorSpace& y_d_space,
542 const VectorSpace& z_L_space, const VectorSpace& z_U_space,
543 const VectorSpace& v_L_space, const VectorSpace& v_U_space
544 );
545
546 virtual ~IteratesVectorSpace();
548
555 virtual IteratesVector* MakeNewIteratesVector(bool create_new = true) const
556 {
557 return new IteratesVector(this, create_new);
558 }
559
563 const SmartPtr<const IteratesVector> MakeNewIteratesVector(const Vector& x, const Vector& s,
564 const Vector& y_c, const Vector& y_d,
565 const Vector& z_L, const Vector& z_U,
566 const Vector& v_L, const Vector& v_U)
567 {
568 SmartPtr<IteratesVector> newvec = MakeNewIteratesVector(false);
569 newvec->Set_x(x);
570 newvec->Set_s(s);
571 newvec->Set_y_c(y_c);
572 newvec->Set_y_d(y_d);
573 newvec->Set_z_L(z_L);
574 newvec->Set_z_U(z_U);
575 newvec->Set_v_L(v_L);
576 newvec->Set_v_U(v_U);
577 return ConstPtr(newvec);
578 }
579
580
585 virtual CompoundVector* MakeNewCompoundVector(bool create_new = true) const
586 {
587 return MakeNewIteratesVector(create_new);
588 }
589
595 virtual Vector* MakeNew() const
596 {
597 return MakeNewIteratesVector();
598 }
600
605 virtual void SetCompSpace(Index icomp, const VectorSpace& vec_space)
606 {
607 DBG_ASSERT(false && "This is an IteratesVectorSpace - a special compound vector for Ipopt iterates. The contained spaces should not be modified.");
608 }
609
610 private:
618 IteratesVectorSpace();
619
621 IteratesVectorSpace(const IteratesVectorSpace&);
622
624 IteratesVectorSpace& operator=(const IteratesVectorSpace&);
626
628 SmartPtr<const VectorSpace> x_space_;
629 SmartPtr<const VectorSpace> s_space_;
630 SmartPtr<const VectorSpace> y_c_space_;
631 SmartPtr<const VectorSpace> y_d_space_;
632 SmartPtr<const VectorSpace> z_L_space_;
633 SmartPtr<const VectorSpace> z_U_space_;
634 SmartPtr<const VectorSpace> v_L_space_;
635 SmartPtr<const VectorSpace> v_U_space_;
636 };
637
638
639 inline
640 SmartPtr<Vector> IteratesVector::create_new_x()
641 {
642 Set_x_NonConst(*owner_space_->GetCompSpace(0)->MakeNew());
643 return x_NonConst();
644 }
645 inline
646 SmartPtr<Vector> IteratesVector::create_new_s()
647 {
648 Set_s_NonConst(*owner_space_->GetCompSpace(1)->MakeNew());
649 return s_NonConst();
650 }
651 inline
652 SmartPtr<Vector> IteratesVector::create_new_y_c()
653 {
654 Set_y_c_NonConst(*owner_space_->GetCompSpace(2)->MakeNew());
655 return y_c_NonConst();
656 }
657 inline
658 SmartPtr<Vector> IteratesVector::create_new_y_d()
659 {
660 Set_y_d_NonConst(*owner_space_->GetCompSpace(3)->MakeNew());
661 return y_d_NonConst();
662 }
663 inline
664 SmartPtr<Vector> IteratesVector::create_new_z_L()
665 {
666 Set_z_L_NonConst(*owner_space_->GetCompSpace(4)->MakeNew());
667 return z_L_NonConst();
668 }
669 inline
670 SmartPtr<Vector> IteratesVector::create_new_z_U()
671 {
672 Set_z_U_NonConst(*owner_space_->GetCompSpace(5)->MakeNew());
673 return z_U_NonConst();
674 }
675 inline
676 SmartPtr<Vector> IteratesVector::create_new_v_L()
677 {
678 Set_v_L_NonConst(*owner_space_->GetCompSpace(6)->MakeNew());
679 return v_L_NonConst();
680 }
681 inline
682 SmartPtr<Vector> IteratesVector::create_new_v_U()
683 {
684 Set_v_U_NonConst(*owner_space_->GetCompSpace(7)->MakeNew());
685 return v_U_NonConst();
686 }
687 } // namespace Ipopt
688
689 #endif
Ipopt::IteratesVector::create_new_v_U
SmartPtr< Vector > create_new_v_U()
Create a new vector in the v_U entry.
Definition: IpIteratesVector.hpp:682
Ipopt::IteratesVectorSpace::y_d_space_
SmartPtr< const VectorSpace > y_d_space_
Definition: IpIteratesVector.hpp:631
Ipopt::IsValid
bool IsValid(const SmartPtr< U > &smart_ptr)
Definition: IpSmartPtr.hpp:579
Ipopt::IteratesVector::Set_primal_NonConst
void Set_primal_NonConst(Vector &x, Vector &s)
Definition: IpIteratesVector.hpp:409
x
Number * x
Input: Starting point Output: Optimal solution.
Definition: IpStdCInterface.h:238
Ipopt::CompoundVector::SetComp
void SetComp(Index icomp, const Vector &vec)
Method for setting the pointer for a component that is a const Vector.
Ipopt::IteratesVector::Set_bound_mult
void Set_bound_mult(const Vector &z_L, const Vector &z_U, const Vector &v_L, const Vector &v_U)
Set the bound multipliers all in one shot.
Definition: IpIteratesVector.hpp:430
Ipopt::IteratesVector::v_U
SmartPtr< const Vector > v_U() const
Get the v_U iterate (const)
Definition: IpIteratesVector.hpp:361
Ipopt::IteratesVector::owner_space_
const IteratesVectorSpace * owner_space_
Definition: IpIteratesVector.hpp:501
Ipopt::IteratesVector
Specialized CompoundVector class specifically for the algorithm iterates.
Definition: IpIteratesVector.hpp:27
Ipopt::IteratesVector::MakeNewIteratesVectorCopy
SmartPtr< IteratesVector > MakeNewIteratesVectorCopy() const
Use this method to create a new iterates vector with a copy of all the data.
Definition: IpIteratesVector.hpp:48
Ipopt::IteratesVector::create_new_z_L_copy
SmartPtr< Vector > create_new_z_L_copy()
Create a new vector in the z_L entry and copy the current values into it.
Definition: IpIteratesVector.hpp:254
Ipopt::IteratesVector::create_new_y_c_copy
SmartPtr< Vector > create_new_y_c_copy()
Create a new vector in the y_c entry and copy the current values into it.
Definition: IpIteratesVector.hpp:170
Ipopt::IteratesVector::Set_x
void Set_x(const Vector &vec)
Set the x iterate (const).
Definition: IpIteratesVector.hpp:96
Ipopt::IteratesVector::create_new_z_U_copy
SmartPtr< Vector > create_new_z_U_copy()
Create a new vector in the z_U entry and copy the current values into it.
Definition: IpIteratesVector.hpp:296
Ipopt::IteratesVector::create_new_y_d
SmartPtr< Vector > create_new_y_d()
Create a new vector in the y_d entry.
Definition: IpIteratesVector.hpp:658
Ipopt::IteratesVector::Set_z_U_NonConst
void Set_z_U_NonConst(Vector &vec)
Set the z_U iterate (non-const).
Definition: IpIteratesVector.hpp:313
Ipopt::IteratesVectorSpace::operator=
IteratesVectorSpace & operator=(const IteratesVectorSpace &)
Overloaded Equals Operator.
Ipopt::IteratesVector::Set_x_NonConst
void Set_x_NonConst(Vector &vec)
Set the x iterate (non-const).
Definition: IpIteratesVector.hpp:103
Ipopt::IteratesVector::y_d_NonConst
SmartPtr< Vector > y_d_NonConst()
Get the y_d iterate (non-const) - this can only be called if the vector was created intenally...
Definition: IpIteratesVector.hpp:201
Ipopt::CompoundVector::GetCompNonConst
SmartPtr< Vector > GetCompNonConst(Index i)
Return a particular component (non-const version).
Definition: IpCompoundVector.hpp:96
Ipopt::IteratesVector::Set_y_d
void Set_y_d(const Vector &vec)
Set the y_d iterate (const).
Definition: IpIteratesVector.hpp:222
Ipopt::Vector
Vector Base Class.
Definition: IpVector.hpp:47
Ipopt::IteratesVector::create_new_x_copy
SmartPtr< Vector > create_new_x_copy()
Create a new vector in the x entry and copy the current values into it.
Definition: IpIteratesVector.hpp:86
Ipopt::IteratesVectorSpace::y_c_space_
SmartPtr< const VectorSpace > y_c_space_
Definition: IpIteratesVector.hpp:630
Ipopt::IteratesVector::create_new_s_copy
SmartPtr< Vector > create_new_s_copy()
Create a new vector in the s entry and copy the current values into it.
Definition: IpIteratesVector.hpp:128
Ipopt::IteratesVector::z_L
SmartPtr< const Vector > z_L() const
Get the z_L iterate (const)
Definition: IpIteratesVector.hpp:235
Ipopt::IteratesVector::GetIterateFromComp
SmartPtr< const Vector > GetIterateFromComp(Index i) const
private method to return the const element from the compound vector.
Definition: IpIteratesVector.hpp:507
Ipopt::IteratesVector::s_NonConst
SmartPtr< Vector > s_NonConst()
Get the s iterate (non-const) - this can only be called if the vector was created intenally...
Definition: IpIteratesVector.hpp:117
Ipopt::IteratesVector::Set_y_c_NonConst
void Set_y_c_NonConst(Vector &vec)
Set the y_c iterate (non-const).
Definition: IpIteratesVector.hpp:187
Ipopt::IteratesVector::y_d
SmartPtr< const Vector > y_d() const
Get the y_d iterate (const)
Definition: IpIteratesVector.hpp:193
Ipopt::IteratesVectorSpace::SetCompSpace
virtual void SetCompSpace(Index icomp, const VectorSpace &vec_space)
This method hides the CompoundVectorSpace::SetCompSpace method since the components of the Iterates a...
Definition: IpIteratesVector.hpp:605
Ipopt::IteratesVectorSpace::x_space_
SmartPtr< const VectorSpace > x_space_
Contained Spaces.
Definition: IpIteratesVector.hpp:628
Ipopt::IteratesVector::Set_primal
void Set_primal(const Vector &x, const Vector &s)
Set the primal variables all in one shot.
Definition: IpIteratesVector.hpp:404
Ipopt::IteratesVector::create_new_v_U_copy
SmartPtr< Vector > create_new_v_U_copy()
Create a new vector in the v_U entry and copy the current values into it.
Definition: IpIteratesVector.hpp:380
Ipopt::IteratesVector::Set_v_U_NonConst
void Set_v_U_NonConst(Vector &vec)
Set the v_U iterate (non-const).
Definition: IpIteratesVector.hpp:397
Ipopt::SmartPtr
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
Ipopt::IteratesVectorSpace::IteratesVectorSpace
IteratesVectorSpace()
Default constructor.
Ipopt::IteratesVectorSpace::v_U_space_
SmartPtr< const VectorSpace > v_U_space_
Definition: IpIteratesVector.hpp:635
Ipopt::IteratesVector::create_new_y_d_copy
SmartPtr< Vector > create_new_y_d_copy()
Create a new vector in the y_d entry and copy the current values into it.
Definition: IpIteratesVector.hpp:212
Ipopt::VectorSpace
VectorSpace base class, corresponding to the Vector base class.
Definition: IpVector.hpp:390
Ipopt::IteratesVector::v_U_NonConst
SmartPtr< Vector > v_U_NonConst()
Get the v_U iterate (non-const) - this can only be called if the vector was created intenally...
Definition: IpIteratesVector.hpp:369
Ipopt::IteratesVectorSpace::s_space_
SmartPtr< const VectorSpace > s_space_
Definition: IpIteratesVector.hpp:629
Ipopt::IteratesVectorSpace::~IteratesVectorSpace
virtual ~IteratesVectorSpace()
Ipopt::IteratesVector::v_L
SmartPtr< const Vector > v_L() const
Get the v_L iterate (const)
Definition: IpIteratesVector.hpp:319
Ipopt::IteratesVectorSpace::v_L_space_
SmartPtr< const VectorSpace > v_L_space_
Definition: IpIteratesVector.hpp:634
Ipopt::IteratesVector::x_NonConst
SmartPtr< Vector > x_NonConst()
Get the x iterate (non-const) - this can only be called if the vector was created intenally...
Definition: IpIteratesVector.hpp:75
Ipopt::IteratesVectorSpace::MakeNewIteratesVector
virtual IteratesVector * MakeNewIteratesVector(bool create_new=true) const
Method for creating vectors .
Definition: IpIteratesVector.hpp:555
Ipopt::IteratesVector::Set_v_U
void Set_v_U(const Vector &vec)
Set the v_U iterate (const).
Definition: IpIteratesVector.hpp:390
Ipopt::IteratesVector::Set_z_U
void Set_z_U(const Vector &vec)
Set the z_U iterate (const).
Definition: IpIteratesVector.hpp:306
IpCompoundVector.hpp
Ipopt::IteratesVector::GetTagSum
TaggedObject::Tag GetTagSum() const
Get a sum of the tags of the contained items.
Definition: IpIteratesVector.hpp:450
Ipopt::IteratesVector::create_new_s
SmartPtr< Vector > create_new_s()
Create a new vector in the s entry.
Definition: IpIteratesVector.hpp:646
Ipopt::IteratesVectorSpace::z_L_space_
SmartPtr< const VectorSpace > z_L_space_
Definition: IpIteratesVector.hpp:632
Ipopt::CompoundVectorSpace::GetCompSpace
SmartPtr< const VectorSpace > GetCompSpace(Index icomp) const
Method for obtaining an individual component VectorSpace.
Ipopt::IteratesVectorSpace::MakeNewCompoundVector
virtual CompoundVector * MakeNewCompoundVector(bool create_new=true) const
This method overloads ComooundVectorSpace::MakeNewCompoundVector to make sure that we get a vector of...
Definition: IpIteratesVector.hpp:585
Ipopt::IteratesVector::Set_s
void Set_s(const Vector &vec)
Set the s iterate (const).
Definition: IpIteratesVector.hpp:138
Ipopt::IteratesVector::Set_y_c
void Set_y_c(const Vector &vec)
Set the y_c iterate (const).
Definition: IpIteratesVector.hpp:180
Ipopt::Index
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:19
Ipopt::IteratesVector::GetNonConstIterateFromComp
SmartPtr< Vector > GetNonConstIterateFromComp(Index i)
private method to return the non-const element from the compound vector.
Definition: IpIteratesVector.hpp:519
Ipopt::CompoundVector::SetCompNonConst
void SetCompNonConst(Index icomp, Vector &vec)
Method for setting the pointer for a component that is a non-const Vector.
DBG_ASSERT
#define DBG_ASSERT(test)
Definition: IpDebug.hpp:38
Ipopt::IteratesVector::y_c
SmartPtr< const Vector > y_c() const
Get the y_c iterate (const)
Definition: IpIteratesVector.hpp:151
Ipopt::IteratesVector::y_c_NonConst
SmartPtr< Vector > y_c_NonConst()
Get the y_c iterate (non-const) - this can only be called if the vector was created intenally...
Definition: IpIteratesVector.hpp:159
Ipopt::TaggedObject::Tag
unsigned int Tag
Type for the Tag values.
Definition: IpTaggedObject.hpp:80
Ipopt::IteratesVectorSpace::MakeNewIteratesVector
const SmartPtr< const IteratesVector > MakeNewIteratesVector(const Vector &x, const Vector &s, const Vector &y_c, const Vector &y_d, const Vector &z_L, const Vector &z_U, const Vector &v_L, const Vector &v_U)
Use this method to create a new const IteratesVector.
Definition: IpIteratesVector.hpp:563
Ipopt::ConstPtr
SmartPtr< const U > ConstPtr(const SmartPtr< U > &smart_ptr)
Definition: IpSmartPtr.hpp:572
Ipopt::IteratesVector::Set_z_L
void Set_z_L(const Vector &vec)
Set the z_L iterate (const).
Definition: IpIteratesVector.hpp:264
Ipopt::IteratesVector::Set_z_L_NonConst
void Set_z_L_NonConst(Vector &vec)
Set the z_L iterate (non-const).
Definition: IpIteratesVector.hpp:271
Ipopt::IteratesVector::Set_y_d_NonConst
void Set_y_d_NonConst(Vector &vec)
Set the y_d iterate (non-const).
Definition: IpIteratesVector.hpp:229
Ipopt::IteratesVector::Set_s_NonConst
void Set_s_NonConst(Vector &vec)
Set the s iterate (non-const).
Definition: IpIteratesVector.hpp:145
Ipopt::CompoundVector::GetComp
SmartPtr< const Vector > GetComp(Index i) const
Return a particular component (const version)
Definition: IpCompoundVector.hpp:86
Ipopt::IteratesVector::z_U
SmartPtr< const Vector > z_U() const
Get the z_U iterate (const)
Definition: IpIteratesVector.hpp:277
Ipopt::IteratesVector::MakeNewIteratesVector
SmartPtr< IteratesVector > MakeNewIteratesVector(bool create_new=true) const
Make New methods.
Ipopt::IteratesVector::create_new_y_c
SmartPtr< Vector > create_new_y_c()
Create a new vector in the y_c entry.
Definition: IpIteratesVector.hpp:652
Ipopt::IteratesVectorSpace
Vector Space for the IteratesVector class.
Definition: IpIteratesVector.hpp:532
Ipopt::CompoundVector::IsCompNull
bool IsCompNull(Index i) const
Check if a particular component is null or not.
Definition: IpCompoundVector.hpp:76
Ipopt::IteratesVector::v_L_NonConst
SmartPtr< Vector > v_L_NonConst()
Get the v_L iterate (non-const) - this can only be called if the vector was created intenally...
Definition: IpIteratesVector.hpp:327
Ipopt::CompoundVectorSpace
This vectors space is the vector space for CompoundVector.
Definition: IpCompoundVector.hpp:239
Ipopt::IteratesVector::create_new_z_U
SmartPtr< Vector > create_new_z_U()
Create a new vector in the z_U entry.
Definition: IpIteratesVector.hpp:670
Ipopt::IteratesVector::~IteratesVector
virtual ~IteratesVector()
Ipopt::IteratesVectorSpace::MakeNew
virtual Vector * MakeNew() const
This method creates a new vector (and allocates space in all the contained vectors.
Definition: IpIteratesVector.hpp:595
Ipopt::IteratesVector::Set_v_L
void Set_v_L(const Vector &vec)
Set the v_L iterate (const).
Definition: IpIteratesVector.hpp:348
Ipopt::IteratesVector::s
SmartPtr< const Vector > s() const
Get the s iterate (const)
Definition: IpIteratesVector.hpp:109
Ipopt::IteratesVector::Set_eq_mult_NonConst
void Set_eq_mult_NonConst(Vector &y_c, Vector &y_d)
Definition: IpIteratesVector.hpp:422
Ipopt::IteratesVector::Set_v_L_NonConst
void Set_v_L_NonConst(Vector &vec)
Set the v_L iterate (non-const).
Definition: IpIteratesVector.hpp:355
Ipopt::IteratesVector::MakeNewContainer
SmartPtr< IteratesVector > MakeNewContainer() const
Use this method to create a new iterates vector container.
Ipopt::IteratesVector::x
SmartPtr< const Vector > x() const
Iterates Set/Get Methods.
Definition: IpIteratesVector.hpp:67
Ipopt::IteratesVector::z_L_NonConst
SmartPtr< Vector > z_L_NonConst()
Get the z_L iterate (non-const) - this can only be called if the vector was created intenally...
Definition: IpIteratesVector.hpp:243
Ipopt::IteratesVector::IteratesVector
IteratesVector()
Default Constructor.
Ipopt::IteratesVectorSpace::z_U_space_
SmartPtr< const VectorSpace > z_U_space_
Definition: IpIteratesVector.hpp:633
Ipopt::IteratesVector::create_new_v_L_copy
SmartPtr< Vector > create_new_v_L_copy()
Create a new vector in the v_L entry and copy the current values into it.
Definition: IpIteratesVector.hpp:338
Ipopt::IteratesVector::create_new_x
SmartPtr< Vector > create_new_x()
Create a new vector in the x entry.
Definition: IpIteratesVector.hpp:640
Ipopt::IteratesVector::Set_eq_mult
void Set_eq_mult(const Vector &y_c, const Vector &y_d)
Set the eq multipliers all in one shot.
Definition: IpIteratesVector.hpp:417
Ipopt::CompoundVector
Class of Vectors consisting of other vectors.
Definition: IpCompoundVector.hpp:30
Ipopt::IteratesVector::Set_bound_mult_NonConst
void Set_bound_mult_NonConst(Vector &z_L, Vector &z_U, Vector &v_L, Vector &v_U)
Definition: IpIteratesVector.hpp:437
Ipopt::IteratesVector::z_U_NonConst
SmartPtr< Vector > z_U_NonConst()
Get the z_U iterate (non-const) - this can only be called if the vector was created intenally...
Definition: IpIteratesVector.hpp:285
Ipopt::IteratesVector::operator=
void operator=(const IteratesVector &)
Overloaded Equals Operator.
Ipopt::IteratesVector::create_new_z_L
SmartPtr< Vector > create_new_z_L()
Create a new vector in the z_L entry.
Definition: IpIteratesVector.hpp:664
Ipopt::IteratesVector::create_new_v_L
SmartPtr< Vector > create_new_v_L()
Create a new vector in the v_L entry.
Definition: IpIteratesVector.hpp:676