File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ function Model(
77
77
(" .lp" , LP. Model),
78
78
(" .mof.json" , MOF. Model),
79
79
(" .mps" , MPS. Model),
80
+ (" .dat-s" , SDPA. Model),
80
81
(" .sdpa" , SDPA. Model)
81
82
]
82
83
if endswith (filename, ext) || occursin (" $(ext) ." , filename)
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ function test_write_then_read(model_string::String)
49
49
end
50
50
51
51
function test_read (filename:: String , model_string:: String )
52
- model1 = SDPA . Model ()
52
+ model1 = MOI . FileFormats . Model (filename = filename )
53
53
MOIU. loadfromstring! (model1, model_string)
54
54
(variable_names, constraint_names) = set_var_and_con_names (model1)
55
55
108
108
MOI. add_variable (model)
109
109
err = ErrorException (" Cannot read in file because model is not empty." )
110
110
@test_throws err MOI. read_from_file (model,
111
- joinpath (SDPA_MODELS_DIR, " example_A.sdpa " ))
111
+ joinpath (SDPA_MODELS_DIR, " example_A.dat-s " ))
112
112
end
113
113
114
114
@testset " Bad number of blocks" begin
@@ -190,7 +190,7 @@ write_read_models = [
190
190
end
191
191
192
192
example_models = [
193
- (" example_A.sdpa " , """
193
+ (" example_A.dat-s " , """
194
194
variables: x, y
195
195
minobjective: 10x + 20y
196
196
c1: [x + -1, 0, x + -2] in PositiveSemidefiniteConeTriangle(2)
Original file line number Diff line number Diff line change 1
1
"Example from http://plato.asu.edu/ftp/sdpa_format.txt
2
2
"A sample problem.
3
- 2
4
- 2
3
+ 2 =mdim
4
+ 2 =nblocks
5
5
2 2
6
6
10.0 20.0
7
7
0 1 1 1 1.0
You can’t perform that action at this time.
0 commit comments