本文整理汇总了C++中Analysis::displayName方法的典型用法代码示例。如果您正苦于以下问题:C++ Analysis::displayName方法的具体用法?C++ Analysis::displayName怎么用?C++ Analysis::displayName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Analysis
的用法示例。
在下文中一共展示了Analysis::displayName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: record
// Test not yet to scale re: total data points.
TEST_F(ProjectFixture,Profile_UpdateAnalysis) {
Analysis analysis = getAnalysisToRun(100,500);
// save to database
ProjectDatabase db = getCleanDatabase(toPath("./UpdateAnalysis"));
ASSERT_TRUE(db.startTransaction());
AnalysisRecord record(analysis,db);
db.save();
ASSERT_TRUE(db.commitTransaction());
// add output data to 1 data point
DataPointVector dataPoints = analysis.dataPoints();
boost::mt19937 mt;
typedef boost::uniform_real<> uniform_dist_type;
typedef boost::variate_generator<boost::mt19937&, uniform_dist_type> uniform_gen_type;
uniform_gen_type responseGenerator(mt,uniform_dist_type(50.0,500.0));
for (int i = 0; i < 1; ++i) {
std::stringstream ss;
ss << "dataPoint" << i + 1;
DoubleVector responseValues;
for (int j = 0, n = analysis.problem().responses().size(); j < n; ++j) {
responseValues.push_back(responseGenerator());
}
openstudio::path runDir = toPath(ss.str());
dataPoints[i] = DataPoint(dataPoints[i].uuid(),
createUUID(),
dataPoints[i].name(),
dataPoints[i].displayName(),
dataPoints[i].description(),
analysis.problem(),
true,
false,
true,
DataPointRunType::Local,
dataPoints[i].variableValues(),
responseValues,
runDir,
FileReference(runDir / toPath("ModelToIdf/in.osm")),
FileReference(runDir / toPath("ModelToIdf/out.idf")),
FileReference(runDir / toPath("EnergyPlus/eplusout.sql")),
FileReferenceVector(1u,FileReference(runDir / toPath("Ruby/report.xml"))),
boost::optional<runmanager::Job>(),
std::vector<openstudio::path>(),
TagVector(),
AttributeVector());
dataPoints[i].setName(dataPoints[i].name()); // set dirty
}
analysis = Analysis(analysis.uuid(),
analysis.versionUUID(),
analysis.name(),
analysis.displayName(),
analysis.description(),
analysis.problem(),
analysis.algorithm(),
analysis.seed(),
analysis.weatherFile(),
dataPoints,
false,
false);
analysis.setName(analysis.name()); // set dirty
// time the process of updating the database
ptime start = microsec_clock::local_time();
db.unloadUnusedCleanRecords();
ASSERT_TRUE(db.startTransaction());
record = AnalysisRecord(analysis,db);
db.save();
ASSERT_TRUE(db.commitTransaction());
time_duration updateTime = microsec_clock::local_time() - start;
std::cout << "Time: " << to_simple_string(updateTime) << std::endl;
}