Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 20 additions & 16 deletions .github/workflows/run-tests-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
steps:
- run: echo "Triggered by WEC-Sim commit ${{ github.event.client_payload.sha }}"
run_tests:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
release: [latest]
os: [ubuntu-latest, windows-latest]
folder: [Body-to-Body_Interactions,
Cable,
Controls,
Expand All @@ -46,6 +46,7 @@ jobs:
Wave_Markers,
WECCCOMP,
Write_Custom_h5]
release: [R2023b]
include:
- products: Simulink Simscape Simscape_Multibody
- folder: Desalination
Expand All @@ -58,29 +59,30 @@ jobs:
products: Simulink Simscape Simscape_Multibody Control_System_Toolbox
- folder: WECCCOMP
products: Simulink Simscape Simscape_Multibody Control_System_Toolbox Optimization_Toolbox System_Identification_Toolbox Statistics_and_Machine_Learning_Toolbox
name: ${{ matrix.folder }} MATLAB ${{ matrix.release }} on Linux
name: "${{ matrix.folder }} - ${{ matrix.os }} - ${{ matrix.release }}"
timeout-minutes: 45
steps:
- name: Check out repository (repository dispatch)
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
lfs: true
ref: 'dev'
if: github.event_name == 'repository_dispatch'
- name: Check out repository (push or pull request)
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
lfs: true
if: github.event_name != 'repository_dispatch'
- name: Checkout LFS objects
run: git lfs checkout
- name: Check out WEC-Sim
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: WEC-Sim/WEC-Sim
ref: 'dev'
path: './WEC-Sim'
- name: Check out MoorDyn
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: WEC-Sim/MoorDyn
path: './MoorDyn'
Expand All @@ -93,20 +95,22 @@ jobs:
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v2-beta
with:
cache: true
products: ${{ matrix.products }}
release: ${{ matrix.release }}
- name: Start display server
if: matrix.folder == 'Desalination'
- name: Start display server (Linux)
if: matrix.folder == 'Desalination' && matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install xvfb
Xvfb :99 &
echo "DISPLAY=:99" >> $GITHUB_ENV
- name: Install WEC-Sim
uses: matlab-actions/run-command@v1
with:
command: addpath(genpath('WEC-Sim/source'));, savepath pathdef.m;
- name: Run tests and generate artifacts
- name: Install WEC-Sim, run tests and generate artifacts
uses: matlab-actions/run-command@v1
with:
command: results = wecSimAppTest("${{ matrix.folder }}"), assertSuccess(results);
command: |
addpath(genpath('WEC-Sim/source'));
results = wecSimAppTest("${{ matrix.folder }}"),
assertSuccess(results);
startup-options: -logfile matlab.log
- name: Print matlab.log
if: success() || failure()
run: cat matlab.log
35 changes: 19 additions & 16 deletions .github/workflows/run-tests-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
steps:
- run: echo "Triggered by WEC-Sim commit ${{ github.event.client_payload.sha }}"
run_tests:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
release: [latest]
os: [ubuntu-latest, windows-latest]
folder: [Body-to-Body_Interactions,
Cable,
Controls,
Expand All @@ -44,6 +44,7 @@ jobs:
Wave_Markers,
WECCCOMP,
Write_Custom_h5]
release: [R2023b]
include:
- products: Simulink Simscape Simscape_Multibody
- folder: Desalination
Expand All @@ -52,29 +53,29 @@ jobs:
products: Simulink Simscape Simscape_Multibody Control_System_Toolbox Optimization_Toolbox System_Identification_Toolbox Statistics_and_Machine_Learning_Toolbox Symbolic_Math_Toolbox
- folder: WECCCOMP
products: Simulink Simscape Simscape_Multibody Control_System_Toolbox Optimization_Toolbox System_Identification_Toolbox Statistics_and_Machine_Learning_Toolbox
name: ${{ matrix.folder }} MATLAB ${{ matrix.release }} on Linux
name: "${{ matrix.folder }} - ${{ matrix.os }} - ${{ matrix.release }}"
steps:
- name: Check out repository (repository dispatch)
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
lfs: true
ref: 'master'
if: github.event_name == 'repository_dispatch'
- name: Check out repository (push or pull request)
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
lfs: true
if: github.event_name != 'repository_dispatch'
- name: Checkout LFS objects
run: git lfs checkout
- name: Check out WEC-Sim
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: WEC-Sim/WEC-Sim
ref: 'master'
path: './WEC-Sim'
- name: Check out MoorDyn
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: WEC-Sim/MoorDyn
path: './MoorDyn'
Expand All @@ -87,20 +88,22 @@ jobs:
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v2-beta
with:
cache: true
products: ${{ matrix.products }}
release: ${{ matrix.release }}
- name: Start display server
if: matrix.folder == 'Desalination'
- name: Start display server (Linux)
if: matrix.folder == 'Desalination' && matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install xvfb
Xvfb :99 &
echo "DISPLAY=:99" >> $GITHUB_ENV
- name: Install WEC-Sim
uses: matlab-actions/run-command@v1
with:
command: addpath(genpath('WEC-Sim/source'));, savepath pathdef.m;
- name: Run tests and generate artifacts
- name: Install WEC-Sim, run tests and generate artifacts
uses: matlab-actions/run-command@v1
with:
command: results = wecSimAppTest("${{ matrix.folder }}"), assertSuccess(results);
command: >
addpath(genpath('WEC-Sim/source'));
results = wecSimAppTest("${{ matrix.folder }}"),
assertSuccess(results);
startup-options: -logfile matlab.log
- name: Print matlab.log
if: success() || failure()
run: cat matlab.log
14 changes: 7 additions & 7 deletions Body-to-Body_Interactions/B2B_Case1/wecSimInputFile.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@

