This is the class used to get and store initial values for the variables used in the model simulation from an input file.
More...
#include <initialinputfile.h>
This is the class used to get and store initial values for the variables used in the model simulation from an input file.
◆ InitialInputFile()
InitialInputFile::InitialInputFile |
( |
const char *const |
filename | ) |
|
This is the default InitialInputFile constructor.
- Parameters
-
filename | is the name of the file to read the initial parameter values from |
◆ ~InitialInputFile()
InitialInputFile::~InitialInputFile |
( |
| ) |
|
◆ getLower()
double InitialInputFile::getLower |
( |
int |
i | ) |
const |
|
inline |
This function will return the lower bound for a switch in the input file.
- Parameters
-
i | is the index for the switch |
- Returns
- lower bound for the switch
◆ getOptimise()
int InitialInputFile::getOptimise |
( |
int |
i | ) |
const |
|
inline |
This function will return the optimising flag for a switch in the input file.
- Parameters
-
i | is the index for the switch |
- Returns
- optimise flag for the switch
◆ getSwitch()
Parameter InitialInputFile::getSwitch |
( |
int |
i | ) |
const |
|
inline |
This function will return the paramter name for a switch in the input file.
- Parameters
-
i | is the index for the switch |
- Returns
- parameter name for the switch
◆ getSwitches()
This function will return a copy of the names of the variables.
- Parameters
-
◆ getUpper()
double InitialInputFile::getUpper |
( |
int |
i | ) |
const |
|
inline |
This function will return the upper bound for a switch in the input file.
- Parameters
-
i | is the index for the switch |
- Returns
- upper bound for the switch
◆ getValue()
double InitialInputFile::getValue |
( |
int |
i | ) |
const |
|
inline |
This function will return the value of a switch in the input file.
- Parameters
-
i | is the index for the switch |
- Returns
- value of the switch
◆ getValues()
This function will return a copy of the value of the variables.
- Parameters
-
val | is the DoubleVector that will contain a copy of the values |
◆ getVectors()
This function will return a copy of the data read from the input file.
- Parameters
-
sw | is the ParameterVector that will contain a copy of the names |
val | is the DoubleVector that will contain a copy of the values |
low | is the DoubleVector that will contain a copy of the lower bounds |
upp | is the DoubleVector that will contain a copy of the upper bounds |
opt | is the IntVector that will contain a copy of the optimise flags |
◆ isDataLeft()
int InitialInputFile::isDataLeft |
( |
| ) |
|
This function will check to see if there is more data to read in the input file.
- Returns
- 1 if there is more data to read from the input file, 0 otherwise
◆ isRepeatedValues()
int InitialInputFile::isRepeatedValues |
( |
| ) |
|
|
inline |
This function will return the value of the flag used to denote that the 'repeated values' format is used in the input file.
- Returns
- repeatedValues
◆ numSwitches()
int InitialInputFile::numSwitches |
( |
| ) |
const |
|
inline |
This function will return the number of switches read from the input file.
- Returns
- number of switches
◆ numVariables()
int InitialInputFile::numVariables |
( |
| ) |
const |
|
inline |
This function will return the number of variables read from the input file.
- Returns
- number of variables
◆ readFromFile()
void InitialInputFile::readFromFile |
( |
| ) |
|
This is the function that will read the data from the input file.
◆ readNextLine()
void InitialInputFile::readNextLine |
( |
| ) |
|
This is the function that will read the next line of the data from the input file.
- Note
- This function is only used when the data is in the 'repeated values' format
The documentation for this class was generated from the following files: