Skip to content

Commit 5fd8f1a

Browse files
Fix random tests
1 parent 1af0998 commit 5fd8f1a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/OptimizationNLopt/test/runtests.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ using Test, Random
117117
# @test sol.retcode == ReturnCode.Success
118118
@test 10 * sol.objective < l1
119119

120-
Random.seed!(1)
121-
prob = OptimizationProblem(optprob, rand(2), _p, lcons = [-Inf, -Inf],
120+
prob = OptimizationProblem(optprob, [0.5, 0.5], _p, lcons = [-Inf, -Inf],
122121
ucons = [0.0, 0.0], lb = [-1.0, -1.0], ub = [1.0, 1.0])
123122
sol = solve(prob, NLopt.GN_ISRES(), maxiters = 1000)
124123
@test sol.retcode == ReturnCode.MaxIters

test/diffeqfluxtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using OrdinaryDiffEq, DiffEqFlux, Lux, Optimization, OptimizationOptimJL,
22
OptimizationOptimisers, ForwardDiff, ComponentArrays, Random
33
rng = Random.default_rng()
4+
Random.seed!(123)
45

56
function lotka_volterra!(du, u, p, t)
67
x, y = u

0 commit comments

Comments
 (0)