Skip to content

Commit

Permalink
Merge pull request #1489 from NREL/wind-hybrid-bos-cost
Browse files Browse the repository at this point in the history
Fix callbacks for wind bos system cost options for hybrids
  • Loading branch information
mjprilliman authored Oct 6, 2023
2 parents f8431c8 + d316033 commit d401762
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 16 deletions.
2 changes: 2 additions & 0 deletions deploy/runtime/ui/Hybrid Costs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,8 @@
"\tis_fuel_cell_tech = ( technology() == 'PVWatts Wind FuelCell Battery Hybrid' || technology() == 'Generic PVWatts Wind FuelCell Battery Hybrid' ) ;\r",
"\tshow( 'ui_generic_cost', is_generic_tech );\r",
"\tshow( 'ui_fuel_cell_cost', is_fuel_cell_tech );\r",
"\tvalue('total_installed_cost', value('total_installed_cost'));\r",
"\trefresh('total_installed_cost');\r",
"\trefresh();\r",
"};"
]
Expand Down
50 changes: 34 additions & 16 deletions deploy/runtime/ui/Wind Farm Costs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2721,22 +2721,7 @@
"\trefresh('total_installed_cost');\r",
"\tvalue('turbine_cost_fixed',old_value);",
"\r",
"\ttech = technology();\r",
"\t\r",
"\tif ( tech == 'PVWatts Wind Battery Hybrid'\r",
"\t || tech == 'PVWatts Wind FuelCell Battery Hybrid' \r",
"\t || tech == 'Photovoltaic Wind Battery Hybrid' \r",
"\t || tech == 'Generic PVWatts Wind FuelCell Battery Hybrid' ) {\r",
"\t\twind_name = 'Total Installed Cost of Wind Subsystem';\r",
"\t\twind_description = 'See the Hybrid Cost page for the total installed cost of the hybrid system. The total installed cost of the wind subsystem is the sum of the indirect, sales tax, and direct costs. Note that it does not include any financing costs from the Financial Parameters page.';\r",
"\t}\r",
"\telse {\r",
"\t\twind_name = 'Total installed cost';\r",
"\t\twind_description = 'The total installed cost is the sum of the indirect, sales tax, and direct costs. Note that it does not include any financing costs from the Financial Parameters page.';\r",
"\t}\r",
"\tproperty('lblTotalInstalledCostDescription', 'Caption', wind_description );\r",
"\tproperty('grpTotalInstalledCost', 'Caption', wind_name );\r",
"\tproperty('lblTotalInstalledCost', 'Caption', wind_name );\r",
"\thybrid_wind_cost_check();\r",
"};",
"",
"on_change{'install_type'} = define()",
Expand Down Expand Up @@ -3112,6 +3097,39 @@
"\t\tproperty('wind_cost_label', 'Caption', 'You can either enter capital costs yourself using the inputs below, or use the Estimate buttons to automatically populate those inputs using NREL cost models for turbine and balance-of-system capital costs. See Help for details.');",
"\t\trefresh();",
"\t}",
"}\r",
"\r",
"function hybrid_wind_cost_check()\r",
"{\r",
"\ttech = technology();\r",
"\tif ( tech == 'PVWatts Wind Battery Hybrid'\r",
"\t || tech == 'PVWatts Wind FuelCell Battery Hybrid' \r",
"\t || tech == 'Photovoltaic Wind Battery Hybrid' \r",
"\t || tech == 'Generic PVWatts Wind FuelCell Battery Hybrid' ) {\r",
"\t\tshow('btn_est_bos_cost', false);\r",
"\t\tshow('reference_resource_file', false);\r",
"\t\twind_name = 'Total Installed Cost of Wind Subsystem';\r",
"\t\twind_description = 'See the Hybrid Cost page for the total installed cost of the hybrid system. The total installed cost of the wind subsystem is the sum of the indirect, sales tax, and direct costs. Note that it does not include any financing costs from the Financial Parameters page.';\r",
"\t}\r",
"\telse {\r",
"\t\twind_name = 'Total installed cost';\r",
"\t\twind_description = 'The total installed cost is the sum of the indirect, sales tax, and direct costs. Note that it does not include any financing costs from the Financial Parameters page.';\r",
"\t\tshow('btn_est_bos_cost', true);\r",
"\t\tif ( value('wind_resource_model_choice') == 0 )\r",
"\t\t{\r",
"\t\t\tshow('reference_resource_file',true);\r",
"\t\t}\r",
"\t\telse\r",
"\t\t{\r",
"\t\t\tshow('reference_resource_file',false);\r",
"\t\t}\r",
"\t}\r",
"\t\r",
"\tproperty('lblTotalInstalledCostDescription', 'Caption', wind_description );\r",
"\tproperty('grpTotalInstalledCost', 'Caption', wind_name );\r",
"\tproperty('lblTotalInstalledCost', 'Caption', wind_name );\r",
"\t\r",
"\trefresh();\r",
"}"
]
}

0 comments on commit d401762

Please sign in to comment.