Skip to content

Commit

Permalink
initial ui fixes
Browse files Browse the repository at this point in the history
monthly stacked bar graph

separate hybrid system and costs page
  • Loading branch information
cpaulgilman committed Jul 21, 2023
1 parent 1094b11 commit 3ba7213
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 103 deletions.
2 changes: 1 addition & 1 deletion deploy/runtime/autographs.lk
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ autographs{ 'Generic Battery' } = define() {heatmap_graphs();};
autographs { 'PVWatts Wind Battery Hybrid|Single Owner' } = define () {
// monthly energy
//agraph( 'monthly_energy,year1_monthly_load', 'Monthly AC Energy and Load in Year 1', '', 'kWh', -1, true, true, 'bottom' );
agraph( 'PVWattsmonthly_energy,Windmonthly_energy,monthly_energy', 'Monthly AC Energy in Year 1', '', 'kWh' , -1, true, true, 'bottom' );
agraph( 'PVWattsmonthly_energy,Windmonthly_energy', 'Monthly AC Energy in Year 1', '', 'kWh' , -1, false, true, 'bottom', 1 );
// heatmaps
agraph( 'PVWattsannual_energy_distribution_time', 'PV annual AC energy in Year 1 (kW)', 'Day', 'Hour', -1, true, false, 'bottom', 4);
agraph( 'Windannual_energy_distribution_time', 'Wind annual AC energy in Year 1 (kW)', 'Day', 'Hour', -1, true, false, 'bottom', 4);
Expand Down
4 changes: 3 additions & 1 deletion deploy/runtime/startup.lk
Original file line number Diff line number Diff line change
Expand Up @@ -2545,6 +2545,7 @@ sethybridvariabledependencies([
{ 'IndependentVartableIndex' = 2,'IndependentVariableName' = 'system_capacity', 'DependentVartableIndex' = 3,'DependentVariableName' = 'battery_system_capacity'},
{ 'IndependentVartableIndex' = 2,'IndependentVariableName' = 'total_installed_cost', 'DependentVartableIndex' = 3,'DependentVariableName' = 'battery_total_installed_cost'}
]);
addpage([['Hybrid System']], {'sidebar'='Hybrid System', 'help'='hybrid_system'});
// pv
addpage( [[ 'Solar Resource Data' ]], { 'sidebar'='Location and Resource', 'help'='pv_location_and_resource', 'bin_name'='PVWatts' } );
addpage( [[ 'PVWatts', {'name'='PV Land Area', 'caption' = 'Land Area', 'collapsible'=true, 'collapsible_var'='pv_land_area_is_shown'}, {'name'='PVWatts Advanced Inputs', 'caption' = 'Advanced Inputs', 'collapsible'=true, 'collapsible_var'='pvwatts.advanced.is_shown'} ]], { 'sidebar'='System Design', 'help'='pvwatts_system_design', 'bin_name'='PVWatts' } );
Expand All @@ -2564,9 +2565,10 @@ setup_hybrid_battery_pages(FOM);
addpage( [[ 'Standalone Battery Costs', 'Battery Enable' ]], { 'sidebar'='Battery Installation Costs', 'help'='cc_standalone_battery', 'bin_name'='Battery' } );
addpage( [[ 'Operating Costs Standalone Battery']], { 'sidebar'='Battery Operating Costs', 'help'='oc_battery', 'bin_name'='Battery' } );
// single owner
addpage([['Hybrid Costs']], {'sidebar'='Hybrid System Costs', 'help'='hybrid_system_costs'});

setup_single_owner_pages( );
setup_electricity_purchases();
addpage([['Hybrid Summary']], {'sidebar'='Hybrid Summary', 'help'='hybrid_summary'});

////////////////////////////////////////////////////////////////////////////////
setconfig('PVWatts Wind Battery Hybrid', 'Host Developer' );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,89 +363,6 @@
}
}
},
"Numeric": {
"Visible": 1.0,
"ObjectProperties": {
"Name": {
"Type": 5.0,
"String": "system_capacity"
},
"X": {
"Type": 3.0,
"Integer": 231.0
},
"Y": {
"Type": 3.0,
"Integer": 261.0
},
"Width": {
"Type": 3.0,
"Integer": 90.0
},
"Height": {
"Type": 3.0,
"Integer": 24.0
},
"Tool Tip": {
"Type": 5.0,
"String": ""
},
"Value": {
"Type": 1.0,
"Double": 0.0
},
"Mode": {
"Type": 3.0,
"Integer": 1.0
},
"Format": {
"Type": 3.0,
"Integer": 0.0
},
"Decimals": {
"Type": 3.0,
"Integer": 0.0
},
"Prefix": {
"Type": 5.0,
"String": ""
},
"Suffix": {
"Type": 5.0,
"String": ""
},
"ThousandsSep": {
"Type": 2.0,
"Boolean": 1.0
},
"Editable": {
"Type": 2.0,
"Boolean": 1.0
},
"ForeColour": {
"Type": 4.0,
"Color": {
"Red": 0.0,
"Green": 0.0,
"Blue": 0.0,
"Alpha": 255.0
}
},
"BackColour": {
"Type": 4.0,
"Color": {
"Red": 255.0,
"Green": 255.0,
"Blue": 255.0,
"Alpha": 255.0
}
},
"TabOrder": {
"Type": 3.0,
"Integer": -1.0
}
}
},
"Numeric": {
"Visible": 1.0,
"ObjectProperties": {
Expand Down Expand Up @@ -570,19 +487,6 @@
"sscVariableName": "",
"sscVariableValue": ""
},
"system_capacity": {
"Version": 4.0,
"Type": 1.0,
"Label": "Combined system capacity",
"Units": "kW",
"Group": "",
"IndexLabels": "",
"Flags": 8.0,
"DefaultValue": 0.0,
"UIObject": "Numeric",
"sscVariableName": "",
"sscVariableValue": ""
},
"total_installed_cost": {
"Version": 4.0,
"Type": 1.0,
Expand All @@ -598,11 +502,6 @@
}
},
"Equations": [
"equations{ 'system_capacity' } = define() {\r",
"\treturn ${pv_system_capacity}\r",
"\t\t+ ${wind_system_capacity}\r",
"\t\t+ ${battery_system_capacity}; };\r",
"\r",
"equations{ 'total_installed_cost' } = define() {\r",
"\treturn ${pv_total_installed_cost}\r",
"\t\t+ ${wind_total_installed_cost}\r",
Expand Down
112 changes: 112 additions & 0 deletions deploy/runtime/ui/Hybrid System.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
{
"Name": "Hybrid System",
"Width": 693.0,
"Height": 491.0,
"FormObjects": {
"Numeric": {
"Visible": 1.0,
"ObjectProperties": {
"Name": {
"Type": 5.0,
"String": "system_capacity"
},
"X": {
"Type": 3.0,
"Integer": 297.0
},
"Y": {
"Type": 3.0,
"Integer": 117.0
},
"Width": {
"Type": 3.0,
"Integer": 90.0
},
"Height": {
"Type": 3.0,
"Integer": 24.0
},
"Tool Tip": {
"Type": 5.0,
"String": ""
},
"Value": {
"Type": 1.0,
"Double": 0.0
},
"Mode": {
"Type": 3.0,
"Integer": 1.0
},
"Format": {
"Type": 3.0,
"Integer": 0.0
},
"Decimals": {
"Type": 3.0,
"Integer": 3.0
},
"Prefix": {
"Type": 5.0,
"String": ""
},
"Suffix": {
"Type": 5.0,
"String": ""
},
"ThousandsSep": {
"Type": 2.0,
"Boolean": 1.0
},
"Editable": {
"Type": 2.0,
"Boolean": 1.0
},
"ForeColour": {
"Type": 4.0,
"Color": {
"Red": 0.0,
"Green": 0.0,
"Blue": 0.0,
"Alpha": 255.0
}
},
"BackColour": {
"Type": 4.0,
"Color": {
"Red": 255.0,
"Green": 255.0,
"Blue": 255.0,
"Alpha": 255.0
}
},
"TabOrder": {
"Type": 3.0,
"Integer": -1.0
}
}
}
},
"VarDatabase": {
"system_capacity": {
"Version": 4.0,
"Type": 1.0,
"Label": "Combined system capacity",
"Units": "kW",
"Group": "Hybrid System",
"IndexLabels": "",
"Flags": 8.0,
"DefaultValue": 0.0,
"UIObject": "Numeric",
"sscVariableName": "",
"sscVariableValue": ""
}
},
"Equations": [
"equations{ 'system_capacity' } = define() {\r",
"\treturn ${pv_system_capacity}\r",
"\t\t+ ${wind_system_capacity}\r",
"\t\t+ ${battery_system_capacity}; };"
],
"Callbacks": []
}

0 comments on commit 3ba7213

Please sign in to comment.