From d90c1e4a55f42e842fa489c7daef6c5524c74561 Mon Sep 17 00:00:00 2001 From: Takuya Iwanaga Date: Sun, 1 Dec 2024 19:23:47 +1100 Subject: [PATCH] Adding type info --- src/calibration.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/calibration.jl b/src/calibration.jl index 4e4cabe0..117eaab8 100644 --- a/src/calibration.jl +++ b/src/calibration.jl @@ -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...) @@ -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)