Skip to content

Commit

Permalink
Remove Random dependency (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
odow authored Mar 25, 2024
1 parent a1bc5dd commit ceb9df8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@ MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
Downloads = "<0.0.1, 1"
Libdl = "<0.0.1, 1.6"
MathOptInterface = "1"
Random = "<0.0.1, 1.6"
Test = "<0.0.1, 1.6"
julia = "1.6"

[extras]
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Random", "Test"]
test = ["Test"]
4 changes: 1 addition & 3 deletions test/test_MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ using Xpress
using Test

import MathOptInterface as MOI
import Random

function runtests()
for name in names(@__MODULE__; all = true)
Expand Down Expand Up @@ -1194,8 +1193,7 @@ function callback_knapsack_model()
x = MOI.add_variables(model, N)
MOI.add_constraints(model, x, MOI.ZeroOne())
MOI.set.(model, MOI.VariablePrimalStart(), x, 0.0)
Random.seed!(1)
item_weights, item_values = rand(N), rand(N)
item_weights, item_values = abs.(cos.(1:N)), abs.(sin.(1:N))
MOI.add_constraint(
model,
MOI.ScalarAffineFunction(MOI.ScalarAffineTerm.(item_weights, x), 0.0),
Expand Down

0 comments on commit ceb9df8

Please sign in to comment.