%% Body Data
% Float
body(1) = bodyClass('../hydroData/rm3.h5');
body(1).geometryFile = '../geometry/float.stl';
body(1).mass = 'equilibrium';
body(1).inertia = [20907301 21306090.66 37085481.11];
body(1) = bodyClass('../../_Common_Input_Files/RM3/hydroData/rm3.h5');
body(1).geometryFile = '../../_Common_Input_Files/RM3/geometry/float.stl';
body(1).mass = 'equilibrium';
body(1).inertia = [20907301 21306090.66 37085481.11];

% Spar/Plate
body(2) = bodyClass('../hydroData/rm3.h5');
body(2).geometryFile = '../geometry/plate.stl';
body(2).mass = 'equilibrium';
body(2) = bodyClass('../../_Common_Input_Files/RM3/hydroData/rm3.h5');
body(2).geometryFile = '../../_Common_Input_Files/RM3/geometry/plate.stl';
body(2).mass = 'equilibrium';
body(2).inertia = [94419614.57 94407091.24 28542224.82];

%% PTO and Constraint Parameters
Expand Down
14 changes: 7 additions & 7 deletions Body-to-Body_Interactions/B2B_Case2/wecSimInputFile.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@

%% Body Data
% Float
body(1) = bodyClass('../hydroData/rm3.h5');
body(1).geometryFile = '../geometry/float.stl';
body(1).mass = 'equilibrium';
body(1).inertia = [20907301 21306090.66 37085481.11];
body(1) = bodyClass('../../_Common_Input_Files/RM3/hydroData/rm3.h5');
body(1).geometryFile = '../../_Common_Input_Files/RM3/geometry/float.stl';
body(1).mass = 'equilibrium';
body(1).inertia = [20907301 21306090.66 37085481.11];

% Spar/Plate
body(2) = bodyClass('../hydroData/rm3.h5');
body(2).mass = 'equilibrium';
body(2) = bodyClass('../../_Common_Input_Files/RM3/hydroData/rm3.h5');
body(2).geometryFile = '../../_Common_Input_Files/RM3/geometry/plate.stl';
body(2).mass = 'equilibrium';
body(2).inertia = [94419614.57 94407091.24 28542224.82];
body(2).geometryFile = '../geometry/plate.stl';

%% PTO and Constraint Parameters
% Floating (3DOF) Joint
Expand Down
16 changes: 8 additions & 8 deletions Body-to-Body_Interactions/B2B_Case3/wecSimInputFile.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@

%% Body Data
% Float
body(1) = bodyClass('../hydroData/rm3.h5');
body(1).geometryFile = '../geometry/float.stl';
body(1).mass = 'equilibrium';
body(1).inertia = [20907301 21306090.66 37085481.11];
body(1) = bodyClass('../../_Common_Input_Files/RM3/hydroData/rm3.h5');
body(1).geometryFile = '../../_Common_Input_Files/RM3/geometry/float.stl';
body(1).mass = 'equilibrium';
body(1).inertia = [20907301 21306090.66 37085481.11];

