Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to R2024b #31

Merged
merged 45 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
ce2a354
Update HTML files to open models or scripts from hyperlinks. Save all…
isaacito12 Jun 23, 2023
8d8b3eb
Update ChangeLog.md.
isaacito12 Jun 23, 2023
24c6177
Merge branch 'mathworks:R2023a' into R2023a
isaacito12 Sep 27, 2023
bf9ce29
Merge branch 'mathworks:R2023b' into R2023b
isaacito12 Sep 27, 2023
874805e
Minor update of jupyter.ci
isaacito12 Sep 29, 2023
cee137d
Merge branch 'mathworks:R2023b' into R2023b
isaacito12 Oct 11, 2023
ff13218
Merge commit 'cee137d4ee975ad387849db5d843046ad3f6d92a' into R2023b
isaacito12 Oct 11, 2023
c2e04ea
Update PMSM data.
isaacito12 Oct 11, 2023
d639362
Clean up PMSM Motor files.
isaacito12 Oct 11, 2023
d14a0a7
Merge branch 'mathworks:R2023b' into R2023b
isaacito12 Dec 15, 2023
489a5e4
Use buildtools in Battery High Voltage component
isaacito12 Dec 15, 2023
dd63347
Update buildfile.m at the project root.
isaacito12 Dec 15, 2023
7f0ab07
Add buildtool-results folder to the project.
isaacito12 Dec 15, 2023
783f49e
Update .github/workflow/ci.yml file. Set up cache folder.
isaacito12 Dec 16, 2023
0cb43f9
Merge remote-tracking branch 'upstream/R2023b' into R2023b
isaacito12 Apr 5, 2024
b7f5964
Generate Markdowns instead of Jupyter notebooks.
isaacito12 Apr 12, 2024
5a60140
Merge remote-tracking branch 'upstream/R2023b' into R2023b
isaacito12 May 31, 2024
dbe7074
Add Vehicle1D performance design app.
isaacito12 Jun 25, 2024
6677fc0
Update .github/workflows/ci.yml file to use R2024a in Actions.
isaacito12 Jun 25, 2024
d92f043
Update README.md and ChangeLog.md files.
isaacito12 Jun 25, 2024
2eb03c4
Make sure buildtool-based tests all pass
isaacito12 Jun 25, 2024
c01eeed
Merge branch 'mathworks:R2024a' into R2024a
isaacito12 Jun 25, 2024
6539977
Update live script to markdown.
isaacito12 Jun 27, 2024
a69ad0f
Add the project navigator app. Clean up project shortcuts.
isaacito12 Jul 31, 2024
92c258c
Automatically open the project navigator when the project is opened.
isaacito12 Jul 31, 2024
0afb0e9
Update dependency cache file.
isaacito12 Jul 31, 2024
355f328
Attempt to merge conflicts.
isaacito12 Jul 31, 2024
23eadd2
Merge remote-tracking branch 'upstream/R2024a' into R2024a
isaacito12 Jul 31, 2024
d01b07b
Resolve merge conflicts in R2024a branch with upstream/R2024a.
isaacito12 Jul 31, 2024
b2cdc59
Cleanup the repository based on the result of resolving merge conflicts.
isaacito12 Jul 31, 2024
004850e
Update VehicleSpeedReference component: Remove the WLTP drive cycle s…
isaacito12 Aug 1, 2024
a69bbe1
Update everything impacted by the removal of WLTP simulation case. Ma…
isaacito12 Aug 1, 2024
7550667
Merge remote-tracking branch 'upstream/R2024a' into R2024a
isaacito12 Aug 1, 2024
efbfe75
Merge branch 'mathworks:R2024a' into R2024a
isaacito12 Nov 19, 2024
0a7e09b
Create R2024b branch and use R2024b MATLAB.
isaacito12 Nov 19, 2024
68b0a85
Update the project startup code for R2024b.
isaacito12 Nov 19, 2024
2112ed7
Update the project navigation app.
isaacito12 Nov 19, 2024
cc876c1
Remove the WLTP simulation script.
isaacito12 Nov 19, 2024
3999f0c
Update the project main script. Make all buildtool-driven tests pass.
isaacito12 Nov 19, 2024
69bb987
Update the GitHub Actions setup to use R2024b.
isaacito12 Nov 19, 2024
84dc873
Update the API version in the GitHub Actions setup.
isaacito12 Nov 19, 2024
d0243b2
Generate new Markdown files from Live scripts in R2024b.
isaacito12 Nov 19, 2024
53e9860
Update documents such as README.
isaacito12 Nov 20, 2024
f3b953c
Update Vehicle1D component to test exported Markdown files are up to …
isaacito12 Nov 20, 2024
efbff39
Update README and ChangeLog.
isaacito12 Nov 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ name: CI using MATLAB

