Skip to content

Commit

Permalink
- $cpu_time -> '$cpu_time'
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@15140 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
lochel committed Feb 11, 2013
1 parent c6c6816 commit bcf52e2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion SimulationRuntime/c/simulation/options.cpp
Expand Up @@ -94,7 +94,7 @@ const char *FLAG_DESC[FLAG_MAX] = {
const char *FLAG_DETAILED_DESC[FLAG_MAX] = {
"unknown",

/* FLAG_CPU */ " - dumps the cpu-time into the result-file\n - $cpu_time is the variable name inside the result-file",
/* FLAG_CPU */ " - dumps the cpu-time into the result-file\n - '$cpu_time' is the variable name inside the result-file",
/* FLAG_F */ "value specifies a new setup XML file to the generated simulation code",
/* FLAG_HELP */ "get deteiled information the specifies the command-line flag\n e.g. -help=f prints detaild information for command-line flag f",
/* FLAG_IIF */ "value specifies an external file for the initialization of the model",
Expand Down
Expand Up @@ -116,7 +116,7 @@ simulation_result_csv::simulation_result_csv(const char* filename, long numpoint

fprintf(fout, format, "time");
if(cpuTime)
fprintf(fout, format, "$cpu_time");
fprintf(fout, format, "'$cpu_time'");
for(int i = 0; i < mData->nVariablesReal; i++) if(!mData->realVarsData[i].filterOutput)
fprintf(fout, format, mData->realVarsData[i].info.name);
for(int i = 0; i < mData->nVariablesInteger; i++) if(!mData->integerVarsData[i].filterOutput)
Expand Down
Expand Up @@ -42,7 +42,7 @@
#include <assert.h>

static const struct VAR_INFO timeValName = {0,"time","Simulation time [s]",{"",-1,-1,-1,-1}};
static const struct VAR_INFO cpuTimeValName = {0,"$cpu_time","cpu time [s]",{"",-1,-1,-1,-1}};
static const struct VAR_INFO cpuTimeValName = {0,"'$cpu_time'","cpu time [s]",{"",-1,-1,-1,-1}};

int simulation_result_mat::calcDataSize()
{
Expand Down
Expand Up @@ -61,7 +61,7 @@
int simulation_result_plt::calcDataSize(const MODEL_DATA *modelData)
{
int sz = 1; // time
if(cpuTime) sz++; // $cpu_time
if(cpuTime) sz++; // '$cpu_time'
for(int i = 0; i < modelData->nVariablesReal; i++) if(!modelData->realVarsData[i].filterOutput) sz++;
for(int i = 0; i < modelData->nVariablesInteger; i++) if(!modelData->integerVarsData[i].filterOutput) sz++;
for(int i = 0; i < modelData->nVariablesBoolean; i++) if(!modelData->booleanVarsData[i].filterOutput) sz++;
Expand Down Expand Up @@ -142,7 +142,7 @@ void simulation_result_plt::add_result(double *data_, long *actualPoints)

if(cpuTime)
{
ss << "$cpu_time" << "\n";
ss << "'$cpu_time'" << "\n";
ss << (data_[currentPos++] = -42) << "\n";
}
/* .. reals .. */
Expand Down Expand Up @@ -393,10 +393,10 @@ simulation_result_plt::~simulation_result_plt()
fprintf(f, "\n");
varn++;

/* $cpu_time variable. */
/* '$cpu_time' variable. */
if(cpuTime)
{
fprintf(f, "DataSet: $cpu_time\n");
fprintf(f, "DataSet: '$cpu_time'\n");
for(int i = 0; i < actualPoints; ++i)
printPltLine(f, simulationResultData[i*num_vars], simulationResultData[i*num_vars + 1]);
fprintf(f, "\n");
Expand Down

0 comments on commit bcf52e2

Please sign in to comment.