% Spar/Plate
body(2) = bodyClass('../hydroData/rm3.h5');
body(2).mass = 'equilibrium';
body(2).inertia = [94419614.57 94407091.24 28542224.82];
body(2).geometryFile = '../geometry/plate.stl';
body(2) = bodyClass('../../_Common_Input_Files/RM3/hydroData/rm3.h5');
body(2).geometryFile = '../../_Common_Input_Files/RM3/geometry/plate.stl';
body(2).mass = 'equilibrium';
body(2).inertia = [94419614.57 94407091.24 28542224.82];

%% PTO and Constraint Parameters
% Floating (3DOF) Joint
Expand Down
8 changes: 4 additions & 4 deletions Body-to-Body_Interactions/B2B_Case4/wecSimInputFile.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@

%% Body Data
% Float
body(1) = bodyClass('../hydroData/rm3.h5');
body(1).geometryFile = '../geometry/float.stl';
body(1) = bodyClass('../../_Common_Input_Files/RM3/hydroData/rm3.h5');
body(1).geometryFile = '../../_Common_Input_Files/RM3/geometry/float.stl';
body(1).mass = 'equilibrium';
body(1).inertia = [20907301 21306090.66 37085481.11];

% Spar/Plate
body(2) = bodyClass('../hydroData/rm3.h5');
body(2) = bodyClass('../../_Common_Input_Files/RM3/hydroData/rm3.h5');
body(2).mass = 'equilibrium';
body(2).inertia = [94419614.57 94407091.24 28542224.82];
body(2).geometryFile = '../geometry/plate.stl';
body(2).geometryFile = '../../_Common_Input_Files/RM3/geometry/plate.stl';

%% PTO and Constraint Parameters
% Floating (3DOF) Joint
Expand Down
16 changes: 8 additions & 8 deletions Body-to-Body_Interactions/B2B_Case5/wecSimInputFile.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@

%% Body Data
% Float
body(1) = bodyClass('../hydroData/rm3.h5');
body(1).geometryFile = '../geometry/float.stl';
body(1).mass = 'equilibrium';
body(1).inertia = [20907301 21306090.66 37085481.11];
body(1) = bodyClass('../../_Common_Input_Files/RM3/hydroData/rm3.h5');
body(1).geometryFile = '../../_Common_Input_Files/RM3/geometry/float.stl';
body(1).mass = 'equilibrium';
body(1).inertia = [20907301 21306090.66 37085481.11];

% Spar/Plate
body(2) = bodyClass('../hydroData/rm3.h5');
body(2).mass = 'equilibrium';
body(2).inertia = [94419614.57 94407091.24 28542224.82];
body(2).geometryFile = '../geometry/plate.stl';
body(2) = bodyClass('../../_Common_Input_Files/RM3/hydroData/rm3.h5');
body(2).geometryFile = '../../_Common_Input_Files/RM3/geometry/plate.stl';
body(2).mass = 'equilibrium';
body(2).inertia = [94419614.57 94407091.24 28542224.82];

%% PTO and Constraint Parameters
% Floating (3DOF) Joint
Expand Down
14 changes: 7 additions & 7 deletions Body-to-Body_Interactions/B2B_Case6/wecSimInputFile.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@

%% Body Data
% Float
body(1) = bodyClass('../hydroData/rm3.h5');
body(1).geometryFile = '../geometry/float.stl';
body(1).mass = 'equilibrium';
body(1).inertia = [20907301 21306090.66 37085481.11];
body(1) = bodyClass('../../_Common_Input_Files/RM3/hydroData/rm3.h5');
body(1).geometryFile = '../../_Common_Input_Files/RM3/geometry/float.stl';
body(1).mass = 'equilibrium';
body(1).inertia = [20907301 21306090.66 37085481.11];

% Spar/Plate
body(2) = bodyClass('../hydroData/rm3.h5');
body(2).mass = 'equilibrium';
body(2) = bodyClass('../../_Common_Input_Files/RM3/hydroData/rm3.h5');
body(2).geometryFile = '../../_Common_Input_Files/RM3/geometry/plate.stl';
body(2).mass = 'equilibrium';
body(2).inertia = [94419614.57 94407091.24 28542224.82];
body(2).geometryFile = '../geometry/plate.stl';

%% PTO and Constraint Parameters
% Floating (3DOF) Joint
Expand Down
2 changes: 1 addition & 1 deletion Body-to-Body_Interactions/TestB2B.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
properties
OriginalDefault
testDir
h5Dir = "hydroData"
h5Dir = '../_Common_Input_Files/RM3/hydroData/'
h5Name = 'rm3.h5'
outName = 'rm3.out'
end
Expand Down
4 changes: 2 additions & 2 deletions Controls/Declutching/wecSimInputFile.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