on:
push:
branches: [ R2024a ]
branches: [ R2024b ]
paths-ignore:
- 'docs/**'
- '**.md'
Expand All @@ -25,7 +25,7 @@ on:
- '**.xml'

pull_request:
branches: [ R2024a ]
branches: [ R2024b ]
paths-ignore:
- 'docs/**'
- '**.md'
Expand All @@ -41,9 +41,9 @@ on:

jobs:

job-buildtool-23b:
job-buildtool-24b:

name: Test in R2024a
name: Test in R2024b

runs-on: ubuntu-latest

Expand All @@ -60,7 +60,7 @@ jobs:
- name: Setup MATLAB
uses: matlab-actions/setup-matlab@v2
with:
release: R2024a
release: R2024b
cache: true
products: |
Simulink
Expand All @@ -81,7 +81,7 @@ jobs:
command: openProject(pwd); buildtool CodeIssues CheckProject Test

- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: cache/buildtool-results/code-issues.sarif
Expand All @@ -95,14 +95,14 @@ jobs:

- name: Upload Test Report
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Test Results
path: cache/buildtool-results/test-results.pdf

- name: Upload All Artifacts
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: All Artifacts
path: cache/buildtool-results
Expand Down
Binary file modified BEV/BEV_main_script.mlx
Binary file not shown.
915 changes: 460 additions & 455 deletions BEV/BEV_system_model.mdl

Large diffs are not rendered by default.

Binary file modified BEV/SimulationCases/BEV_Case_Constant_Basic.mlx
Binary file not shown.
Binary file modified BEV/SimulationCases/BEV_Case_Constant_Thermal.mlx
Binary file not shown.
Binary file modified BEV/SimulationCases/BEV_Case_FTP75_Basic.mlx
Binary file not shown.
Binary file modified BEV/SimulationCases/BEV_Case_HighSpeed_Basic.mlx
Binary file not shown.
Binary file modified BEV/SimulationCases/BEV_Case_SimpleDrivePattern_Basic.mlx
Binary file not shown.
Binary file modified BEV/SimulationCases/BEV_Case_SimpleDrivePattern_Thermal.mlx
Binary file not shown.
Binary file removed BEV/SimulationCases/BEV_Case_WLTP_Basic.mlx
Binary file not shown.
4 changes: 0 additions & 4 deletions BEV/SimulationCases/BEV_Case_test.m
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ function MQC_SimpleDrivePattern_Thermal_1(~)
BEV_Case_SimpleDrivePattern_Thermal
end

function MQC_WLTP_Basic_1(~)
BEV_Case_WLTP_Basic
end

end % methods

methods(TestMethodSetup)
Expand Down
75 changes: 0 additions & 75 deletions BEV/markdown/BEVProject_main_script.md

This file was deleted.

