Skip to content

Commit 088ab9b

Browse files
committed
Simplify sim calls in BuildRefrigerator
* Note that the command to start Simscape Results Explorer is sscexplore * For the multiple sims, replace with parsim on desktop systems * For the other sims, do not use Simulink.SimulationInput * Close the parpool, if open, in PostBuildRefrigerator * Make sure sim doesn't open sscexplore in PreBuildRefrigerator
1 parent 4fdf8da commit 088ab9b

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

Models/BuildRefrigerator.mlx

-42 Bytes
Binary file not shown.

Models/Model_Fridge.mlx

-2 Bytes
Binary file not shown.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
% Post-run script for BuildRefrigerator.mlx
22
% ---- Post-run commands -----
3+
4+
delete(gcp('nocreate'))
35

SoftwareTests/PreFiles/PreBuildRefrigerator.m

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,19 @@
22
% ---- Known Issues -----
33
KnownIssuesID = ["physmod:common:simtypes:assert:Assertion","physmod:simscape:simtypes:assert:Assertion"];
44
% ---- Pre-run commands -----
5+
6+
sim = @(varargin) SimNoViewer(varargin);
7+
8+
function out = SimNoViewer(varargin)
9+
mdl = varargin{1}{1};
10+
p1 = get_param(mdl,"SimscapeLogOpenViewer");
11+
set_param(mdl, 'SimscapeLogOpenViewer', 'off')
12+
out = sim(mdl,varargin{2:end});
13+
set_param(mdl,"SimscapeLogOpenViewer",p1)
14+
end
15+
16+
% sscexplore = @(x) DontOpenExplorer(x);
17+
%
18+
% function DontOpenExplorer(varargin)
19+
% disp("Opening Simscape Results Explorer here...")
20+
% end

0 commit comments

Comments
 (0)