YANE-Framework 1.1.0
Public Member Functions

yane::Utils::SaveData Class Reference

Class to save state and control values.

List of all members.

Public Member Functions

void save2Files (double *t, double *x, double *u)
 Function to save closed-loop data to harddisk
This function saves the current time instant together with control and state values in one individual file. These files are denoted by tmp_x???.dat and tmp_u???.dat (where ??? denotes the component of the state or control variable).
void saveClosedloopcost2File (double closedloopcost, double computingtime=0.0)
 Function to save the running costs and computing times to harddisk.
 SaveData (int dimension_x, int dimension_u, int horizon=0, int controlhorizon=0)
 Constructor.
void saveOpenloop2Files (int iter, int horizon, double *t, double *x, double *u)
 Function to save open-loop data to harddisk
This function save the current time grid together with control and strate trajectories in one individual file. These files are denoted by tmp_!!_x??.dat und tmp_!!_u??.dat (where !! denotes the time index and ?? denotes the component of the state or control variable).
 ~SaveData ()
 Destructor.

Constructor & Destructor Documentation

LIB_EXPORT yane::Utils::SaveData::SaveData ( int  dimension_x,
int  dimension_u,
int  horizon = 0,
int  controlhorizon = 0 
)
Parameters:
dimension_xDimension of the state
dimension_uDimension of the control
horizonLength of the horizon (optional)
controlhorizonLength of the control horizon (optional)

Member Function Documentation

LIB_EXPORT void yane::Utils::SaveData::save2Files ( double *  t,
double *  x,
double *  u 
)
Parameters:
tCurrent time grid
xInitial state vector
uControl vector on the time gird
LIB_EXPORT void yane::Utils::SaveData::saveClosedloopcost2File ( double  closedloopcost,
double  computingtime = 0.0 
)
Parameters:
closedloopcostCurrent running cost
computingtimeRequired computing time
LIB_EXPORT void yane::Utils::SaveData::saveOpenloop2Files ( int  iter,
int  horizon,
double *  t,
double *  x,
double *  u 
)
Parameters:
iterCurrent iterate
horizonLength of the horizon
tCurrent time grid
xOpen-loop state trajectories
uOpen-loop control trajectories