objective function with scaling based on Scaler class and analytical derivatives computed with FADOO More...

#include <ObjectiveNleAd.h>

Inheritance diagram for ObjectiveNleAd:

Public Member Functions

 ObjectiveNleAd (std::string t)
 constructor More...
 
double xmin (unsigned int i)
 return the lower bound on unknown i More...
 
double xmax (unsigned int i)
 return the upper bound on unknown i More...
 
unsigned int size (void) const override
 returns the current size of the problem More...
 
void scalex (double *x) override
 transforms the vector of "real" variables x by applying the scaling More...
 
void unscalex (double *x) override
 transforms back the vector of scaled variables x by applying the unscaling More...
 
void operator() (double *, double *, Jacobian *J) override
 implements the () operator by calling calculateResiduals; derived class may override it More...
 
void addUnknown (Value *x, Scaler scaler, const std::string &tag)
 
void changeUnknown (unsigned int i, Value *x, Scaler scaler, const std::string &tag)
 change the i-th unknown More...
 
void addObjectiveFunction (ObjectiveNleAd &of)
 append the remote objective function More...
 
- Public Member Functions inherited from ObjectiveNleAuto
 ObjectiveNleAuto (std::string t)
 constructor More...
 
virtual unsigned int size (void) const
 returns the current size of the problem More...
 
bool init (double *x)
 
void setValue (unsigned int i, double x)
 copies the value for the i-th unknown from x in the Value pointed to, without altering the derivatives More...
 
void copyresults (double *x)
 copies the unknown values from the x vector into the Values pointed to More...
 
void inactivate (void)
 inactivates all unknowns More...
 
void clearderivatives (void)
 clears the derivative information for all unknowns without setting to inactive More...
 
void setActive (unsigned int i)
 activates the i-th unknown More...
 
void scalex (double *) override
 transforms the vector of "real" variables x by applying the scaling More...
 
void unscalex (double *x) override
 transforms back the vector of scaled variables x by applying the unscaling More...
 
void operator() (double *, double *, Jacobian *J) override
 implements the () operator by calling calculateResiduals; derived class may override it More...
 
void setx (unsigned int i, Value &x)
 sets the i-th unknown to x More...
 
const Valueunknown (unsigned int i) const
 returns a reference to the i-th unknown More...
 
const std::string & unknownTag (unsigned int i) const
 returns a reference to the tag of the i-th unknown More...
 
double xmin (unsigned int i)
 return the lower bound on unknown i More...
 
double xmax (unsigned int i)
 return the upper bound on unknown i More...
 
void print (void) const
 lists unknowns More...
 
const std::string & tagof (void) const
 returns the tag of the instance More...
 
void settagof (std::string t)
 sets the tag of the instance More...
 
void appendtagof (const std::string &t)
 appends to the tag of the instance More...
 
int zero_residuals (std::vector< Value > &y, uint32_t offset)
 
virtual int calculateResiduals (std::vector< Value > &y, uint32_t offset)=0
 
void addUnknown (Value *x, const std::string &tag)
 
void changeUnknown (unsigned int i, Value *x, const std::string &tag)
 change the i-th unknown More...
 
- Public Member Functions inherited from ObjectiveNleInterface
 ObjectiveNleInterface (void)
 
virtual void operator() (double *x, double *y, Jacobian *J)=0
 computes the objective function vector y at the point x and optionally the Jacobian J More...
 
virtual void scalex (double *x)=0
 transforms the vector of "real" variables x by applying the scaling More...
 
virtual void unscalex (double *x)=0
 transforms back the vector of scaled variables x by applying the unscaling More...
 
- Public Member Functions inherited from Diagnostic
 Diagnostic (void)
 
void setVerbosity (int verbosity)
 sets the verbosity level for this instance More...
 
int verbosity (void) const
 

Protected Member Functions

void prepare_ (double *x, Jacobian *J) override
 uscales x (unknowns) values from calling function and puts them in x_ Quantities More...
 
