Skip to content

Commit

Permalink
Fix random tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaibhavdixit02 committed Sep 20, 2024
1 parent 1af0998 commit 3307b06
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/pages.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pages = ["index.md",
"tutorials/linearandinteger.md",
"tutorials/minibatch.md",
"tutorials/remakecomposition.md",
"tutorials/symbolic.md",
"tutorials/symbolic.md"
],
"Examples" => [
"examples/rosenbrock.md"
Expand Down Expand Up @@ -41,6 +41,6 @@ pages = ["index.md",
"Polyalgorithms.jl" => "optimization_packages/polyopt.md",
"PRIMA.jl" => "optimization_packages/prima.md",
"QuadDIRECT.jl" => "optimization_packages/quaddirect.md",
"SpeedMapping.jl" => "optimization_packages/speedmapping.md",
"SpeedMapping.jl" => "optimization_packages/speedmapping.md"
]
]
3 changes: 1 addition & 2 deletions lib/OptimizationNLopt/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ using Test, Random
# @test sol.retcode == ReturnCode.Success
@test 10 * sol.objective < l1

Random.seed!(1)
prob = OptimizationProblem(optprob, rand(2), _p, lcons = [-Inf, -Inf],
prob = OptimizationProblem(optprob, [0.5, 0.5], _p, lcons = [-Inf, -Inf],
ucons = [0.0, 0.0], lb = [-1.0, -1.0], ub = [1.0, 1.0])
sol = solve(prob, NLopt.GN_ISRES(), maxiters = 1000)
@test sol.retcode == ReturnCode.MaxIters
Expand Down
1 change: 1 addition & 0 deletions test/diffeqfluxtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using OrdinaryDiffEq, DiffEqFlux, Lux, Optimization, OptimizationOptimJL,
OptimizationOptimisers, ForwardDiff, ComponentArrays, Random
rng = Random.default_rng()
Random.seed!(123)

function lotka_volterra!(du, u, p, t)
x, y = u
Expand Down

0 comments on commit 3307b06

Please sign in to comment.