Skip to content

Commit

Permalink
Merge pull request #2318 from opencobra/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
rmtfleming authored Sep 26, 2024
2 parents 89cce26 + 48d302d commit 3d814c8
Show file tree
Hide file tree
Showing 91 changed files with 8,814 additions and 2,461 deletions.
8 changes: 4 additions & 4 deletions docs/source/installation/compatMatrix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Linux Ubuntu
~~~~~~~~~~~~

+-------------------+--------------------+--------------------+--------------------+--------------------+
| SolverName | R2021b | R2021a | R2020b | R2020a |
| SolverName | R2023b | R2021b | R2020b | R2020a |
+===================+====================+====================+====================+====================+
| IBM CPLEX 20.10 | |x| | |x| | |x| | |x| |
+-------------------+--------------------+--------------------+--------------------+--------------------+
Expand All @@ -17,7 +17,7 @@ Linux Ubuntu
+-------------------+--------------------+--------------------+--------------------+--------------------+
| TOMLAB CPLEX 8.6 | |white_check_mark| | |white_check_mark| | |white_check_mark| | |white_check_mark| |
+-------------------+--------------------+--------------------+--------------------+--------------------+
| MOSEK 9.2 | |white_check_mark| | |white_check_mark| | |white_check_mark| | |white_check_mark| |
| MOSEK 10.1 | |white_check_mark| | |white_check_mark| | |white_check_mark| | |white_check_mark| |
+-------------------+--------------------+--------------------+--------------------+--------------------+
| GLPK | |white_check_mark| | |white_check_mark| | |white_check_mark| | |white_check_mark| |
+-------------------+--------------------+--------------------+--------------------+--------------------+
Expand All @@ -42,7 +42,7 @@ macOS 10.13+
+-------------------+--------------------+--------------------+--------------------+--------------------+
| TOMLAB CPLEX 8.6 | |white_check_mark| | |white_check_mark| | |white_check_mark| | |white_check_mark| |
+-------------------+--------------------+--------------------+--------------------+--------------------+
| MOSEK 9.2 | |white_check_mark| | |white_check_mark| | |white_check_mark| | |white_check_mark| |
| MOSEK 10.1 | |white_check_mark| | |white_check_mark| | |white_check_mark| | |white_check_mark| |
+-------------------+--------------------+--------------------+--------------------+--------------------+
| GLPK | |white_check_mark| | |white_check_mark| | |white_check_mark| | |white_check_mark| |
+-------------------+--------------------+--------------------+--------------------+--------------------+
Expand All @@ -68,7 +68,7 @@ Windows 10
+-------------------+--------------------+--------------------+--------------------+--------------------+
| TOMLAB CPLEX 8.6 | |white_check_mark| | |white_check_mark| | |white_check_mark| | |white_check_mark| |
+-------------------+--------------------+--------------------+--------------------+--------------------+
| MOSEK 9.2 | |white_check_mark| | |white_check_mark| | |white_check_mark| | |white_check_mark| |
| MOSEK 10.1 | |white_check_mark| | |white_check_mark| | |white_check_mark| | |white_check_mark| |
+-------------------+--------------------+--------------------+--------------------+--------------------+
| GLPK | |white_check_mark| | |white_check_mark| | |white_check_mark| | |white_check_mark| |
+-------------------+--------------------+--------------------+--------------------+--------------------+
Expand Down
1 change: 1 addition & 0 deletions external/base/plots/+HCP
Submodule +HCP added at 458a25
130 changes: 130 additions & 0 deletions external/base/plots/panel/demo/demopanel1.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@

% What can Panel do?
%
% This demo just shows off what Panel can do. It is not
% intended as part of the tutorial - this begins in
% demopanel2.
%
% (a) It's easy to create a complex layout
% (b) You can populate it as you would a subplot layout
%
% Now, move on to demopanel2 to learn how to use panel.



%% (a)

% clf
figure(1)
clf

% create panel
p = panel();

% layout a variety of sub-panels
p.pack('h', {1/3 []})
p(1).pack({2/3 []});
p(1,1).pack(3, 2);
p(2).pack(6, 2);

% set margins
p.de.margin = 2;
p(1,1).marginbottom = 12;
p(2).marginleft = 20;
p.margin = [13 10 2 2];

% and some properties
p.fontsize = 8;



%% (b)

% data set 1
for m = 1:3
for n = 1:2

% prepare sample data
t = (0:99) / 100;
s1 = sin(t * 2 * pi * m);
s2 = sin(t * 2 * pi * n * 2);

% select axis - see data set 2 for an alternative way to
% access sub-panels
p(1,1,m,n).select();

% plot
plot(t, s1, 'r', 'linewidth', 1);
hold on
plot(t, s2, 'b', 'linewidth', 1);
plot(t, s1+s2, 'k', 'linewidth', 1);

