Connect Data to Models
By using real-world data as input to your model, you can test realistic scenarios. In this example, models for heating and cooling of buildings are used together with WeatherData to analyze power consumption, construct energy-efficient buildings and minimize costs.
Get the outside temperature for Champaign, Illinois, USA for a given day.
Convert the data into seconds and get the duration of the data.
Create a new model that includes the temperature data.
Simulate and plot the model. The gray background indicates the time when the heating is on.
Get the cost for electricity for a given day, for both Illinois and Arizona.
Define a function to compute the total energy used.
Simulate the two scenarios for different indoor target temperatures.
Compare the different energy costs for each heating strategy and different indoor temperatures.