Skip to content

Commit

Permalink
Remove try-catch around GhpGhx.jl call
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill-Becker committed Sep 28, 2023
1 parent a192617 commit 5bd94bc
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/core/scenario.jl
Original file line number Diff line number Diff line change
Expand Up @@ -540,20 +540,20 @@ function Scenario(d::Dict; flex_hvac_from_json=false)
end

ghpghx_results = Dict()
try
# Call GhpGhx.jl to size GHP and GHX
@info "Starting GhpGhx.jl"
# Call GhpGhx.jl to size GHP and GHX
results, inputs_params = GhpGhx.ghp_model(ghpghx_inputs)
# Create a dictionary of the results data needed for REopt
ghpghx_results = GhpGhx.get_results_for_reopt(results, inputs_params)
@info "GhpGhx.jl model solved" #with status $(results["status"])."
catch e
@info e
throw(@error("The GhpGhx package was not added (add https://github.com/NREL/GhpGhx.jl) or
loaded (using GhpGhx) to the active Julia environment, or an error occurred during the call
to the GhpGhx.jl package."))
end
# try
# Call GhpGhx.jl to size GHP and GHX
@info "Starting GhpGhx.jl"
# Call GhpGhx.jl to size GHP and GHX
results, inputs_params = GhpGhx.ghp_model(ghpghx_inputs)
# Create a dictionary of the results data needed for REopt
ghpghx_results = GhpGhx.get_results_for_reopt(results, inputs_params)
@info "GhpGhx.jl model solved" #with status $(results["status"])."
# catch e
# @info e
# throw(@error("The GhpGhx package was not added (add https://github.com/NREL/GhpGhx.jl) or
# loaded (using GhpGhx) to the active Julia environment, or an error occurred during the call
# to the GhpGhx.jl package."))
# end

ghpghx_response = Dict([("inputs", ghpghx_inputs), ("outputs", ghpghx_results)])
ghp_inputs_removed_ghpghx_params = deepcopy(d["GHP"])
Expand Down

0 comments on commit 5bd94bc

Please sign in to comment.