TEST_F(SqlFileLargeFixture, LinePlot8760)
{
  // make a timeseries
  openstudio::OptionalTimeSeries ts = sqlFile.timeSeries("Albuquerque Intl Arpt  Isis NM USA TMY3 WMO#=723650", "Hourly", "Heating Coil Air Heating Rate",  "MOB FLOOR 2-4 PERIMETER 2 HEAT PUMP SUP HEAT COIL");
  ASSERT_TRUE(ts);

  // plot it
  LinePlot::Ptr lp = LinePlot::create();
  lp->timeseriesData(*ts, "");
  lp->generateImage(toPath("SqlFileLargeFixture_LinePlot8760.png"));
}
TEST_F(SqlFileLargeFixture, LinePlot84868)
{
  // make a timeseries
  openstudio::OptionalTimeSeries ts = sqlFile.timeSeries("Albuquerque Intl Arpt  Isis NM USA TMY3 WMO#=723650", "HVAC System Timestep", "Chiller Fan Coil Part Load Ratio",  "COOLSYS1 CHILLER");
  ASSERT_TRUE(ts);

  // plot it
  LinePlot::Ptr lp = LinePlot::create();
  lp->timeseriesData(*ts, "");
  lp->generateImage(toPath("SqlFileLargeFixture_LinePlot84868.png"));
}
TEST_F(SqlFileLargeFixture, LinePlot52560)
{
  // make a timeseries
  openstudio::OptionalTimeSeries ts = sqlFile.timeSeries("Albuquerque Intl Arpt  Isis NM USA TMY3 WMO#=723650", "HVAC System Timestep", "Zone Mean Air Temperature",  "FLOOR 2 LAB 1");
  ASSERT_TRUE(ts);

  // plot it
  LinePlot::Ptr lp = LinePlot::create();
  lp->timeseriesData(*ts, "");
  lp->generateImage(toPath("SqlFileLargeFixture_LinePlot52560.png"));
}
Beispiel #4
0
TEST_F(SqlFileFixture, LinePlot)
{
  std::vector<std::string> availableEnvPeriods = sqlFile.availableEnvPeriods();
  ASSERT_FALSE(availableEnvPeriods.empty());

  // make a timeseries
  openstudio::OptionalTimeSeries ts = sqlFile.timeSeries(availableEnvPeriods[0], "Hourly", "Electricity:Facility",  "");
  ASSERT_TRUE(ts);

  // plot it
  LinePlot::Ptr lp = LinePlot::create();
  lp->timeseriesData(*ts, "Electricity:Facility");
  lp->generateImage(toPath("testLP.png"));
  EXPECT_TRUE(true);
}
TEST_F(SqlFileLargeFixture, LinePlotVector84868)
{
  Vector xVector(84868);
  Vector yVector(84868);
  for (unsigned i = 0; i < 84868; ++i){
    xVector(i) = i*365.0/84868.0;
    yVector(i) = 1e7+i%2500;
  }

  VectorLinePlotData::Ptr data = VectorLinePlotData::create(xVector, yVector);

  LinePlot::Ptr lp = LinePlot::create();
  std::string name = "Vector 84868 points";
  lp->linePlotData(data, name);
  lp->generateImage(toPath("SqlFileLargeFixture_LinePlotVector84868.png"));
}
TEST_F(SqlFileLargeFixture, LinePlotts84868)
{
  DateTimeVector dateTimes(84868);
  Vector values(84868);
  DateTime startDate(Date(MonthOfYear::Jan, 1), Time(0,1,0,0));
  for(unsigned i = 0; i < 84868; ++i){
    double fracHours = i * 8760.0/84868.0;
    dateTimes[i] = startDate + Time(0,fracHours,0,0);
    values[i] = fracHours;
  }
  
  TimeSeries ts(dateTimes, values, "");
  // plot it
  LinePlot::Ptr lp = LinePlot::create();
  lp->timeseriesData(ts, "");
  lp->generateImage(toPath("SqlFileLargeFixture_LinePlotts84868.png"));
}