9 #ifndef __IPITERATESVECTOR_HPP__
10 #define __IPITERATESVECTOR_HPP__
17 class IteratesVectorSpace;
455 tag +=
x()->GetTag();
458 tag +=
s()->GetTag();
461 tag +=
y_c()->GetTag();
464 tag +=
y_d()->GetTag();
467 tag +=
z_L()->GetTag();
470 tag +=
z_U()->GetTag();
473 tag +=
v_L()->GetTag();
476 tag +=
v_U()->GetTag();
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);
607 DBG_ASSERT(
false &&
"This is an IteratesVectorSpace - a special compound vector for Ipopt iterates. The contained spaces should not be modified.");
SmartPtr< Vector > create_new_v_U()
Create a new vector in the v_U entry.
SmartPtr< const VectorSpace > y_d_space_
bool IsValid(const SmartPtr< U > &smart_ptr)
void Set_primal_NonConst(Vector &x, Vector &s)
Number * x
Input: Starting point Output: Optimal solution.
void SetComp(Index icomp, const Vector &vec)
Method for setting the pointer for a component that is a const Vector.
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.
SmartPtr< const Vector > v_U() const
Get the v_U iterate (const)
const IteratesVectorSpace * owner_space_
Specialized CompoundVector class specifically for the algorithm iterates.
SmartPtr< IteratesVector > MakeNewIteratesVectorCopy() const
Use this method to create a new iterates vector with a copy of all the data.
SmartPtr< Vector > create_new_z_L_copy()
Create a new vector in the z_L entry and copy the current values into it.
SmartPtr< Vector > create_new_y_c_copy()
Create a new vector in the y_c entry and copy the current values into it.
void Set_x(const Vector &vec)
Set the x iterate (const).
SmartPtr< Vector > create_new_z_U_copy()
Create a new vector in the z_U entry and copy the current values into it.
SmartPtr< Vector > create_new_y_d()
Create a new vector in the y_d entry.
void Set_z_U_NonConst(Vector &vec)
Set the z_U iterate (non-const).
IteratesVectorSpace & operator=(const IteratesVectorSpace &)
Overloaded Equals Operator.
void Set_x_NonConst(Vector &vec)
Set the x iterate (non-const).
SmartPtr< Vector > y_d_NonConst()
Get the y_d iterate (non-const) - this can only be called if the vector was created intenally...
SmartPtr< Vector > GetCompNonConst(Index i)
Return a particular component (non-const version).
void Set_y_d(const Vector &vec)
Set the y_d iterate (const).
SmartPtr< Vector > create_new_x_copy()
Create a new vector in the x entry and copy the current values into it.
SmartPtr< const VectorSpace > y_c_space_
SmartPtr< Vector > create_new_s_copy()
Create a new vector in the s entry and copy the current values into it.
SmartPtr< const Vector > z_L() const
Get the z_L iterate (const)
SmartPtr< const Vector > GetIterateFromComp(Index i) const
private method to return the const element from the compound vector.
SmartPtr< Vector > s_NonConst()
Get the s iterate (non-const) - this can only be called if the vector was created intenally...
void Set_y_c_NonConst(Vector &vec)
Set the y_c iterate (non-const).
SmartPtr< const Vector > y_d() const
Get the y_d iterate (const)
virtual void SetCompSpace(Index icomp, const VectorSpace &vec_space)
This method hides the CompoundVectorSpace::SetCompSpace method since the components of the Iterates a...
SmartPtr< const VectorSpace > x_space_
Contained Spaces.
void Set_primal(const Vector &x, const Vector &s)
Set the primal variables all in one shot.
SmartPtr< Vector > create_new_v_U_copy()
Create a new vector in the v_U entry and copy the current values into it.
void Set_v_U_NonConst(Vector &vec)
Set the v_U iterate (non-const).
Template class for Smart Pointers.
IteratesVectorSpace()
Default constructor.
SmartPtr< const VectorSpace > v_U_space_
SmartPtr< Vector > create_new_y_d_copy()
Create a new vector in the y_d entry and copy the current values into it.
VectorSpace base class, corresponding to the Vector base class.
SmartPtr< Vector > v_U_NonConst()
Get the v_U iterate (non-const) - this can only be called if the vector was created intenally...
SmartPtr< const VectorSpace > s_space_
virtual ~IteratesVectorSpace()
SmartPtr< const Vector > v_L() const
Get the v_L iterate (const)
SmartPtr< const VectorSpace > v_L_space_
SmartPtr< Vector > x_NonConst()
Get the x iterate (non-const) - this can only be called if the vector was created intenally...
virtual IteratesVector * MakeNewIteratesVector(bool create_new=true) const
Method for creating vectors .
void Set_v_U(const Vector &vec)
Set the v_U iterate (const).
void Set_z_U(const Vector &vec)
Set the z_U iterate (const).
TaggedObject::Tag GetTagSum() const
Get a sum of the tags of the contained items.
SmartPtr< Vector > create_new_s()
Create a new vector in the s entry.
SmartPtr< const VectorSpace > z_L_space_
SmartPtr< const VectorSpace > GetCompSpace(Index icomp) const
Method for obtaining an individual component VectorSpace.
virtual CompoundVector * MakeNewCompoundVector(bool create_new=true) const
This method overloads ComooundVectorSpace::MakeNewCompoundVector to make sure that we get a vector of...
void Set_s(const Vector &vec)
Set the s iterate (const).
void Set_y_c(const Vector &vec)
Set the y_c iterate (const).
int Index
Type of all indices of vectors, matrices etc.
SmartPtr< Vector > GetNonConstIterateFromComp(Index i)
private method to return the non-const element from the compound vector.
void SetCompNonConst(Index icomp, Vector &vec)
Method for setting the pointer for a component that is a non-const Vector.
SmartPtr< const Vector > y_c() const
Get the y_c iterate (const)
SmartPtr< Vector > y_c_NonConst()
Get the y_c iterate (non-const) - this can only be called if the vector was created intenally...
unsigned int Tag
Type for the Tag values.
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.
SmartPtr< const U > ConstPtr(const SmartPtr< U > &smart_ptr)
void Set_z_L(const Vector &vec)
Set the z_L iterate (const).
void Set_z_L_NonConst(Vector &vec)
Set the z_L iterate (non-const).
void Set_y_d_NonConst(Vector &vec)
Set the y_d iterate (non-const).
void Set_s_NonConst(Vector &vec)
Set the s iterate (non-const).
SmartPtr< const Vector > GetComp(Index i) const
Return a particular component (const version)
SmartPtr< const Vector > z_U() const
Get the z_U iterate (const)
SmartPtr< IteratesVector > MakeNewIteratesVector(bool create_new=true) const
Make New methods.
SmartPtr< Vector > create_new_y_c()
Create a new vector in the y_c entry.
Vector Space for the IteratesVector class.
bool IsCompNull(Index i) const
Check if a particular component is null or not.
SmartPtr< Vector > v_L_NonConst()
Get the v_L iterate (non-const) - this can only be called if the vector was created intenally...
This vectors space is the vector space for CompoundVector.
SmartPtr< Vector > create_new_z_U()
Create a new vector in the z_U entry.
virtual ~IteratesVector()
virtual Vector * MakeNew() const
This method creates a new vector (and allocates space in all the contained vectors.
void Set_v_L(const Vector &vec)
Set the v_L iterate (const).
SmartPtr< const Vector > s() const
Get the s iterate (const)
void Set_eq_mult_NonConst(Vector &y_c, Vector &y_d)
void Set_v_L_NonConst(Vector &vec)
Set the v_L iterate (non-const).
SmartPtr< IteratesVector > MakeNewContainer() const
Use this method to create a new iterates vector container.
SmartPtr< const Vector > x() const
Iterates Set/Get Methods.
SmartPtr< Vector > z_L_NonConst()
Get the z_L iterate (non-const) - this can only be called if the vector was created intenally...
IteratesVector()
Default Constructor.
SmartPtr< const VectorSpace > z_U_space_
SmartPtr< Vector > create_new_v_L_copy()
Create a new vector in the v_L entry and copy the current values into it.
SmartPtr< Vector > create_new_x()
Create a new vector in the x entry.
void Set_eq_mult(const Vector &y_c, const Vector &y_d)
Set the eq multipliers all in one shot.
Class of Vectors consisting of other vectors.
void Set_bound_mult_NonConst(Vector &z_L, Vector &z_U, Vector &v_L, Vector &v_U)
SmartPtr< Vector > z_U_NonConst()
Get the z_U iterate (non-const) - this can only be called if the vector was created intenally...
void operator=(const IteratesVector &)
Overloaded Equals Operator.
SmartPtr< Vector > create_new_z_L()
Create a new vector in the z_L entry.
SmartPtr< Vector > create_new_v_L()
Create a new vector in the v_L entry.