Skip to content

Commit 81a819b

Browse files
committed
[FIX] test linear program
1 parent 86fdc63 commit 81a819b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/changeprob.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ end
5555
betamin = rand()/2+0.5
5656
n = 100
5757
prob = 1/n*ones(n)
58-
@test (risk_proba(prob, AVaR(betamin), 1:n)'*(n:-1:1) - risk_proba(prob, AVaR(betamax), 1:n)'*(n:-1:1))[1] >= 0.
58+
@test (risk_proba(prob, AVaR(betamin), 1:n)'*(n:-1:1) - risk_proba(prob, AVaR(betamax), 1:n)'*(n:-1:1))[1] >= 0.
5959
end
6060
end
6161

@@ -80,7 +80,7 @@ end
8080

8181
probaAVaR = risk_proba(prob, AVaR(beta), X)
8282

83-
@test abs(probaAVaR'*X - getobjectivevalue(m)) <= EPSILON
83+
@test abs(probaAVaR'*X - getobjectivevalue(m)) <= EPSILON[1]
8484
end
8585

8686
# The convex set of probabilty distributions of AVaR_{beta} is defined by

0 commit comments

Comments
 (0)