Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ PenaltyFunctions = "0.3"
PreallocationTools = "0.4.34, 1.0"
Random = "1"
RecursiveArrayTools = "3.50, 4"
SafeTestsets = "0.1, 1"
SciMLBase = "2.153, 3"
SciMLSensitivity = "7.80"
SciMLTesting = "1"
SteadyStateDiffEq = "2"
Statistics = "1.10"
StatsAPI = "1.8.0"
Expand All @@ -63,14 +65,15 @@ OptimizationBBO = "3e6eede4-6085-4f62-9a71-46d9bc1eb92b"
OptimizationNLopt = "4e6fcdb7-1186-4e1f-a706-475e75c168bb"
OptimizationOptimJL = "36348300-93cb-4f02-beb5-3c3902f8871e"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
SciMLSensitivity = "1ed8b502-d754-442c-8d5d-10ac956f44a1"
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
SteadyStateDiffEq = "9672c7b4-1e72-59bd-8a11-6ac3964bc41f"
StochasticDiffEq = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0"
Sundials = "c3572dad-4567-51f8-b174-8c6c989267f4"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[targets]
test = ["Test", "ExplicitImports", "BlackBoxOptim", "DelayDiffEq", "ForwardDiff", "Logging", "NLopt", "Optim", "Optimization", "OptimizationBBO", "OptimizationNLopt", "OptimizationOptimJL", "OrdinaryDiffEq", "Pkg", "Random", "SciMLSensitivity", "StochasticDiffEq", "SteadyStateDiffEq", "Sundials", "Zygote"]
test = ["Test", "ExplicitImports", "BlackBoxOptim", "DelayDiffEq", "ForwardDiff", "Logging", "NLopt", "Optim", "Optimization", "OptimizationBBO", "OptimizationNLopt", "OptimizationOptimJL", "OrdinaryDiffEq", "Random", "SafeTestsets", "SciMLSensitivity", "SciMLTesting", "StochasticDiffEq", "SteadyStateDiffEq", "Sundials", "Zygote"]
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using DiffEqParamEstim, OrdinaryDiffEq
using Optimization, OptimizationBBO, Logging
include(joinpath(@__DIR__, "shared", "test_problems.jl"))

prob1.u0 .= [1.0, 1.0]
prob2.u0 .= [1.0, 1.0]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
using DiffEqParamEstim, OrdinaryDiffEq
using Optim
include(joinpath(@__DIR__, "shared", "test_problems.jl"))

weight = 1.0e-6

cost_function = build_loss_objective(
Expand Down
2 changes: 2 additions & 0 deletions test/tests_on_odes/l2loss_test.jl → test/l2loss_test.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using DiffEqParamEstim, OrdinaryDiffEq
using Optimization, OptimizationBBO, Optim, Logging
include(joinpath(@__DIR__, "shared", "test_problems.jl"))

cost_function = build_loss_objective(
prob1, Tsit5(), L2Loss(t, data),
Expand Down
4 changes: 3 additions & 1 deletion test/tests_on_odes/nlopt_test.jl → test/nlopt_test.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using OptimizationNLopt, Zygote
using DiffEqParamEstim, OrdinaryDiffEq
using Optimization, OptimizationNLopt, Zygote
include(joinpath(@__DIR__, "shared", "test_problems.jl"))

println("Use NLOpt to fit the parameter")

Expand Down
2 changes: 2 additions & 0 deletions test/tests_on_odes/optim_test.jl → test/optim_test.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using DiffEqParamEstim, OrdinaryDiffEq
using Optim, Random
include(joinpath(@__DIR__, "shared", "test_problems.jl"))
obj = build_loss_objective(
prob1, Tsit5(), L2Loss(t, data),
maxiters = 10000
Expand Down
4 changes: 4 additions & 0 deletions test/qa/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
DiffEqParamEstim = "1130ab10-4a5a-5621-a13d-e4788d82bd4c"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[sources]
Expand All @@ -10,5 +12,7 @@ DiffEqParamEstim = {path = "../.."}
[compat]
Aqua = "0.8"
JET = "0.9,0.10,0.11"
SafeTestsets = "0.1, 1"
SciMLTesting = "1"
Test = "1"
julia = "1.10"
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using PenaltyFunctions, OptimizationOptimJL, LinearAlgebra, SciMLSensitivity
using DiffEqParamEstim, OrdinaryDiffEq
using Optimization, PenaltyFunctions, OptimizationOptimJL, LinearAlgebra, SciMLSensitivity
include(joinpath(@__DIR__, "shared", "test_problems.jl"))

cost_function_1 = build_loss_objective(
prob1, Tsit5(), L2Loss(t, data),
Expand Down
52 changes: 2 additions & 50 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,50 +1,2 @@
using Pkg
using DiffEqParamEstim, Test

const GROUP = get(ENV, "GROUP", "All")

if GROUP == "QA"
Pkg.activate("qa")
Pkg.develop(PackageSpec(path = dirname(@__DIR__)))
Pkg.instantiate()
include("qa/qa.jl")
else
@time @testset "Explicit Imports" begin
include("explicit_imports.jl")
end

@time @testset "Tests on ODEs" begin
include("tests_on_odes/test_problems.jl")
include("tests_on_odes/l2loss_test.jl")
include("tests_on_odes/optim_test.jl")
include("tests_on_odes/nlopt_test.jl")
include("tests_on_odes/two_stage_method_test.jl")
include("tests_on_odes/blackboxoptim_test.jl")
include("tests_on_odes/regularization_test.jl")
include("tests_on_odes/weighted_loss_test.jl")
include("tests_on_odes/l2_colloc_grad_test.jl")
#include("tests_on_odes/genetic_algorithm_test.jl") # Not updated to v0.6
end

@time @testset "Multiple Shooting Objective" begin
include("multiple_shooting_objective_test.jl")
end
@time @testset "Likelihood Loss" begin
include("likelihood.jl")
end
@time @testset "Out-of-place ODE Tests" begin
include("out_of_place_odes.jl")
end
@time @testset "Steady State Tests" begin
include("steady_state_tests.jl")
end
@time @testset "DAE Tests" begin
include("dae_tests.jl")
end
@time @testset "DDE Tests" begin
include("dde_tests.jl")
end
@time @testset "Test on Monte" begin
include("test_on_monte.jl")
end
end
using SciMLTesting
run_tests()
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Optim, NLopt, OptimizationOptimJL
using DiffEqParamEstim, OrdinaryDiffEq
using Optimization, OptimizationNLopt, Optim, NLopt, OptimizationOptimJL
include(joinpath(@__DIR__, "shared", "test_problems.jl"))

println("Use Two Stage Method to fit the parameter")

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using DiffEqParamEstim, OrdinaryDiffEq
using Distributions, RecursiveArrayTools, NLopt, Random
include(joinpath(@__DIR__, "shared", "test_problems.jl"))
Random.seed!(123)

original_solution = VectorOfArray([(sol(t[i])) for i in 1:length(t)])
Expand Down
Loading