# AlpsModel Class Reference

`#include <AlpsModel.h>`

Inheritance diagram for AlpsModel:
[legend]
Collaboration diagram for AlpsModel:
[legend]

List of all members.

## Public Member Functions
| AlpsModel ()
| Default construtor.
virtual | ~AlpsModel ()
| Destructor.
AlpsKnowledgeBroker * | getKnowledgeBroker ()
| Get knowledge broker.
void | setKnowledgeBroker (AlpsKnowledgeBroker *b)
| Set knowledge broker.
std::string | getDataFile () const
| Get the input file.
void | setDataFile (std::string infile)
| Set the data file.
AlpsParams * | AlpsPar ()
| Access Alps Parameters.
virtual void | readInstance (const char *dateFile)
| Read in the instance data.
virtual void | readParameters (const int argnum, const char *const *arglist)
| Read in Alps parameters.
void | writeParameters (std::ostream &outstream) const
| Write out parameters.
virtual bool | setupSelf ()
| Do necessary work to make model ready for use, such as classify variable and constraint types.
virtual void | preprocess ()
| Preprocessing the model.
virtual void | postprocess ()
| Postprocessing results.
virtual AlpsTreeNode * | createRoot ()
| Create the root node.
virtual void | modelLog ()
| Problem specific log.
virtual void | nodeLog (AlpsTreeNode *node, bool force)
| Node log.
virtual bool | fathomAllNodes ()
| Return true if all nodes on this process can be fathomed.
AlpsReturnStatus | encodeAlps (AlpsEncoded *encoded) const
| Pack Alps portion of node into an encoded object.
AlpsReturnStatus | decodeAlps (AlpsEncoded &encoded)
| Unpack Alps portion of node from an encoded object.
virtual void | decodeToSelf (AlpsEncoded &encoded)
| Decode model data from the encoded form and fill member data.
virtual void | registerKnowledge ()
| Register knowledge class.
virtual void | sendGeneratedKnowledge ()
| Send generated knowledge.
virtual void | receiveGeneratedKnowledge ()
| Receive generated knowledge.
virtual AlpsEncoded * | packSharedKnowlege ()
| Pack knowledge to be shared with others into an encoded object.
virtual void | unpackSharedKnowledge (AlpsEncoded &)
| Unpack and store shared knowledge from an encoded object.
## Protected Attributes
AlpsKnowledgeBroker * | broker_
| Knowledge broker.
std::string | dataFile_
| Data file.
AlpsParams * | AlpsPar_
| The parameter set that is used in Alps.
## Private Member Functions
| AlpsModel (const AlpsModel &)
AlpsModel & | operator= (const AlpsModel &)

## Detailed Description

Definition at line 36 of file AlpsModel.h.

## Constructor & Destructor Documentation

AlpsModel::AlpsModel | ( | const AlpsModel & |  | ) | `[private]`

AlpsModel::AlpsModel | ( |  | ) | `[inline]`

Default construtor.

Definition at line 57 of file AlpsModel.h.

virtual AlpsModel::~AlpsModel | ( |  | ) | `[inline, virtual]`

Destructor.

Definition at line 62 of file AlpsModel.h.

## Member Function Documentation

AlpsModel& AlpsModel::operator= | ( | const AlpsModel & |  | ) | `[private]`

Reimplemented from AlpsKnowledge.

AlpsKnowledgeBroker* AlpsModel::getKnowledgeBroker | ( |  | ) | `[inline]`

Get knowledge broker.

Definition at line 65 of file AlpsModel.h.

void AlpsModel::setKnowledgeBroker | ( | AlpsKnowledgeBroker * | b | ) | `[inline]`

Set knowledge broker.

Definition at line 68 of file AlpsModel.h.

std::string AlpsModel::getDataFile | ( |  | ) | const`[inline]`

Get the input file.

Definition at line 71 of file AlpsModel.h.

void AlpsModel::setDataFile | ( | std::string | infile | ) | `[inline]`

Set the data file.

Definition at line 74 of file AlpsModel.h.

AlpsParams* AlpsModel::AlpsPar | ( |  | ) | `[inline]`

Access Alps Parameters.

