# SmiSmpsIO Class Reference

`#include <SmiSmpsIO.hpp>`

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

List of all members.

## Public Member Functions
SmiCoreData * | readTimeFile (SmiScnModel *smi, const char *c, const char *ext="time")
int | readStochFile (SmiScnModel *smi, SmiCoreData *core, const char *c, const char *ext="stoch")
void | setCoreCombineRule (SmiCoreCombineRule *r)
SmiCoreCombineRule * | getCoreCombineRule ()
int | getNumStages ()
int * | getColumnStages ()
int * | getRowStages ()
void | setSolverInfinity (double solverInf)
double | getSolverInfinity () const
void | writeSmps (const char *filename, bool winFileExtensions=false, bool strictFormat=true)
| SmiSmpsIO ()
| SmiSmpsIO (SmiCoreData *core, SmiScenarioTree< SmiScnNode * > *smiTree)
| ~SmiSmpsIO ()
## Private Types
typedef std::map< string, int > | StringIntMap
## Private Member Functions
void | writeCoreFile (const char *filename, const char *extension, const bool strictFormat)
| This method writes the core file for the current model by invoking writeMPS() from CoinMpsIO.
void | writeTimeFile (const char *filename, const char *extension, const bool strictFormat)
| Writes the time file for the current model, containing the assignments from rows and columns to stages.
void | writeStochFile (const char *filename, const char *extension, const bool strictFormat)
| Writes the stoch file for the current model, containing the stochastic data.
void | writeScenarioToStochFile (std::ostringstream &stream, SmiTreeNode< SmiScnNode * > *node, int scenario, bool strictFormat)
| Writes the stochastic informations for the given scenario into the stream.
std::string | getModProblemName ()
## Private Attributes
int | nstag_
int * | cstag_
int * | rstag_
double | solverInf_
bool | iftime
bool | ifstoch
SmiSmpsCardReader * | smpsCardReader_
SmiCoreCombineRule * | combineRule_
bool | combineRuleSet
SmiCoreData * | core
SmiScenarioTree< SmiScnNode * > * | tree
StringIntMap | periodMap_
StringIntMap | scenarioMap_

## Detailed Description

Definition at line 76 of file SmiSmpsIO.hpp.

## Member Typedef Documentation

typedef std::map<string,int> SmiSmpsIO::StringIntMap`[private]`

Definition at line 148 of file SmiSmpsIO.hpp.

## Constructor & Destructor Documentation

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

Definition at line 94 of file SmiSmpsIO.hpp.

SmiSmpsIO::SmiSmpsIO | ( | SmiCoreData * | core,
|  | SmiScenarioTree< SmiScnNode * > * | smiTree |
| ) |  |  | `[inline]`

Definition at line 95 of file SmiSmpsIO.hpp.

SmiSmpsIO::~SmiSmpsIO | ( |  | ) | `[inline]`

Definition at line 97 of file SmiSmpsIO.hpp.

## Member Function Documentation

SmiCoreData* SmiSmpsIO::readTimeFile | ( | SmiScnModel * | smi,
|  | const char * | c,
|  | const char * | ext = `"time"` |
| ) |  |  |

int SmiSmpsIO::readStochFile | ( | SmiScnModel * | smi,
|  | SmiCoreData * | core,
|  | const char * | c,
|  | const char * | ext = `"stoch"` |
| ) |  |  |

void SmiSmpsIO::setCoreCombineRule | ( | SmiCoreCombineRule * | r | ) | `[inline]`

Definition at line 83 of file SmiSmpsIO.hpp.

SmiCoreCombineRule* SmiSmpsIO::getCoreCombineRule | ( |  | ) | `[inline]`

Definition at line 84 of file SmiSmpsIO.hpp.

int SmiSmpsIO::getNumStages | ( |  | ) | `[inline]`

Definition at line 85 of file SmiSmpsIO.hpp.

int* SmiSmpsIO::getColumnStages | ( |  | ) | `[inline]`

Definition at line 86 of file SmiSmpsIO.hpp.

