MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / timeSeries

Method timeSeries

src/model/ScheduleFixedInterval.cpp:67–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65 }
66
67 openstudio::TimeSeries ScheduleFixedInterval_Impl::timeSeries() const {
68 int year =
69 2009; // we need to pass assumed year in here, otherwise it uses YearDescription().assumedYear from Date.cpp which doesn't return the same assumed year (?)
70 if (boost::optional<YearDescription> yd = this->model().getOptionalUniqueModelObject<YearDescription>()) {
71 year = yd->assumedYear();
72 }
73
74 const Date startDate(openstudio::MonthOfYear(this->startMonth()), this->startDay(), year);
75 const Time intervalLength(0, 0, this->intervalLength());
76
77 Vector values(this->numExtensibleGroups());
78 unsigned i = 0;
79 for (const ModelExtensibleGroup& group : castVector<ModelExtensibleGroup>(extensibleGroups())) {
80 OptionalDouble x = group.getDouble(0);
81 OS_ASSERT(x);
82 values[i] = *x;
83 ++i;
84 }
85
86 TimeSeries result(startDate, intervalLength, values, "");
87 result.setOutOfRangeValue(this->outOfRangeValue());
88
89 return result;
90 }
91
92 bool ScheduleFixedInterval_Impl::setTimeSeries(const openstudio::TimeSeries& timeSeries) {
93 // check the interval

Callers

nothing calls this directly

Calls 10

startMonthMethod · 0.95
startDayMethod · 0.95
intervalLengthMethod · 0.95
outOfRangeValueMethod · 0.95
numExtensibleGroupsMethod · 0.80
MonthOfYearClass · 0.70
modelMethod · 0.45
assumedYearMethod · 0.45
getDoubleMethod · 0.45
setOutOfRangeValueMethod · 0.45

Tested by

no test coverage detected