-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Overhaul remaining code for VSDP 2020 release.
- Loading branch information
Showing
23 changed files
with
31 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
% See also vsdp_benchmark. | ||
% | ||
|
||
% Copyright 2004-2019 Christian Jansson ([email protected]) | ||
% Copyright 2004-2020 Christian Jansson ([email protected]) | ||
|
||
% Recursive call with well-known benchmarks. | ||
if (nargin == 2) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ function disp (obj, item) | |
% See also vsdp_benchmark. | ||
% | ||
|
||
% Copyright 2004-2019 Christian Jansson ([email protected]) | ||
% Copyright 2004-2020 Christian Jansson ([email protected]) | ||
|
||
if (nargin > 1) | ||
item = validatestring (item, {'system', 'solver', 'benchmark'}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
% | ||
% obj.filter (bm_library, name) Optionally, the benchmark can be reduced to | ||
% a subset of the data by applying filters, i.e. regular expressions | ||
% machted with the "regexp()" function. To filter the benchmark library | ||
% matched with the "regexp()" function. To filter the benchmark library | ||
% provide a string for 'bm_library' and for the test case name set 'name'. | ||
% | ||
% Example: | ||
|
@@ -20,7 +20,7 @@ | |
% See also vsdp_benchmark. | ||
% | ||
|
||
% Copyright 2004-2019 Christian Jansson ([email protected]) | ||
% Copyright 2004-2020 Christian Jansson ([email protected]) | ||
|
||
idx = true (size (obj.BENCHMARK(:,1))); | ||
if (isempty (idx)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ | |
% See also vsdp_benchmark, vsdp_benchmark.filter. | ||
% | ||
|
||
% Copyright 2004-2019 Christian Jansson ([email protected]) | ||
% Copyright 2004-2020 Christian Jansson ([email protected]) | ||
|
||
if (isempty (obj.RESULT_DIR)) | ||
error ('VSDP_BENCHMARK:run:resultDirUnknown', ... | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,14 +4,14 @@ | |
% See also vsdp. | ||
% | ||
|
||
% Copyright 2004-2018 Christian Jansson ([email protected]) | ||
|
||
% Copyright 2004-2020 Christian Jansson ([email protected]) | ||
properties | ||
% A cell array of strings with VSDP benchmarks to run. The columns are: | ||
% | ||
% obj.BENCHMARK(:,1) Benchmark library name. | ||
% obj.BENCHMARK(:,2) Short name for the test case. | ||
% obj.BENCHMARK(:,3) System dependend full path of the original test | ||
% obj.BENCHMARK(:,3) System dependent full path of the original test | ||
% case data. | ||
% | ||
% Default: cell (0, 3). | ||
|
@@ -87,8 +87,8 @@ | |
function p = check_dir (~, p) | ||
% CHECK_DIR Check 'p' to be an existing directory. | ||
% | ||
% Return the absolute path 'p' or an emtpy char array. | ||
|
||
% Return the absolute path 'p' or an empty char array. | ||
if (exist (p, "dir") == 7) | ||
p = what (p); % Get absolute path. | ||
p = p.path; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
function obj = columns (obj, names) | ||
% COLUMNS Use specified columns by header names or indices. | ||
|
||
% Copyright 2018-2019 Kai T. Ohlhus ([email protected]) | ||
% Copyright 2018-2020 Kai T. Ohlhus ([email protected]) | ||
|
||
if (isnumeric (names) || islogical (names)) | ||
obj.cdata_view = obj.cdata_view(:,names); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
function disp (obj) | ||
% DISP Display short export overview. | ||
|
||
% Copyright 2018-2019 Kai T. Ohlhus ([email protected]) | ||
% Copyright 2018-2020 Kai T. Ohlhus ([email protected]) | ||
|
||
fprintf ('\n VSDP Benchmark Export\n\n'); | ||
fprintf (' obj.RESULT_DIR =\n\n ''%s''\n\n', obj.RESULT_DIR); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
function obj = get_data (obj) | ||
% GET_DATA Get the data for the listed test cases. | ||
|
||
% Copyright 2018-2019 Kai T. Ohlhus ([email protected]) | ||
% Copyright 2018-2020 Kai T. Ohlhus ([email protected]) | ||
|
||
obj.cdata{1,16} = []; % Preallocate width | ||
len = size (obj.cdata, 1); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
% with format {'lib', 'test case', 'solver'}. | ||
% | ||
|
||
% Copyright 2018-2019 Kai T. Ohlhus ([email protected]) | ||
% Copyright 2018-2020 Kai T. Ohlhus ([email protected]) | ||
|
||
file_list = dir (fullfile (obj.RESULT_DIR, 'data', '*.mat')); | ||
idx = {file_list.name}'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
% regular expression to be matched. | ||
% | ||
|
||
% Copyright 2018-2019 Kai T. Ohlhus ([email protected]) | ||
% Copyright 2018-2020 Kai T. Ohlhus ([email protected]) | ||
|
||
if (isnumeric (op) || islogical (op)) | ||
obj.cdata_view = obj.cdata_view(op,:); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
% The second input 'use_columns' determines the string conversion. | ||
% | ||
|
||
% Copyright 2018-2019 Kai T. Ohlhus ([email protected]) | ||
% Copyright 2018-2020 Kai T. Ohlhus ([email protected]) | ||
|
||
if (all (all (cellfun (@ischar, obj.cdata_view)))) | ||
return; % All done. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
function str = to_csv (obj) | ||
% TO_CSV Export 'obj.cdata_view' to comma separated values (CSV). | ||
|
||
% Copyright 2018-2019 Kai T. Ohlhus ([email protected]) | ||
% Copyright 2018-2020 Kai T. Ohlhus ([email protected]) | ||
|
||
% Ensure string entries. | ||
cdata = obj.to_cell_strings ().cdata_view; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
function str = to_html (obj, html_title) | ||
% TO_HTML Export 'cdata' to rich HTML markup (MathJax, jQuery, dataTables). | ||
|
||
% Copyright 2018-2019 Kai T. Ohlhus ([email protected]) | ||
% Copyright 2018-2020 Kai T. Ohlhus ([email protected]) | ||
|
||
% Ensure string entries. | ||
cdata = obj.to_cell_strings ().cdata_view; | ||
|
@@ -24,7 +24,7 @@ | |
end | ||
|
||
datatables_url = ... | ||
'https://cdn.datatables.net/v/dt/jq-3.3.1/dt-1.10.18/fh-3.1.4/sl-1.3.0/datatables.min'; | ||
'https://cdn.datatables.net/v/dt/jq-3.3.1/dt-1.10.20/fh-3.1.6/sl-1.3.1/datatables.min'; | ||
|
||
header = strjoin ({ ... | ||
'<!DOCTYPE html>', ... | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
function str = to_latex (obj, body_only) | ||
% TO_LATEX Export 'obj.cdata_view' to LaTeX markup (longtable environment). | ||
|
||
% Copyright 2018-2019 Kai T. Ohlhus ([email protected]) | ||
% Copyright 2018-2020 Kai T. Ohlhus ([email protected]) | ||
|
||
% Ensure string entries. | ||
cdata = obj.to_cell_strings ().cdata_view; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
function str = to_markdown (obj) | ||
% TO_MARKDOWN Export 'obj.cdata_view' to Markdown format. | ||
|
||
% Copyright 2018-2019 Kai T. Ohlhus ([email protected]) | ||
% Copyright 2018-2020 Kai T. Ohlhus ([email protected]) | ||
|
||
% Ensure string entries. | ||
cdata = obj.to_cell_strings ().cdata_view; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ | |
% Helper class to export benchmarks. | ||
% | ||
|
||
% Copyright 2018-2019 Kai T. Ohlhus ([email protected]) | ||
|
||
% Copyright 2018-2020 Kai T. Ohlhus ([email protected]) | ||
properties | ||
% Current view of the data to be exported. | ||
% | ||
|
@@ -111,8 +111,8 @@ function save_cache (obj) | |
function p = check_dir (~, p) | ||
% CHECK_DIR Check 'p' to be an existing directory. | ||
% | ||
% Return the absolute path 'p' or an emtpy char array. | ||
|
||
% Return the absolute path 'p' or an empty char array. | ||
if (exist (p, "dir") == 7) | ||
p = what (p); % Get absolute path. | ||
p = p.path; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
function tests = testVSDP() | ||
% TESTVSDP Runs a testsuite for VSDP (version 2018). | ||
% TESTVSDP Runs a testsuite for VSDP (version 2020). | ||
% | ||
% Example: | ||
% | ||
|
@@ -9,7 +9,7 @@ | |
% See also vsdp. | ||
% | ||
|
||
% Copyright 2016-2019 Kai T. Ohlhus ([email protected]) | ||
% Copyright 2016-2020 Kai T. Ohlhus ([email protected]) | ||
|
||
tests = functiontests (localfunctions); | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
% See also demovsdp. | ||
% | ||
|
||
% Copyright 2016-2019 Kai T. Ohlhus ([email protected]) | ||
% Copyright 2016-2020 Kai T. Ohlhus ([email protected]) | ||
|
||
tests = functiontests(localfunctions); | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
classdef vsdp_indexable < handle | ||
% VSDP_INDEXABLE A quantity that can be separated into differrent cones. | ||
% VSDP_INDEXABLE A quantity that can be separated into different cones. | ||
% | ||
% Example: | ||
% | ||
|
@@ -11,8 +11,8 @@ | |
% See also vsdp. | ||
% | ||
|
||
% Copyright 2004-2019 Christian Jansson ([email protected]) | ||
|
||
% Copyright 2004-2020 Christian Jansson ([email protected]) | ||
properties | ||
value | ||
vsdp_obj | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,8 +92,8 @@ | |
% | ||
% See also vsdp. | ||
|
||
% Copyright 2004-2019 Christian Jansson ([email protected]) | ||
|
||
% Copyright 2004-2020 Christian Jansson ([email protected]) | ||
narginchk (0, 1); | ||
|
||
% Check for default solver by explicitly setting it again. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,8 +52,8 @@ | |
% | ||
% See also vsdp. | ||
|
||
% Copyright 2004-2019 Christian Jansson ([email protected]) | ||
|
||
% Copyright 2004-2020 Christian Jansson ([email protected]) | ||
narginchk (4, 6); | ||
|
||
obj.sol_type = validatestring (sol_type, {'Initial', ... | ||
|
@@ -235,7 +235,7 @@ function mem_info (obj) | |
% TO_2006_FMT Export conic problem solution to VSDP 2006 format. | ||
% | ||
% [X0, y0, Z0] = sol.to_2006_fmt (obj); Export the solution 'sol' of | ||
% a VSDP 2018 conic problem 'obj' to VSDP 2006 format. | ||
% a VSDP 2020 conic problem 'obj' to VSDP 2006 format. | ||
% | ||
% See also vsdp, vsdp_solution. | ||
% | ||
|