Skip to content

Commit fdecff0

Browse files
Merge pull request #112 from bhalonen/tests_passing_fixes
Tests passing fixes
2 parents 47ea61c + aced008 commit fdecff0

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ ParameterizedFunctions = "65888b18-ceab-5e60-b2b9-181511a3b968"
2929
StochasticDiffEq = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0"
3030
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
3131

32-
[target]
32+
[targets]
3333
test = ["Test", "BlackBoxOptim", "DelayDiffEq", "LeastSquaresOptim", "NLopt", "Optim", "OrdinaryDiffEq", "ParameterizedFunctions", "StochasticDiffEq"]

src/cost_functions.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ function (f::L2Loss)(sol::DiffEqBase.DESolution)
3939
colloc_grad = f.colloc_grad
4040
dudt = f.dudt
4141

42-
if sol_tmp isa DiffEqBase.AbstractEnsembleSolution
43-
failure = any((s.retcode != :Success for s in sol_tmp)) && any((s.retcode != :Terminated for s in sol_tmp))
42+
if sol isa DiffEqBase.AbstractEnsembleSolution
43+
failure = any((s.retcode != :Success for s in sol)) && any((s.retcode != :Terminated for s in sol))
4444
else
45-
failure = sol_tmp.retcode != :Success && sol_tmp != :Terminated
45+
failure = sol.retcode != :Success && sol != :Terminated
4646
end
4747
failure && return Inf
4848

@@ -127,10 +127,10 @@ LogLikeLoss(t,data_distributions,diff_distributions) = LogLikeLoss(t,matrixize(d
127127

128128
function (f::LogLikeLoss)(sol::DESolution)
129129
distributions = f.data_distributions
130-
if sol_tmp isa DiffEqBase.AbstractEnsembleSolution
131-
failure = any((s.retcode != :Success for s in sol_tmp)) && any((s.retcode != :Terminated for s in sol_tmp))
130+
if sol isa DiffEqBase.AbstractEnsembleSolution
131+
failure = any((s.retcode != :Success for s in sol)) && any((s.retcode != :Terminated for s in sol))
132132
else
133-
failure = sol_tmp.retcode != :Success && sol_tmp != :Terminated
133+
failure = sol.retcode != :Success && sol != :Terminated
134134
end
135135
failure && return Inf
136136
ll = 0.0

0 commit comments

Comments
 (0)