Skip to content

Commit

Permalink
avoid errors unrelated to model build
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-lara committed May 4, 2024
1 parent dd002dd commit 3c42876
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/operation/operation_model_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function solve_impl!(model::OperationModel)
model_name = get_name(model)
ts = get_current_timestamp(model)
output_dir = get_output_dir(model)
infeasible_opt_path = joinpath(output_dir, "infeasible_$(model_name)_$(ts).json")
infeasible_opt_path = joinpath(output_dir, "infeasible_$(model_name).json")
@error("Serializing Infeasible Problem at $(infeasible_opt_path)")
serialize_optimization_model(container, infeasible_opt_path)
if !get_allow_fails(settings)
Expand Down
3 changes: 2 additions & 1 deletion src/simulation/simulation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,8 @@ end
function _build_decision_models!(sim::Simulation)
TimerOutputs.@timeit BUILD_PROBLEMS_TIMER "Build Decision Problems" begin
decision_models = get_decision_models(get_models(sim))
Threads.@threads for model_n in 1:length(decision_models)
#TODO: Re-enable Threads.@threads with proper implementation of the timer.
for model_n in 1:length(decision_models)
TimerOutputs.@timeit BUILD_PROBLEMS_TIMER "Problem $(get_name(decision_models[model_n]))" begin
_build_single_model_for_simulation(decision_models[model_n], sim, model_n)
end
Expand Down

0 comments on commit 3c42876

Please sign in to comment.