%% Body Data
% Sphere
body(1) = bodyClass('../hydroData/sphere.h5'); % Create the body(1) Variable
body(1).geometryFile = '../geometry/sphere.stl'; % Location of Geomtry File
body(1) = bodyClass('../../_Common_Input_Files/Sphere/hydroData/sphere.h5'); % Create the body(1) Variable
body(1).geometryFile = '../../_Common_Input_Files/Sphere/geometry/sphere.stl'; % Location of Geomtry File
body(1).mass = 'equilibrium'; % Body Mass
body(1).inertia = [20907301 21306090.66 37085481.11]; % Moment of Inertia [kg*m^2]

Expand Down
4 changes: 2 additions & 2 deletions Controls/Latching/wecSimInputFile.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

%% Body Data
% Sphere
body(1) = bodyClass('../hydroData/sphere.h5'); % Create the body(1) Variable
body(1).geometryFile = '../geometry/sphere.stl'; % Location of Geomtry File
body(1) = bodyClass('../../_Common_Input_Files/Sphere/hydroData/sphere.h5'); % Create the body(1) Variable
body(1).geometryFile = '../../_Common_Input_Files/Sphere/geometry/sphere.stl'; % Location of Geomtry File
body(1).mass = 'equilibrium'; % Body Mass
body(1).inertia = [20907301 21306090.66 37085481.11]; % Moment of Inertia [kg*m^2]

Expand Down
4 changes: 2 additions & 2 deletions Controls/MPC/wecSimInputFile.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

%% Body Data
% Sphere
body(1) = bodyClass('../hydroData/sphere.h5'); % Create the body(1) Variable
body(1).geometryFile = '../geometry/sphere.stl'; % Location of Geomtry File
body(1) = bodyClass('../../_Common_Input_Files/Sphere/hydroData/sphere.h5'); % Create the body(1) Variable
body(1).geometryFile = '../../_Common_Input_Files/Sphere/geometry/sphere.stl'; % Location of Geomtry File
body(1).mass = 'equilibrium'; % Body Mass
body(1).inertia = [20907301 21306090.66 37085481.11]; % Moment of Inertia [kg*m^2]

Expand Down
4 changes: 2 additions & 2 deletions Controls/Passive (P)/wecSimInputFile.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

%% Body Data
% Sphere
body(1) = bodyClass('../hydroData/sphere.h5'); % Create the body(1) Variable
body(1).geometryFile = '../geometry/sphere.stl'; % Location of Geomtry File
body(1) = bodyClass('../../_Common_Input_Files/Sphere/hydroData/sphere.h5'); % Create the body(1) Variable
body(1).geometryFile = '../../_Common_Input_Files/Sphere/geometry/sphere.stl'; % Location of Geomtry File
body(1).mass = 'equilibrium'; % Body Mass
body(1).inertia = [20907301 21306090.66 37085481.11]; % Moment of Inertia [kg*m^2]

Expand Down
4 changes: 2 additions & 2 deletions Controls/Reactive (PI)/wecSimInputFile.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

%% Body Data
% Sphere
body(1) = bodyClass('../hydroData/sphere.h5'); % Create the body(1) Variable
body(1).geometryFile = '../geometry/sphere.stl'; % Location of Geomtry File
body(1) = bodyClass('../../_Common_Input_Files/Sphere/hydroData/sphere.h5'); % Create the body(1) Variable
body(1).geometryFile = '../../_Common_Input_Files/Sphere/geometry/sphere.stl'; % Location of Geomtry File
body(1).mass = 'equilibrium'; % Body Mass
body(1).inertia = [20907301 21306090.66 37085481.11]; % Moment of Inertia [kg*m^2]

Expand Down
4 changes: 2 additions & 2 deletions Controls/ReactiveWithPTO/wecSimInputFile.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

%% Body Data
% Sphere
body(1) = bodyClass('../hydroData/sphere.h5'); % Create the body(1) Variable
body(1).geometryFile = '../geometry/sphere.stl'; % Location of Geomtry File
body(1) = bodyClass('../../_Common_Input_Files/Sphere/hydroData/sphere.h5'); % Create the body(1) Variable
body(1).geometryFile = '../../_Common_Input_Files/Sphere/geometry/sphere.stl'; % Location of Geomtry File
body(1).mass = 'equilibrium'; % Body Mass
body(1).inertia = [20907301 21306090.66 37085481.11]; % Moment of Inertia [kg*m^2]

Expand Down
Loading