% finalise axis
axis([0 1 -2.2 2.2]);
set(gca, 'xtick', [], 'ytick', []);

end
end

% label axis group
p(1,1).xlabel('time (unitless)');
p(1,1).ylabel('example data series');

% data set 2
source = 'XYZXYZ';

% an alternative way to access sub-panels is to first get a
% reference to the parent...
q = p(2);

% loop
for m = 1:6
for n = 1:2

% select axis - these two lines do the same thing (see
% above)
% p(2, m, n).select();
q(m, n).select();

% prepare sample data
data = randn(100, 1) * 0.4;

% do stats
stats = [];
stats.source = source(m);
stats.binrange = [-1 1];
stats.xtick = [-0.8:0.4:0.8];
stats.ytick = [0 20];
stats.bincens = -0.9:0.2:0.9;
stats.values = data;
stats.freq = hist(data, stats.bincens);
stats.percfreq = stats.freq / length(data) * 100;
stats.percpeak = 30;

% plot
demopanel_minihist(stats, m == 6, n == 1);

end
end

% label axis group
p(2).xlabel('data value (furlongs per fortnight)');
p(2).ylabel('normalised frequency (%)');

% data set 3
p(1, 2).select();

% prepare sample data
r1 = rand(100, 1);
r2 = randn(100, 1);

% plot
plot(r1, r1+0.2*r2, 'k.')
hold on
plot([0 1], [0 1], 'r-')

% finalise axis
xlabel('our predictions');
ylabel('actual measurements')


64 changes: 64 additions & 0 deletions external/base/plots/panel/demo/demopanel2.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

% Basic use. Panel is just like subplot.
%
% (a) Create a grid of panels.
% (b) Plot into each sub-panel.



%% (a)

% create a NxN grid in gcf (this will create a figure, if
% none is open).
%
% you can pass the figure handle to the constructor if you
% need to attach the panel to a particular figure, as:
%
% p = panel(h_figure)
%
% NB: you can use this code to compare using panel() with
% using subplot(). you should find they do much the same
% thing in this case, but with a slightly different layout.

N = 2;
use_panel = 1;
clf

% PREPARE
if use_panel
p = panel();
p.pack(N, N);
end



%% (b)

% plot into each panel in turn

for m = 1:N
for n = 1:N

% select one of the NxN grid of sub-panels
if use_panel
p(m, n).select();
else
subplot(N, N, m + (n-1) * N);
end

% plot some data
plot(randn(100,1));

% you can use all the usual calls
xlabel('sample number');
ylabel('data');

% and so on - generally, you can treat the axis panel
% like any other axis
axis([0 100 -3 3]);

end
end



106 changes: 106 additions & 0 deletions external/base/plots/panel/demo/demopanel3.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@

% You can nest Panels as much as you like.
%
% (a) Create a grid of panels.
% (b) Plot into three of the sub-panels.
% (c) Create another grid in the fourth.
% (d) Plot into each of these.



%% (a)

% create a panel in gcf.
%
% "p" is called the "root panel", which is the special panel
% whose parent is the figure window (usually), rather than
% another panel.
p = panel();

% pack a 2x2 grid of panels into it.
p.pack(2, 2);



%% (b)

% plot into the first three panels
for m = 1:2
for n = 1:2

% skip the 2,2 panel
if m == 2 && n == 2
break
end

% select the panel (create an axis, and make that axis
% current)
p(m, n).select();

% plot some stuff
plot(randn(100,1));
xlabel('sample number');
ylabel('data');
axis([0 100 -3 3]);

end
end



%% (c)

% pack a further grid into p(2, 2)
%
% all panels start as "uncommitted panels" (even the root
% panel). the first time we "select()" one, we commit it as
% an "axis panel". the first time we "pack()" one, we commit
% it as a "parent panel". once committed, it can't change
% into the other sort.
%
% this call commits p(2,2) as a parent panel - the six
% children it creates all start as uncommitted panels.
p(2, 2).pack(2, 3);



%% (d)

% plot into the six new sub-sub-panels
for m = 1:2
for n = 1:3

% select the panel - this commits it as an axis panel
p(2, 2, m, n).select();

% plot some stuff
plot(randn(100,1));
xlabel('sample number');
ylabel('data');
axis([0 100 -3 3]);

end
end

% note this alternative, equivalent, way to reference a
% sub-panel
p_22 = p(2, 2);

% plot another bit of data into the six sub-sub-panels
for m = 1:2
for n = 1:3

% select the panel
p_22(m, n).select();

% plot more stuff
hold on
plot(randn(100,1)*0.3, 'r');

end
end





Loading

0 comments on commit 3d814c8

Please sign in to comment.