Skip to content

Commit

Permalink
different way of specifying json & csv. Maybe this is cleaner?
Browse files Browse the repository at this point in the history
  • Loading branch information
vtnate committed Jan 16, 2024
1 parent c3e681a commit 8fcf9df
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,8 @@ desc 'Clear Chilled Water Storage Scenario'
task :clear_chilled_water_storage, [:json, :csv] do |t, args|
puts 'Clearing Chilled Water Storage Scenario...'

json = args[:json]
csv = args[:csv]
json = 'example_project_combined.json' if json.nil?
csv = 'chilled_water_storage_scenario.csv' if csv.nil?
json = args[:json] or 'example_project_combined.json'
csv = args[:csv] or 'chilled_water_storage_scenario.csv'

chilled_water_storage_scenario(json, csv).clear
end
Expand All @@ -357,10 +355,8 @@ desc 'Run Chilled Water Storage Scenario'
task :run_chilled_water_storage, [:json, :csv] do |t, args|
puts 'Running Chilled Water Storage Scenario...'

json = args[:json]
csv = args[:csv]
json = 'example_project_combined.json' if json.nil?
csv = 'chilled_water_storage_scenario.csv' if csv.nil?
json = args[:json] or 'example_project_combined.json'
csv = args[:csv] or 'chilled_water_storage_scenario.csv'

configure_project

Expand All @@ -372,10 +368,8 @@ desc 'Post Process Chilled Water Storage Scenario'
task :post_process_chilled_water_storage, [:json, :csv] do |t, args|
puts 'Post Processing Chilled Water Storage Scenario...'

json = args[:json]
csv = args[:csv]
json = 'example_project_combined.json' if json.nil?
csv = 'chilled_water_storage_scenario.csv' if csv.nil?
json = args[:json] or 'example_project_combined.json'
csv = args[:csv] or 'chilled_water_storage_scenario.csv'

default_post_processor = URBANopt::Scenario::ScenarioDefaultPostProcessor.new(chilled_water_storage_scenario(json, csv))
scenario_result = default_post_processor.run
Expand Down

0 comments on commit 8fcf9df

Please sign in to comment.