Definition at line 77 of file AlpsModel.h.

virtual void AlpsModel::readInstance | ( | const char * | dateFile | ) | `[inline, virtual]`

Read in the instance data.

At Alps level, nothing to do.

Reimplemented in AbcModel, and KnapModel.

Definition at line 80 of file AlpsModel.h.

virtual void AlpsModel::readParameters | ( | const int | argnum,
|  | const char *const * | arglist |
| ) |  |  | `[virtual]`

Read in Alps parameters.

Reimplemented in AbcModel, and KnapModel.

void AlpsModel::writeParameters | ( | std::ostream & | outstream | ) | const

Write out parameters.

virtual bool AlpsModel::setupSelf | ( |  | ) | `[inline, virtual]`

Do necessary work to make model ready for use, such as classify variable and constraint types.

Reimplemented in AbcModel.

Definition at line 93 of file AlpsModel.h.

virtual void AlpsModel::preprocess | ( |  | ) | `[inline, virtual]`

Preprocessing the model.

Definition at line 96 of file AlpsModel.h.

virtual void AlpsModel::postprocess | ( |  | ) | `[inline, virtual]`

Postprocessing results.

Definition at line 99 of file AlpsModel.h.

virtual AlpsTreeNode* AlpsModel::createRoot | ( |  | ) | `[inline, virtual]`

Create the root node.

Default: do nothing

Definition at line 102 of file AlpsModel.h.

virtual void AlpsModel::modelLog | ( |  | ) | `[inline, virtual]`

Problem specific log.

Definition at line 108 of file AlpsModel.h.

virtual void AlpsModel::nodeLog | ( | AlpsTreeNode * | node,
|  | bool | force |
| ) |  |  | `[virtual]`

Node log.

virtual bool AlpsModel::fathomAllNodes | ( |  | ) | `[inline, virtual]`

Return true if all nodes on this process can be fathomed.

Definition at line 114 of file AlpsModel.h.

AlpsReturnStatus AlpsModel::encodeAlps | ( | AlpsEncoded * | encoded | ) | const

Pack Alps portion of node into an encoded object.

AlpsReturnStatus AlpsModel::decodeAlps | ( | AlpsEncoded & | encoded | ) |

Unpack Alps portion of node from an encoded object.

virtual void AlpsModel::decodeToSelf | ( | AlpsEncoded & | encoded | ) | `[inline, virtual]`

Decode model data from the encoded form and fill member data.

Reimplemented in AbcModel, and KnapModel.

Definition at line 127 of file AlpsModel.h.

virtual void AlpsModel::registerKnowledge | ( |  | ) | `[inline, virtual]`

Register knowledge class.

Definition at line 130 of file AlpsModel.h.

virtual void AlpsModel::sendGeneratedKnowledge | ( |  | ) | `[inline, virtual]`

Send generated knowledge.

Definition at line 133 of file AlpsModel.h.

virtual void AlpsModel::receiveGeneratedKnowledge | ( |  | ) | `[inline, virtual]`

Receive generated knowledge.

Definition at line 136 of file AlpsModel.h.

virtual AlpsEncoded* AlpsModel::packSharedKnowlege | ( |  | ) | `[inline, virtual]`

Pack knowledge to be shared with others into an encoded object.

Return NULL means that no knowledge can be shared.

Definition at line 140 of file AlpsModel.h.

virtual void AlpsModel::unpackSharedKnowledge | ( | AlpsEncoded & |  | ) | `[inline, virtual]`

Unpack and store shared knowledge from an encoded object.

Definition at line 147 of file AlpsModel.h.

## Member Data Documentation

AlpsKnowledgeBroker* AlpsModel::broker_`[protected]`

Knowledge broker.

Definition at line 46 of file AlpsModel.h.

std::string AlpsModel::dataFile_`[protected]`

Data file.

Definition at line 49 of file AlpsModel.h.

AlpsParams* AlpsModel::AlpsPar_`[protected]`

The parameter set that is used in Alps.

Definition at line 52 of file AlpsModel.h.

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

- /home/coin/svn-release/Alps-1.5.2/Alps/src/AlpsModel.h