int* SmiSmpsIO::getRowStages | ( |  | ) | `[inline]`

Definition at line 87 of file SmiSmpsIO.hpp.

void SmiSmpsIO::setSolverInfinity | ( | double | solverInf | ) | `[inline]`

Definition at line 89 of file SmiSmpsIO.hpp.

double SmiSmpsIO::getSolverInfinity | ( |  | ) | const`[inline]`

Definition at line 90 of file SmiSmpsIO.hpp.

void SmiSmpsIO::writeSmps | ( | const char * | filename,
|  | bool | winFileExtensions = `false`,
|  | bool | strictFormat = `true` |
| ) |  |  |

void SmiSmpsIO::writeCoreFile | ( | const char * | filename,
|  | const char * | extension,
|  | const bool | strictFormat |
| ) |  |  | `[private]`

This method writes the core file for the current model by invoking writeMPS() from CoinMpsIO.

Parameters:

  | filename | The filename.
  | extension | The file extension.
  | strictFormat | Whether a strict format should be used or not.

void SmiSmpsIO::writeTimeFile | ( | const char * | filename,
|  | const char * | extension,
|  | const bool | strictFormat |
| ) |  |  | `[private]`

Writes the time file for the current model, containing the assignments from rows and columns to stages.

Parameters:

  | filename | The filename.
  | extension | The file extension.
  | strictFormat | Whether a strict format should be used or not.

void SmiSmpsIO::writeStochFile | ( | const char * | filename,
|  | const char * | extension,
|  | const bool | strictFormat |
| ) |  |  | `[private]`

Writes the stoch file for the current model, containing the stochastic data.

Parameters:

  | filename | The filename.
  | extension | The file extension.
  | strictFormat | Whether a strict format should be used or not.

void SmiSmpsIO::writeScenarioToStochFile | ( | std::ostringstream & | stream,
|  | SmiTreeNode< SmiScnNode * > * | node,
|  | int | scenario,
|  | bool | strictFormat |
| ) |  |  | `[private]`

Writes the stochastic informations for the given scenario into the stream.

std::string SmiSmpsIO::getModProblemName | ( |  | ) | `[private]`

## Member Data Documentation

int SmiSmpsIO::nstag_`[private]`

Definition at line 135 of file SmiSmpsIO.hpp.

int* SmiSmpsIO::cstag_`[private]`

Definition at line 136 of file SmiSmpsIO.hpp.

int* SmiSmpsIO::rstag_`[private]`

Definition at line 137 of file SmiSmpsIO.hpp.

double SmiSmpsIO::solverInf_`[private]`

Definition at line 138 of file SmiSmpsIO.hpp.

bool SmiSmpsIO::iftime`[private]`

Definition at line 140 of file SmiSmpsIO.hpp.

bool SmiSmpsIO::ifstoch`[private]`

Definition at line 140 of file SmiSmpsIO.hpp.

SmiSmpsCardReader* SmiSmpsIO::smpsCardReader_`[private]`

Definition at line 141 of file SmiSmpsIO.hpp.

SmiCoreCombineRule* SmiSmpsIO::combineRule_`[private]`

Definition at line 142 of file SmiSmpsIO.hpp.

bool SmiSmpsIO::combineRuleSet`[private]`

Definition at line 143 of file SmiSmpsIO.hpp.

SmiCoreData* SmiSmpsIO::core`[private]`

Definition at line 145 of file SmiSmpsIO.hpp.

SmiScenarioTree<SmiScnNode *>* SmiSmpsIO::tree`[private]`

Definition at line 146 of file SmiSmpsIO.hpp.

StringIntMap SmiSmpsIO::periodMap_`[private]`

Definition at line 149 of file SmiSmpsIO.hpp.

StringIntMap SmiSmpsIO::scenarioMap_`[private]`

Definition at line 150 of file SmiSmpsIO.hpp.

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

- /home/coin/svn-release/Smi-0.93.1/Smi/src/SmiSmpsIO.hpp