-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathMOI_wrapper.jl
545 lines (507 loc) · 18.4 KB
/
MOI_wrapper.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
# Copyright (c) 2019 Mathieu Besançon, Oscar Dowson, and contributors
#
# Use of this source code is governed by an MIT-style license that can be found
# in the LICENSE.md file or at https://opensource.org/licenses/MIT.
module TestMOIHighs
import HiGHS
using Test
const MOI = HiGHS.MOI
function runtests()
for name in names(@__MODULE__; all = true)
if startswith("$name", "test_")
@testset "$name" begin
getfield(@__MODULE__, name)()
end
end
end
return
end
const _EXPLICIT_METHOD_FAILURES = [
"test_objective_qp_ObjectiveFunction_edge_cases",
"test_objective_qp_ObjectiveFunction_zero_ofdiag",
"test_quadratic_duplicate_terms",
"test_quadratic_integration",
"test_quadratic_nonhomogeneous",
"test_linear_Semicontinuous_integration",
"test_linear_Semiinteger_integration",
]
function test_runtests()
model = MOI.Bridges.full_bridge_optimizer(HiGHS.Optimizer(), Float64)
MOI.set(model, MOI.Silent(), true)
# Slightly loosen tolerances, particularly for QP tests
MOI.Test.runtests(model, MOI.Test.Config(; atol = 1e-7))
return
end
function test_runtests_cache()
model = MOI.Bridges.full_bridge_optimizer(
MOI.Utilities.CachingOptimizer(
MOI.Utilities.UniversalFallback(MOI.Utilities.Model{Float64}()),
HiGHS.Optimizer(),
),
Float64,
)
MOI.set(model, MOI.Silent(), true)
# Slightly loosen tolerances, particularly for QP tests
MOI.Test.runtests(model, MOI.Test.Config(; atol = 1e-7))
return
end
function test_runtests_simplex()
model = MOI.Bridges.full_bridge_optimizer(HiGHS.Optimizer(), Float64)
MOI.set(model, MOI.Silent(), true)
MOI.set(model, MOI.RawOptimizerAttribute("solver"), "simplex")
for presolve in ("on", "off")
MOI.set(model, MOI.RawOptimizerAttribute("presolve"), presolve)
MOI.Test.runtests(
model,
MOI.Test.Config();
exclude = _EXPLICIT_METHOD_FAILURES,
)
end
return
end
function test_runtests_ipm()
model = MOI.Bridges.full_bridge_optimizer(HiGHS.Optimizer(), Float64)
MOI.set(model, MOI.Silent(), true)
MOI.set(model, MOI.RawOptimizerAttribute("solver"), "ipm")
MOI.Test.runtests(
model,
MOI.Test.Config();
exclude = _EXPLICIT_METHOD_FAILURES,
)
return
end
function test_runtests_ipm_no_presolve()
model = MOI.Bridges.full_bridge_optimizer(HiGHS.Optimizer(), Float64)
MOI.set(model, MOI.Silent(), true)
MOI.set(model, MOI.RawOptimizerAttribute("solver"), "ipm")
MOI.set(model, MOI.RawOptimizerAttribute("presolve"), "off")
MOI.Test.runtests(
model,
MOI.Test.Config(),
exclude = String[
# Termination status is OTHER_ERROR
"test_conic_linear_INFEASIBLE",
"test_conic_linear_INFEASIBLE_2",
_EXPLICIT_METHOD_FAILURES...,
],
)
return
end
function test_SolverName()
@test MOI.get(HiGHS.Optimizer(), MOI.SolverName()) == "HiGHS"
return
end
function test_attributes()
model = HiGHS.Optimizer()
@test MOI.get(model, MOI.SolverName()) == "HiGHS"
@test MOI.get(model, MOI.TimeLimitSec()) === nothing
MOI.set(model, MOI.TimeLimitSec(), 500)
@test MOI.get(model, MOI.TimeLimitSec()) == 500.0
@test MOI.get(model, MOI.RawSolver()) == model
return
end
function test_MOI_variable_count_and_empty()
model = HiGHS.Optimizer()
@test MOI.get(model, MOI.NumberOfVariables()) == 0
x1 = MOI.add_variable(model)
@test MOI.get(model, MOI.NumberOfVariables()) == 1
@test MOI.supports_constraint(
model,
MOI.VariableIndex,
MOI.Interval{Float64},
)
x2, _ = MOI.add_constrained_variable(model, MOI.Interval(0.0, 1.0))
@test MOI.get(model, MOI.NumberOfVariables()) == 2
MOI.empty!(model)
@test MOI.get(model, MOI.NumberOfVariables()) == 0
end
function test_HiGHS_custom_options()
model = HiGHS.Optimizer()
@test MOI.supports(model, MOI.RawOptimizerAttribute("solver"))
@test MOI.get(model, MOI.RawOptimizerAttribute("solver")) == "choose"
MOI.set(model, MOI.RawOptimizerAttribute("solver"), "simplex")
@test MOI.get(model, MOI.RawOptimizerAttribute("solver")) == "simplex"
@test MOI.get(model, MOI.RawOptimizerAttribute("output_flag")) == true
MOI.set(model, MOI.RawOptimizerAttribute("output_flag"), false)
@test MOI.get(model, MOI.RawOptimizerAttribute("output_flag")) == false
@test MOI.get(model, MOI.RawOptimizerAttribute("time_limit")) > 1000
MOI.set(model, MOI.RawOptimizerAttribute("time_limit"), 1000.0)
@test MOI.get(model, MOI.RawOptimizerAttribute("time_limit")) == 1000.0
# unsupported test
@test MOI.supports(model, MOI.RawOptimizerAttribute("wrong_param")) == false
@test_throws(
MOI.UnsupportedAttribute,
MOI.get(model, MOI.RawOptimizerAttribute("wrong_param")),
)
for v in [false, 1, 1.0, "A"]
@test_throws(
MOI.UnsupportedAttribute,
MOI.set(model, MOI.RawOptimizerAttribute("wrong_param"), v)
)
end
return
end
function test_show()
model = HiGHS.Optimizer()
@test sprint(show, model) == "A HiGHS model with 0 columns and 0 rows."
return
end
function test_options()
model = HiGHS.Optimizer()
options = [
"write_solution_to_file", # Bool
"simplex_strategy", # Cint
"time_limit", # Cdouble
"presolve", # String
]
for key in options
v = MOI.get(model, MOI.RawOptimizerAttribute(key))
MOI.set(model, MOI.RawOptimizerAttribute(key), v)
v2 = MOI.get(model, MOI.RawOptimizerAttribute(key))
@test v == v2
end
return
end
function test_option_invalid()
model = HiGHS.Optimizer()
@test_throws(
ErrorException(
"Encountered an error in HiGHS: Check the log for details.",
),
MOI.set(model, MOI.RawOptimizerAttribute("time_limit"), -1.0),
)
return
end
function test_option_unknown_option()
model = HiGHS.Optimizer()
param = MOI.RawOptimizerAttribute("write_solution_to_file")
err = MOI.SetAttributeNotAllowed(
param,
"\n\nInvalid value `1::Int64` for option \"write_solution_to_file\", expected a value of type `Bool`.\n\n",
)
@test_throws(err, MOI.set(model, param, 1))
param = MOI.RawOptimizerAttribute("simplex_strategy")
err = MOI.SetAttributeNotAllowed(
param,
"\n\nInvalid value `on::String` for option \"simplex_strategy\", expected a value of type `Integer`.\n\n",
)
@test_throws(err, MOI.set(model, param, "on"))
param = MOI.RawOptimizerAttribute("time_limit")
err = MOI.SetAttributeNotAllowed(
param,
"\n\nInvalid value `1::Int64` for option \"time_limit\", expected a value of type `AbstractFloat`.\n\n",
)
@test_throws err MOI.set(model, param, 1)
param = MOI.RawOptimizerAttribute("presolve")
err = MOI.SetAttributeNotAllowed(
param,
"\n\nInvalid value `1::Int64` for option \"presolve\", expected a value of type `String`.\n\n",
)
@test_throws err MOI.set(model, param, 1)
return
end
function test_copy_to()
src = MOI.Utilities.Model{Float64}()
MOI.Utilities.loadfromstring!(
src,
"""
variables: w, x, y, z
minobjective: w + x + y + z
c1: w <= 1.0
c2: w >= 0.5
c3: x in MathOptInterface.Interval(1.0, 2.0)
c4: y == 2.0
c5: y + z >= 4.5
c6: x + y <= 3.0
c7: w + x == 1.5
c8: w + x in MathOptInterface.Interval(1.0, 2.0)
""",
)
dest = HiGHS.Optimizer()
MOI.copy_to(dest, src)
@test MOI.get(dest, MOI.NumberOfVariables()) == 4
list = MOI.get(dest, MOI.ListOfConstraintTypesPresent())
@test length(list) == 8
for S in (
MOI.GreaterThan{Float64},
MOI.LessThan{Float64},
MOI.EqualTo{Float64},
MOI.Interval{Float64},
)
@test (MOI.VariableIndex, S) in list
@test (MOI.ScalarAffineFunction{Float64}, S) in list
end
MOI.optimize!(dest)
@test MOI.get(dest, MOI.ObjectiveValue()) == 0.5 + 1.0 + 2.0 + 2.5
return
end
function _knapsack_model(; mip::Bool, solver::String)
model = HiGHS.Optimizer()
MOI.set(model, MOI.RawOptimizerAttribute("presolve"), "off")
MOI.set(model, MOI.RawOptimizerAttribute("solver"), solver)
N = 30
x = MOI.add_variables(model, N)
if mip
MOI.add_constraints(model, x, MOI.ZeroOne())
end
item_weights, item_values = rand(N), rand(N)
MOI.add_constraint(
model,
MOI.ScalarAffineFunction(MOI.ScalarAffineTerm.(item_weights, x), 0.0),
MOI.LessThan(10.0),
)
MOI.set(
model,
MOI.ObjectiveFunction{MOI.ScalarAffineFunction{Float64}}(),
MOI.ScalarAffineFunction(MOI.ScalarAffineTerm.(item_values, x), 0.0),
)
MOI.set(model, MOI.ObjectiveSense(), MOI.MAX_SENSE)
return model
end
function test_RelativeGap()
model = _knapsack_model(mip = true, solver = "choose")
MOI.optimize!(model)
@test 0 <= MOI.get(model, MOI.RelativeGap()) <= 1e-4
return
end
function test_SimplexIterations_BarrierIterations()
model = _knapsack_model(mip = false, solver = "simplex")
@test MOI.get(model, MOI.SimplexIterations()) == 0
@test MOI.get(model, MOI.BarrierIterations()) == 0
MOI.optimize!(model)
@test MOI.get(model, MOI.SimplexIterations()) > 0
@test MOI.get(model, MOI.BarrierIterations()) == 0
model = _knapsack_model(mip = false, solver = "ipm")
MOI.optimize!(model)
# Not == 0 because HiGHS will use Simplex to clean-up occasionally
@test MOI.get(model, MOI.SimplexIterations()) >= 0
@test MOI.get(model, MOI.BarrierIterations()) > 0
end
function test_NodeCount()
model = _knapsack_model(mip = true, solver = "choose")
@test MOI.get(model, MOI.NodeCount()) == 0
MOI.optimize!(model)
@test MOI.get(model, MOI.NodeCount()) > 0
return
end
function test_option_nothing()
model = HiGHS.Optimizer()
@test_throws(
MOI.SetAttributeNotAllowed,
MOI.set(model, MOI.RawOptimizerAttribute("presolve"), nothing),
)
return
end
function test_copy_to_names()
dest = HiGHS.Optimizer()
src = MOI.Utilities.Model{Float64}()
MOI.Utilities.loadfromstring!(src, "variables: x\nc: 2.0 * x <= 1.0")
_ = MOI.copy_to(dest, src)
@test MOI.get(dest, MOI.VariableIndex, "x") isa MOI.VariableIndex
F, S = MOI.ScalarAffineFunction{Float64}, MOI.LessThan{Float64}
@test MOI.get(dest, MOI.ConstraintIndex, "c") isa MOI.ConstraintIndex{F,S}
return
end
function test_copy_to_sets()
for (s_set, set) in [
"Semicontinuous(1.0, 2.0)" => MOI.Semicontinuous(1.0, 2.0),
"Semiinteger(2.0, 3.0)" => MOI.Semiinteger(2.0, 3.0),
"ZeroOne()" => MOI.ZeroOne(),
"Integer()" => MOI.Integer(),
]
dest = HiGHS.Optimizer()
src = MOI.Utilities.Model{Float64}()
MOI.Utilities.loadfromstring!(src, "variables: x\nc: x in $s_set")
_ = MOI.copy_to(dest, src)
x = MOI.get(dest, MOI.VariableIndex, "x")
ci = MOI.ConstraintIndex{MOI.VariableIndex,typeof(set)}(x.value)
@test MOI.get(dest, MOI.ConstraintSet(), ci) == set
@test MOI.get(dest, MOI.ListOfConstraintTypesPresent()) ==
[(MOI.VariableIndex, typeof(set))]
if set isa MOI.Semicontinuous || set isa MOI.Semiinteger
@test_throws(
MOI.UpperBoundAlreadySet{typeof(set),MOI.LessThan{Float64}},
MOI.add_constraint(dest, x, MOI.LessThan(1.0)),
)
@test_throws(
MOI.LowerBoundAlreadySet{typeof(set),MOI.GreaterThan{Float64}},
MOI.add_constraint(dest, x, MOI.GreaterThan(1.0)),
)
end
end
return
end
function test_delete_vector()
model = HiGHS.Optimizer()
MOI.set(model, MOI.Silent(), true)
x = MOI.add_variables(model, 5)
MOI.add_constraint.(model, x, MOI.GreaterThan(0.0))
c = MOI.add_constraint.(model, 1.0 .* x, MOI.GreaterThan.(1.0:5.0))
MOI.set(model, MOI.ObjectiveSense(), MOI.MIN_SENSE)
f = sum(Float64(i) * x[i] for i in 1:5)
MOI.set(model, MOI.ObjectiveFunction{typeof(f)}(), f)
F, S = MOI.ScalarAffineFunction{Float64}, MOI.GreaterThan{Float64}
@test MOI.get(model, MOI.NumberOfConstraints{F,S}()) == 5
MOI.delete(model, c)
@test MOI.get(model, MOI.NumberOfConstraints{F,S}()) == 0
c = MOI.add_constraint.(model, 1.0 .* x, MOI.GreaterThan.(1.0:5.0))
MOI.delete(model, [c[2], c[4]])
@test MOI.get(model, MOI.NumberOfConstraints{F,S}()) == 3
MOI.optimize!(model)
@test MOI.get(model, MOI.ObjectiveValue()) ≈ 1^2 + 3^2 + 5^2
MOI.set.(model, MOI.ConstraintSet(), c[1:2:5], MOI.GreaterThan(1.0))
MOI.optimize!(model)
@test MOI.get(model, MOI.ObjectiveValue()) ≈ 1 + 3 + 5
return
end
function test_option_type()
for x in ["1", 1.0, 1, true]
k = HiGHS._highs_option_type(x)
T = HiGHS._type_for_highs_option(k)
@test x isa T
end
end
function test_quadratic_sets_objective()
model = HiGHS.Optimizer()
MOI.Utilities.loadfromstring!(
model,
"""
variables: x
minobjective: 1.0 * x * x
""",
)
attr = MOI.ObjectiveFunction{MOI.ScalarQuadraticFunction{Float64}}()
@test attr in MOI.get(model, MOI.ListOfModelAttributesSet())
return
end
function test_dual_issue_157()
model = HiGHS.Optimizer()
x, y = MOI.add_variables(model, 2)
MOI.set(model, MOI.ObjectiveSense(), MOI.MIN_SENSE)
f = 2.0 * x * x + 1.0 * x * y + 1.0 * y * y + x + y
MOI.set(model, MOI.ObjectiveFunction{typeof(f)}(), f)
c = MOI.add_constraint(model, 1.0 * x + y, MOI.LessThan(-1.0))
MOI.optimize!(model)
@test ≈(MOI.get(model, MOI.ConstraintDual(), c), -0.75; atol = 1e-4)
@test_throws(
MOI.GetAttributeNotAllowed,
MOI.get(model, MOI.ConstraintBasisStatus(), c),
)
@test_throws(
MOI.GetAttributeNotAllowed,
MOI.get(model, MOI.VariableBasisStatus(), x),
)
return
end
function test_attribute_TimeLimitSec()
model = HiGHS.Optimizer()
@test MOI.supports(model, MOI.TimeLimitSec())
@test MOI.get(model, MOI.TimeLimitSec()) === nothing
MOI.set(model, MOI.TimeLimitSec(), 0.0)
@test MOI.get(model, MOI.TimeLimitSec()) == 0.0
MOI.set(model, MOI.TimeLimitSec(), nothing)
@test MOI.get(model, MOI.TimeLimitSec()) === nothing
MOI.set(model, MOI.TimeLimitSec(), 1.0)
@test MOI.get(model, MOI.TimeLimitSec()) == 1.0
return
end
function test_copy_to_bug_172()
model = MOI.Utilities.Model{Float64}()
x = MOI.add_variable(model)
F = MOI.ScalarAffineFunction{Float64}
c1 = MOI.add_constraint(model, 2.0 * x, MOI.GreaterThan(0.0))
c2 = MOI.add_constraint(model, zero(F), MOI.GreaterThan(0.0))
c3 = MOI.add_constraint(model, 1.0 * x, MOI.EqualTo(1.0))
h = HiGHS.Optimizer()
MOI.set(h, MOI.Silent(), true)
index_map = MOI.copy_to(h, model)
y = index_map[x]
@test MOI.get(h, MOI.ConstraintFunction(), index_map[c1]) ≈ 2.0 * y
@test MOI.get(h, MOI.ConstraintFunction(), index_map[c2]) ≈ zero(F)
@test MOI.get(h, MOI.ConstraintFunction(), index_map[c3]) ≈ 1.0 * y
@test MOI.get(h, MOI.ConstraintSet(), index_map[c1]) == MOI.GreaterThan(0.0)
@test MOI.get(h, MOI.ConstraintSet(), index_map[c2]) == MOI.GreaterThan(0.0)
@test MOI.get(h, MOI.ConstraintSet(), index_map[c3]) == MOI.EqualTo(1.0)
MOI.optimize!(h)
@test MOI.get(h, MOI.TerminationStatus()) == MOI.OPTIMAL
return
end
function test_relax_integrality_after_solve()
model = HiGHS.Optimizer()
MOI.set(model, MOI.Silent(), true)
x = MOI.add_variable(model)
MOI.add_constraint(model, x, MOI.LessThan(2.0))
c = MOI.add_constraint(model, x, MOI.ZeroOne())
MOI.set(model, MOI.ObjectiveSense(), MOI.MAX_SENSE)
f = 1.0 * x
MOI.set(model, MOI.ObjectiveFunction{typeof(f)}(), f)
MOI.optimize!(model)
@test ≈(MOI.get(model, MOI.VariablePrimal(), x), 1.0; atol = 1e-6)
MOI.delete(model, c)
MOI.optimize!(model)
@test ≈(MOI.get(model, MOI.VariablePrimal(), x), 2.0; atol = 1e-6)
return
end
function test_quadratic_modification_from_affine()
model = HiGHS.Optimizer()
MOI.set(model, MOI.Silent(), true)
x = MOI.add_variable(model)
MOI.add_constraint(model, x, MOI.GreaterThan(2.0))
f = 2.0 * x + 1.0
attr = MOI.ObjectiveFunction{typeof(f)}()
MOI.set(model, attr, f)
MOI.optimize!(model)
@test isapprox(MOI.get(model, MOI.ObjectiveValue()), 5, atol = 1e-5)
F = MOI.ScalarQuadraticFunction{Float64}
attr = MOI.ObjectiveFunction{F}()
MOI.modify(model, attr, MOI.ScalarQuadraticCoefficientChange(x, x, 3.0))
MOI.optimize!(model)
@test isapprox(MOI.get(model, MOI.ObjectiveValue()), 11, atol = 1e-5)
return
end
function test_quadratic_off_diagonal_modification()
model = HiGHS.Optimizer()
MOI.set(model, MOI.Silent(), true)
x = MOI.add_variables(model, 2)
MOI.add_constraint.(model, x, MOI.GreaterThan.([2.0, 3.0]))
f = 4.0 * x[1] * x[1] + 2.0 * x[1] * x[2] + 2.0 * x[2] * x[2]
attr = MOI.ObjectiveFunction{typeof(f)}()
MOI.set(model, attr, f)
MOI.optimize!(model)
a = MOI.get(model, MOI.VariablePrimal(), x)
y = 0.5 * a' * [8 2; 2 4] * a
@test isapprox(MOI.get(model, MOI.ObjectiveValue()), y, atol = 1e-5)
MOI.modify(
model,
attr,
MOI.ScalarQuadraticCoefficientChange(x[1], x[2], -1.0),
)
MOI.optimize!(model)
a = MOI.get(model, MOI.VariablePrimal(), x)
y = 0.5 * a' * [8 -1; -1 4] * a
@test isapprox(MOI.get(model, MOI.ObjectiveValue()), y, atol = 1e-5)
return
end
function test_quadratic_diagonal_modification()
model = HiGHS.Optimizer()
MOI.set(model, MOI.Silent(), true)
x = MOI.add_variable(model)
MOI.add_constraint(model, x, MOI.GreaterThan(2.0))
f = 3.0 * x * x + 2.0 * x + 1.0
attr = MOI.ObjectiveFunction{typeof(f)}()
MOI.set(model, attr, f)
MOI.optimize!(model)
@test isapprox(MOI.get(model, MOI.ObjectiveValue()), 17, atol = 1e-5)
MOI.modify(model, attr, MOI.ScalarConstantChange(2.0))
MOI.optimize!(model)
@test isapprox(MOI.get(model, MOI.ObjectiveValue()), 18, atol = 1e-5)
MOI.modify(model, attr, MOI.ScalarCoefficientChange(x, 3.0))
MOI.optimize!(model)
@test isapprox(MOI.get(model, MOI.ObjectiveValue()), 20, atol = 1e-5)
MOI.modify(model, attr, MOI.ScalarQuadraticCoefficientChange(x, x, 8.0))
MOI.optimize!(model)
@test isapprox(MOI.get(model, MOI.ObjectiveValue()), 24, atol = 1e-5)
return
end
end
TestMOIHighs.runtests()