Skip to content

Commit

Permalink
added dummy callbacks for ens calibrate/simulate
Browse files Browse the repository at this point in the history
  • Loading branch information
jClugstor committed Nov 8, 2023
1 parent 215c8ea commit 30c3b04
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/SimulationService.jl
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@ function OperationRequest(req::HTTP.Request, route::String)
k == :model_configs ? (o.models = [get_model(m.id) for m in v]) :

# For testing only:
k == :local_model_configuration_file ? (o.model = JSON3.read(v).configuration) :
k == :local_model_file ? (o.model = JSON3.read(v)) :
k == :local_model_files ? (o.models = v) :
k == :local_csv_file ? (o.df = CSV.read(v, DataFrame)) :
nothing
end
Expand Down
8 changes: 8 additions & 0 deletions src/operations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,14 @@ function get_callback(o::OperationRequest, ::Type{Simulate})
DiscreteCallback((args...) -> true, IntermediateResults(o.id,every = Dates.Second(0)))
end

function get_callback(o::OperationRequest, ::Type{Ensemble{Simulate}})
nothing
end

function get_callback(o::OperationRequest, ::Type{Ensemble{Calibrate}})
nothing
end

# callback for Simulate requests
function solve(op::Simulate; callback)
prob = ODEProblem(op.sys, [], op.timespan)
Expand Down
1 change: 0 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ calibrate_payloads = JSON3.write.([

ensemble_simulate_payloads = JSON3.write.([])

ensemble_calibrate_payloads =

#-----------------------------------------------------------------------------# utils
@testset "utils" begin
Expand Down

0 comments on commit 30c3b04

Please sign in to comment.