void packResults_ (double *x, double *y, Jacobian *J)
 
 ~ObjectiveNleAd ()
 
- Protected Member Functions inherited from ObjectiveNleAuto
 ~ObjectiveNleAuto ()
 
- Protected Member Functions inherited from ObjectiveNleInterface
 ~ObjectiveNleInterface ()
 
- Protected Member Functions inherited from Diagnostic
virtual ~Diagnostic ()=default
 

Protected Attributes

std::vector< Scalerscaler_
 provide scaling and unscaling More...
 
- Protected Attributes inherited from ObjectiveNleAuto
std::vector< Valueresiduals
 Residuals. More...
 
- Protected Attributes inherited from Diagnostic
int verbosityInstance
 

Friends

class SolverNleInterface
 

Additional Inherited Members

- Public Attributes inherited from ObjectiveNleInterface
int verbosityLocal
 

Detailed Description

objective function with scaling based on Scaler class and analytical derivatives computed with FADOO

#include <libpf/core/ObjectiveNleAd.h>

Remarks
Warning
Thread safe:
Extendable:
Platform dependencies:

Constructor & Destructor Documentation

◆ ~ObjectiveNleAd()

ObjectiveNleAd::~ObjectiveNleAd ( )
inlineprotected

◆ ObjectiveNleAd()

ObjectiveNleAd::ObjectiveNleAd ( std::string  t)

constructor

Member Function Documentation

◆ addObjectiveFunction()

void ObjectiveNleAd::addObjectiveFunction ( ObjectiveNleAd of)

append the remote objective function

◆ addUnknown()

void ObjectiveNleAd::addUnknown ( Value x,
Scaler  scaler,
const std::string &  tag 
)

append unknown x with scaler and tag to the list of unknowns

Returns
the index of the new unknown

◆ changeUnknown()

void ObjectiveNleAd::changeUnknown ( unsigned int  i,
Value x,
Scaler  scaler,
const std::string &  tag 
)

change the i-th unknown

◆ operator()()

void ObjectiveNleAd::operator() ( double *  ,
double *  ,
Jacobian J 
)
overridevirtual

implements the () operator by calling calculateResiduals; derived class may override it

Implements ObjectiveNleInterface.

Reimplemented in ObjectiveNleAdVertex.

◆ packResults_()

void ObjectiveNleAd::packResults_ ( double *  x,
double *  y,
Jacobian J 
)
protected

extracts data from the y_ Quantities and puts them into y if required, extracts analytical derivatives from the y_[] Quantities and puts them into J

◆ prepare_()

void ObjectiveNleAd::prepare_ ( double *  x,
Jacobian J 
)
overrideprotectedvirtual

uscales x (unknowns) values from calling function and puts them in x_ Quantities

Reimplemented from ObjectiveNleAuto.

◆ scalex()

void ObjectiveNleAd::scalex ( double *  x)
overridevirtual

transforms the vector of "real" variables x by applying the scaling

Implements ObjectiveNleInterface.

◆ size()

unsigned int ObjectiveNleAd::size ( void  ) const
overridevirtual

returns the current size of the problem

Reimplemented from ObjectiveNleAuto.

◆ unscalex()

void ObjectiveNleAd::unscalex ( double *  x)
overridevirtual

transforms back the vector of scaled variables x by applying the unscaling

Implements ObjectiveNleInterface.

Reimplemented in ObjectiveNleAdVertex.

◆ xmax()

double ObjectiveNleAd::xmax ( unsigned int  i)

return the upper bound on unknown i

◆ xmin()

double ObjectiveNleAd::xmin ( unsigned int  i)

return the lower bound on unknown i

Friends And Related Function Documentation

◆ SolverNleInterface

friend class SolverNleInterface
friend

Member Data Documentation

◆ scaler_

std::vector<Scaler> ObjectiveNleAd::scaler_
protected

provide scaling and unscaling


The documentation for this class was generated from the following file: