Skip to content

Commit

Permalink
Adding type info
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnectedSystems committed Dec 1, 2024
1 parent de8af1f commit d90c1e4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/calibration.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ using Distributed, BlackBoxOptim, Serialization


"""Calibrate specified node in network."""
function obj_func(params, climate::Climate, sn::StreamfallNetwork, v_id::Int, calib_data::Array;
function obj_func(params, climate::Climate, sn::StreamfallNetwork, v_id::Int, calib_data::Array;
metric::Function, inflow=nothing, extraction=nothing, exchange=nothing)
return obj_func(params, climate, sn[v_id], calib_data; metric=metric, inflow=inflow, extraction=extraction, exchange=exchange)
end


"""Calibrate current node."""
function obj_func(params, climate::Climate, node::NetworkNode, calib_data::Array;
function obj_func(params, climate::Climate, node::NetworkNode, calib_data::Array;
metric::Function, inflow=nothing, extraction=nothing, exchange=nothing)
update_params!(node, params...)

Expand Down Expand Up @@ -200,13 +200,13 @@ end


"""
calibrate!(sn::StreamfallNetwork, climate::Climate, calib_data;
calibrate!(sn::StreamfallNetwork, climate::Climate, calib_data::DataFrame;
metric::Function=Streamfall.RMSE,
kwargs...)
Calibrate a stream network.
"""
function calibrate!(sn::StreamfallNetwork, climate::Climate, calib_data;
function calibrate!(sn::StreamfallNetwork, climate::Climate, calib_data::DataFrame;
metric::Function=Streamfall.RMSE,
kwargs...)
_, outlets = find_inlets_and_outlets(sn)
Expand Down

0 comments on commit d90c1e4

Please sign in to comment.