Skip to content

Commit

Permalink
Fix a bug in a test
Browse files Browse the repository at this point in the history
  • Loading branch information
ajnebro committed May 20, 2024
1 parent ce0763a commit dfa3fcf
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function positionUpdateWorksProperlyWithASingleParticle()
velocityChangeWhenLowerLimitIsReached = -1.0
velocityChangeWhenUpperLimitIsReached = 0.25
positionBounds = [Bounds{Float64}(-10.0, 10.0), Bounds{Float64}(-15.0, 15.0)]
speed = [[0.5, -0.5]]
speed = [0.5 -0.5]
variables = [2.0, 4.0]

particle = ContinuousSolution{Float64}(copy(variables), [1.5, 2.5], [], Dict(), positionBounds)
Expand All @@ -25,14 +25,14 @@ function positionUpdateWorksProperlyWithASingleParticle()

update(positionUpdate, swarm, speed)

return speed[1] .+ variables == particle.variables
return [2.5, 3.5] == particle.variables
end

function positionUpdateWorksProperlyWithASingleParticleWithPositionsOutOfBounds()
velocityChangeWhenLowerLimitIsReached = -1.0
velocityChangeWhenUpperLimitIsReached = 1
positionBounds = [Bounds{Float64}(-10.0, 10.0), Bounds{Float64}(-15.0, 15.0)]
speed = [[-1.0, 1.0]]
speed = [-1.0 1.0]
variables = [-9.5, 14.5]

particle = ContinuousSolution{Float64}(copy(variables), [1.5, 2.5], [], Dict(), positionBounds)
Expand Down

0 comments on commit dfa3fcf

Please sign in to comment.