2 changes: 1 addition & 1 deletion BEV/markdown/BEV_Case_Constant_Basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ VehSpdRef_loadCase_Constant( ...
Setting up simulation...
Simulation case: Constant
Setting simulation stop time to 1000 sec.
Selecting simulation case 5.
Selecting simulation case 4.
```

```matlab
Expand Down
3 changes: 1 addition & 2 deletions BEV/markdown/BEV_Case_Constant_Thermal.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ BEV_useComponents_Thermal

```matlabTextOutput
Use thermal models for Motor Drive Unit and High Voltage Battery components.
Warning: BatteryHV_refsub_SystemSimple (systems/system_root.xml, line 342): Simulink.DataType object 'Bus_HighVoltage' is not in scope from 'BatteryHV_refsub_SystemSimple/Simscape Bus'
```

```matlab
Expand All @@ -24,7 +23,7 @@ VehSpdRef_loadCase_Constant( ...
Setting up simulation...
Simulation case: Constant
Setting simulation stop time to 1000 sec.
Selecting simulation case 5.
Selecting simulation case 4.
```

```matlab
Expand Down
38 changes: 0 additions & 38 deletions BEV/markdown/BEV_Case_WLTP_Basic.md

This file was deleted.

22 changes: 7 additions & 15 deletions BEV/markdown/BEV_main_script.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@

<a name="T_0F8BC05C"></a>

# <span style="color:rgb(213,80,0)">Battery Electric Vehicle (BEV) System Level Model</span>
<a name="beginToc"></a>

## Table of Contents
[Introduction](#H_A0C28D4F)
&emsp;[Introduction](#introduction)

[Run Simulation](#H_EC484CEF)
&emsp;[Run Simulation](#run-simulation)

[Save Result](#H_EF7BCF44)
&emsp;[Save Result](#save-result)

[Analyse Result](#H_81E3C32A)
&emsp;[Analyse Result](#analyse-result)

<a name="endToc"></a>
<a name="H_A0C28D4F"></a>

# Introduction

Expand All @@ -29,8 +26,6 @@ This script shows an example workflow to programmatically open model, run simula

You can find more scripts demonstrating other simulation cases in the **SimulationCases** folder.

<a name="H_EC484CEF"></a>

# Run Simulation

This section sets up the model and runs simulation. To run this script at once, navigate Toolstrip > Live Editor tab, and click "Run" button. You can also run this section only by clicking "Run Section" button.
Expand Down Expand Up @@ -85,7 +80,6 @@ exportgraphics(fig, fullfile(prjRoot, "BEV", "results", imgFilename))

<center><img src="media/BEV_main_script_media/figure_0.png" width="702" alt="figure_0.png"></center>

<a name="H_EF7BCF44"></a>

# Save Result

Expand Down Expand Up @@ -136,8 +130,6 @@ writetimetable(simData, simResultFile_FullPath)

Open the saved CSV file in text editor and check that the variable names are saved at the first line as expected.

<a name="H_81E3C32A"></a>

# Analyse Result

This section reads a simulation result CSV file which was saved in the previous section, and do some analysis on the data. This section should work independently without running the previous section as long as the result file exists. At the end of this section, you get the electric efficiency of the vehicle according to the drive cycle for which the data was collected.
Expand Down Expand Up @@ -216,7 +208,7 @@ averageSpeed = sum(vehicleSpeed)/numel(vehicleSpeed)

```matlabTextOutput
averageSpeed =
37.4561 (km/hr)
37.4472 (km/hr)

```

Expand Down Expand Up @@ -264,7 +256,7 @@ batteryEnergyUsed = sum(batteryPower(2:end).*dt)

```matlabTextOutput
batteryEnergyUsed =
518.2202 (kW*s)
518.2258 (kW*s)

```

Expand All @@ -283,7 +275,7 @@ energyEfficiency_kWh_per_100km = 100 * value(batteryEnergyUsed / travelledDistan
```

```matlabTextOutput
energyEfficiency_kWh_per_100km = 14.9538
energyEfficiency_kWh_per_100km = 14.9539
```

*Copyright 2022\-2024 The MathWorks, Inc.*
Expand Down
Binary file not shown.
Binary file not shown.
Binary file modified BEV/markdown/media/BEV_Case_Constant_Basic_media/figure_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BEV/markdown/media/BEV_Case_Constant_Thermal_media/figure_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BEV/markdown/media/BEV_Case_FTP75_Basic_media/figure_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BEV/markdown/media/BEV_Case_HighSpeed_Basic_media/figure_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified BEV/markdown/media/BEV_main_script_media/figure_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BEV/results/BEV_SimulationResultPlot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading