MOOCHO (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
MoochoPack::NLPAlgo Class Reference

rSQP Algorithm control class. More...

#include <MoochoPack_NLPAlgo.hpp>

Inheritance diagram for MoochoPack::NLPAlgo:
Inheritance graph
[legend]

Public Member Functions

 NLPAlgo ()
 Constructs with no step, added_step, pre_step, post_step, state, or decomp_sys objects added. More...
 
NLPAlgoStatersqp_state ()
 <<std aggr>="">> members for algo_cntr More...
 
const NLPAlgoStatersqp_state () const
 
void do_step_first (Algorithm::poss_type first_step_poss)
 
void print_algorithm (std::ostream &out) const
 overridden from Algorihth. More...
 
- Public Member Functions inherited from MoochoPack::NLPAlgoInterface
virtual ~NLPAlgoInterface ()
 
- Public Member Functions inherited from IterationPack::Algorithm
 STANDARD_MEMBER_COMPOSITION_MEMBERS (std::string, interrupt_file_name)
 Name of an file that will cause the algorithm to terminate. More...
 
 Algorithm ()
 Constructs an algorithm with no steps and a default of max_iter() == 100. More...
 
virtual ~Algorithm ()
 
void set_state (const state_ptr_t &state)
 
state_ptr_tget_state ()
 
const state_ptr_tget_state () const
 
AlgorithmStatestate ()
 
const AlgorithmStatestate () const
 
void set_track (const track_ptr_t &track)
 
track_ptr_tget_track ()
 
const track_ptr_tget_track () const
 
AlgorithmTrackertrack ()
 
const AlgorithmTrackertrack () const
 
virtual void max_iter (size_t max_iter)
 
virtual size_t max_iter () const
 
virtual void max_run_time (double max_iter)
 Set the maximum runtime (in minues) The runtime is checked at the end of each iteration and if it exceeds this value then the algorithm is terminated. More...
 
virtual double max_run_time () const
 
virtual int num_steps () const
 Return the number of main steps. More...
 
virtual poss_type get_step_poss (const std::string &step_name) const
 Return the possition in the major loop of a named step. More...
 
virtual const std::string & get_step_name (poss_type step_poss) const
 Return the name of a step given its possition. More...
 
virtual step_ptr_tget_step (poss_type step_poss)
 Return the RCP<...> object for the step object at step_poss. More...
 
virtual const step_ptr_tget_step (poss_type step_poss) const
 
virtual int num_assoc_steps (poss_type step_poss, EAssocStepType type) const
 Return the number of pre or post steps for the main step step_poss. More...
 
virtual poss_type get_assoc_step_poss (poss_type step_poss, EAssocStepType type, const std::string &assoc_step_name) const
 Return the possition of the pre or post step for the main step_poss. More...
 
virtual const std::string & get_assoc_step_name (poss_type step_poss, EAssocStepType type, poss_type assoc_step_poss) const
 Return the name of the pre or post step at step_poss and at assoc_step_poss. More...
 
virtual step_ptr_tget_assoc_step (poss_type step_poss, EAssocStepType type, poss_type assoc_step_poss)
 Return the RCP<...> object for the associated step object at step_poss and assoc_step_poss. More...
 
virtual const step_ptr_tget_assoc_step (poss_type step_poss, EAssocStepType type, poss_type assoc_step_poss) const
 
virtual void insert_step (poss_type step_poss, const std::string &step_name, const step_ptr_t &step)
 Insert a step object with the name step_name into the possition step_poss. More...
 
virtual void change_step_name (poss_type step_poss, const std::string &new_name)
 Change the name of an existing step. More...
 
virtual void replace_step (poss_type step_poss, const step_ptr_t &step)
 Replace the step object of an existing step. More...
 
virtual void remove_step (poss_type step_poss)
 Remove an existing step object and all of its pre and post steps. More...
 
virtual void insert_assoc_step (poss_type step_poss, EAssocStepType type, poss_type assoc_step_poss, const std::string &assoc_step_name, const step_ptr_t &assoc_step)
 Insert an pre or post step into for the main step step_poss into the possition assoc_step_poss. More...
 
virtual void remove_assoc_step (poss_type step_poss, EAssocStepType type, poss_type assoc_step_poss)
 Remove an pre or post step for the main step step_poss in the possition assoc_step_poss. More...
 
ERunningState running_state () const
 Return the current running state of this algorithm object. More...
 
virtual void begin_config_update ()
 Changes from running_state() == RUNNING to running_state() == RUNNING_BEING_CONFIGURED. More...
 
virtual void end_config_update ()
 Changes from running_state() == RUNNING_BEING_CONFIGURED to running_state() == RUNNING. More...
 
virtual void do_step_next (const std::string &step_name)
 Called by step objects to set the step (given its name) that this will envoke the next time this calls a step. More...
 
virtual void do_step_next (poss_type step_poss)
 Called by step objects to set the step (given its possition) that this will envoke the next time this calls a step. More...
 
virtual const std::string & what_is_next_step_name () const
 Returns the name of the next step this will call the next time it calls a step. More...
 
virtual poss_type what_is_next_step_poss () const
 Returns the possition of the next step this will call the next time it calls a step. More...
 
virtual bool do_step (const std::string &step_name)
 Calls do_step() on all of the pre step objects the step object and the post step objects in order for the step named step_name. More...
 
virtual bool do_step (poss_type step_poss)
 Call do_step() on all of the pre step objects the step object and the post step objects in order for the step in the possition step_poss. More...
 
virtual void terminate (bool success)
 Called by step objects to terminate the algorithm. More...
 
virtual EAlgoReturn do_algorithm (poss_type step_poss=1)
 Called by clients to begin an algorithm. More...
 
virtual void print_steps (std::ostream &out) const
 Print out just a listing of the steps, their positions in the algorithm and the subclasses. More...
 
virtual void set_algo_timing (bool algo_timing)
 Causes algorithm to be timed. More...
 
virtual bool algo_timing () const
 
virtual void print_algorithm_times (std::ostream &out) const
 Outputs table of times for each step, cummulative times and other statistics. More...
 
void get_step_times_k (int offset, double step_times[]) const
 Returns the step_times for iteration offset. More...
 
void get_final_step_stats (size_t step, double *total, double *average, double *min, double *max, double *percent) const
 Returns the final statistics for a given step Do not call when algorithm is running. More...
 

Protected Attributes

Algorithm::poss_type first_step_poss_
 

Overridden form rSQPAlgoInteface

const NLPAlgoStateretrieve_state () const
 
NLPSolverClientInterface::EFindMinReturn dispatch ()
 This is the main control function for the rSQP algorithm. More...
 
void interface_print_algorithm (std::ostream &out) const
 
void interface_set_algo_timing (bool algo_timing)
 
bool interface_algo_timing () const
 
void interface_print_algorithm_times (std::ostream &out) const
 

Additional Inherited Members

- Public Types inherited from IterationPack::Algorithm
enum  { DOES_NOT_EXIST = 1000 }
 
enum  ERunningState { NOT_RUNNING = 0, RUNNING = 1, RUNNING_BEING_CONFIGURED = 2 }
 
typedef Teuchos::RCP
< AlgorithmState
state_ptr_t
 
typedef Teuchos::RCP
< AlgorithmTracker
track_ptr_t
 
typedef Teuchos::RCP
< AlgorithmStep
step_ptr_t
 
typedef size_t poss_type
 
- Static Public Member Functions inherited from IterationPack::Algorithm
static void interrupt ()
 

Detailed Description

rSQP Algorithm control class.

Definition at line 55 of file MoochoPack_NLPAlgo.hpp.

Constructor & Destructor Documentation

MoochoPack::NLPAlgo::NLPAlgo ( )

Constructs with no step, added_step, pre_step, post_step, state, or decomp_sys objects added.

Definition at line 51 of file MoochoPack_NLPAlgo.cpp.

Member Function Documentation

NLPAlgoState& MoochoPack::NLPAlgo::rsqp_state ( )
inline

<<std aggr>="">> members for algo_cntr

<<std aggr>="">> members for nlp .

Definition at line 76 of file MoochoPack_NLPAlgo.hpp.

const NLPAlgoState& MoochoPack::NLPAlgo::rsqp_state ( ) const
inline

Definition at line 80 of file MoochoPack_NLPAlgo.hpp.

void MoochoPack::NLPAlgo::do_step_first ( Algorithm::poss_type  first_step_poss)
inline

Definition at line 84 of file MoochoPack_NLPAlgo.hpp.

const NLPAlgoState & MoochoPack::NLPAlgo::retrieve_state ( ) const
virtual

Implements MoochoPack::NLPAlgoInterface.

Definition at line 57 of file MoochoPack_NLPAlgo.cpp.

NLPSolverClientInterface::EFindMinReturn MoochoPack::NLPAlgo::dispatch ( )
virtual

This is the main control function for the rSQP algorithm.

This function basically just calls Algorithm::do_algorithm(...).

Implements MoochoPack::NLPAlgoInterface.

Definition at line 63 of file MoochoPack_NLPAlgo.cpp.

void MoochoPack::NLPAlgo::interface_print_algorithm ( std::ostream &  out) const
virtual

Implements MoochoPack::NLPAlgoInterface.

Definition at line 83 of file MoochoPack_NLPAlgo.cpp.

void MoochoPack::NLPAlgo::interface_set_algo_timing ( bool  algo_timing)
virtual

Implements MoochoPack::NLPAlgoInterface.

Definition at line 88 of file MoochoPack_NLPAlgo.cpp.

bool MoochoPack::NLPAlgo::interface_algo_timing ( ) const
virtual

Implements MoochoPack::NLPAlgoInterface.

Definition at line 92 of file MoochoPack_NLPAlgo.cpp.

void MoochoPack::NLPAlgo::interface_print_algorithm_times ( std::ostream &  out) const
virtual

Implements MoochoPack::NLPAlgoInterface.

Definition at line 96 of file MoochoPack_NLPAlgo.cpp.

void MoochoPack::NLPAlgo::print_algorithm ( std::ostream &  out) const
virtual

overridden from Algorihth.

Reimplemented from IterationPack::Algorithm.

Definition at line 102 of file MoochoPack_NLPAlgo.cpp.

Member Data Documentation

Algorithm::poss_type MoochoPack::NLPAlgo::first_step_poss_
protected

Definition at line 118 of file MoochoPack_NLPAlgo.hpp.


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