This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drop table tmp_battery_sim; | |
create table tmp_battery_sim (start timestamp without time zone, energy_in_battery numeric, energy_not_consumed_from_grid numeric, savings_from_battery numeric); | |
do $$ | |
declare | |
-- Variables | |
t record; | |
vn_battery numeric := 0.0; | |
vn_battery_prev numeric := 0.0; | |
vn_grid_savings numeric := 0.0; |