Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f509569
added yml file for testing PRs on LTX runner
MatthiasBSchaefer Jan 20, 2026
2bab916
initialize PR_testing on LTX devices
MatthiasBSchaefer Jan 20, 2026
45b4fbc
DUMMY: Only4PRTesting: add whitespaces to CombiTimeTable
MatthiasBSchaefer Jan 20, 2026
daf4de9
Update PRTesting.yml
MatthiasBSchaefer Jan 23, 2026
ea52fe5
Merge branch 'modelica:MatthiasBSchaefer_PRTesting' into MatthiasBSch…
MatthiasBSchaefer Jan 23, 2026
3a4586b
Adapt yml file for pr testing on linux server
MatthiasBSchaefer Mar 5, 2026
854138f
Merge branch 'modelica:MatthiasBSchaefer_PRTesting' into MatthiasBSch…
MatthiasBSchaefer Mar 5, 2026
ade1b0c
Update PRTesting.yml : correct paths
MatthiasBSchaefer Mar 5, 2026
3787f03
adding spaces in Sources.mo
MatthiasBSchaefer Mar 5, 2026
5d0440c
Update PRTesting.yml
MatthiasBSchaefer Mar 7, 2026
66e8dc4
Update PRTesting.yml
MatthiasBSchaefer Mar 7, 2026
5062534
Merge branch 'modelica:MatthiasBSchaefer_PRTesting' into MatthiasBSch…
MatthiasBSchaefer Mar 9, 2026
daf479f
Update Continuous.mo
MatthiasBSchaefer Mar 12, 2026
fbae83c
Initialize CI for PullRequest Testing
MatthiasBSchaefer Mar 19, 2026
72a7897
adapt names
MatthiasBSchaefer Mar 26, 2026
48a0f19
Add trigger workflow for PR testing to get access to variables and se…
MatthiasBSchaefer Mar 31, 2026
5cdacb9
Add main scripts for CI PRTesting and adapt yml
MatthiasBSchaefer Apr 2, 2026
b9afba6
bugifx in CI_ReSim_trigger.yml
MatthiasBSchaefer Apr 2, 2026
c7922ae
Bugfix in CI_ReSim_trigger.yml
MatthiasBSchaefer Apr 2, 2026
27b6eea
remove print step in PRTesting.yml
MatthiasBSchaefer Apr 2, 2026
7b2861a
PRTesting.yml without target
MatthiasBSchaefer Apr 2, 2026
826763a
PRTesting.yml with labeled target
MatthiasBSchaefer Apr 2, 2026
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
7 changes: 7 additions & 0 deletions .CI/ReSim/prepare_pr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
event_number=$1
# checkout the pull request
docker run --name compile_msl --rm --volume shared_data:/shared_data wsm_image /shared_data/run_scripts/git_pr_pull.sh $event_number
# compile msl binaries
docker run --name compile_msl --rm --volume shared_data:/shared_data wsm_image /shared_data/run_scripts/compile_msl.sh /shared_data/repos/pr_testing/ModelicaStandardLibrary
# delete old PRs with same number (in case of a new commit on a PR)
docker run --name compile_msl --rm --volume shared_data:/shared_data dymola_image /shared_data/run_scripts/delete_old_PRs.sh $event_number
33 changes: 33 additions & 0 deletions .CI/ReSim/run_pr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
event_number=$1
master_hash=$2
pkg_name=$3

# Run Modelica in all tools
tools=$4

for tool in $tools
do
uppertool=$tool | tr 'a-z' 'A-Z'
docker run --rm --name $tool\_pr_compare_$event_number\_$pkg_name --volume shared_data:/shared_data $tool\_image python /shared_data/run_scripts/$uppertool\_PR_compare.py $master_hash $event_number $pkg_name
done

#docker run --rm --name dymola_pr_compare_$event_number\_$pkg_name --volume shared_data:/shared_data dymola_image python /shared_data/run_scripts/Dymola_PR_compare.py $master_hash $event_number $pkg_name
#docker run --rm --name om_pr_compare_$event_number\_$pkg_name --volume shared_data:/shared_data om_image python /shared_data/run_scripts/OM_PR_compare.py $master_hash $event_number $pkg_name
#docker run --rm --name wsm_pr_compare_$event_number\_$pkg_name --volume shared_data:/shared_data wsm_image python /shared_data/run_scripts/WSM_PR_compare.py $master_hash $event_number $pkg_name

# create an overview over all tools
docker run --name create_overview_$event_number\_$pkg_name --volume shared_data:/shared_data om_image python /shared_data/run_scripts/overview_report.py $event_number $pkg_name

# clear published directory (web server)
if [ -d "/var/www/html/prs/$event_number/$pkg_name" ]; then
rm -rf "/var/www/html/prs/$event_number/$pkg_name"
fi
if [ ! -d "/var/www/html/prs/$event_number" ]; then
mkdir /var/www/html/prs/$event_number
fi
mkdir /var/www/html/prs/$event_number/$pkg_name

# copy data to webserver directory
docker cp create_overview_$event_number\_$pkg_name:/shared_data/resim_output/PRs/PR_$event_number/$pkg_name/report /var/www/html/prs/$event_number/$pkg_name
docker rm create_overview_$event_number\_$pkg_name
exit $(head -n 1 /var/www/html/prs/$event_number/$pkg_name/status.txt)
18 changes: 18 additions & 0 deletions .github/workflows/CI_ReSim_trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: CI ReSim Trigger

on:
pull_request:
workflow_dispatch:

env:
EVENT_NUMBER: ${{ github.event.number }}
PR_SHA: ${{ github.event.pull_request.base.sha }}

jobs:
get_PR_data:
runs-on: ubuntu-latest
steps:
- name: print vars
run: |
echo "Event Number: ${{ github.env.EVENT_NUMBER }}"
echo "PR Base Hash: ${{ github.env.PR_SHA }}"
44 changes: 44 additions & 0 deletions .github/workflows/PRTesting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI ReSim

on:
pull_request_target:
types: [labeled]
workflow_dispatch:

env:
PR_SERVER: ${{ vars.LTX_PR_SERVER }}
TESTING_TOOLS: ${{ vars.LTX_TESTING_TOOLS }}
EVENT_NUMBER: ${{ github.event.number }}
PR_SHA: ${{ github.event.pull_request.base.sha }}

jobs:
prepare:
runs-on: [ self-hosted, Linux, regression_testing ]
steps:
- uses: actions/checkout@v6
with:
sparse-checkout: './.CI/ReSim'

- name: Checkout code in docker
run: ./.CI/ReSim/prepare_pr.sh ${{ env.EVENT_NUMBER }}

testrun_modelica:
needs: prepare
runs-on: [ self-hosted, Linux, regression_testing ]
environment:
name: Report modelica
url: ${{ env.PR_SERVER }}/${{ env.EVENT_NUMBER }}/Modelica/report/PR_comparison_report.html
steps:
- name: Run tests modelica
run: ./.CI/ReSim/run_pr.sh ${{ env.EVENT_NUMBER }} ${{ env.PR_SHA }} Modelica ${{ env.TESTING_TOOLS }}


testrun_modelicatest:
needs: prepare
runs-on: [ self-hosted, Linux, regression_testing ]
environment:
name: Report modelicatest
url: ${{ env.PR_SERVER }}/${{ env.EVENT_NUMBER }}/ModelicaTest/report/PR_comparison_report.html
steps:
- name: Run tests modelicatest
run: ./.CI/ReSim/run_pr.sh ${{ env.EVENT_NUMBER }} ${{ env.PR_SHA }} ModelicaTest ${{ env.TESTING_TOOLS }}
2 changes: 1 addition & 1 deletion Modelica/Blocks/Continuous.mo
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ to compute u by an algebraic equation.
"Control error (set point - measurement)";
parameter .Modelica.Blocks.Types.SimpleController controllerType=
.Modelica.Blocks.Types.SimpleController.PID "Type of controller";
parameter Real k = 1 "Gain of controller, must be non-zero";
parameter Real k=1 "Gain of controller, must be non-zero";
parameter SI.Time Ti(min=Modelica.Constants.small)=0.5
"Time constant of Integrator block" annotation (Dialog(enable=
controllerType == .Modelica.Blocks.Types.SimpleController.PI or
Expand Down
14 changes: 7 additions & 7 deletions Modelica/Blocks/Sources.mo
Original file line number Diff line number Diff line change
Expand Up @@ -1595,16 +1595,16 @@ parameter Real table[:, <strong>2</strong>]=[0, 0; 1, 1; 2, 4];
parameter Real table[:, :] = fill(0.0, 0, 2)
"Table matrix (time = first column; e.g., table=[0, 0; 1, 1; 2, 4])"
annotation (Dialog(group="Table data definition",enable=not tableOnFile));
parameter String tableName="NoName"
parameter String tableName = "NoName"
"Table name on file or in function usertab (see docu)"
annotation (Dialog(group="Table data definition",enable=tableOnFile));
parameter String fileName="NoName" "File where matrix is stored"
parameter String fileName = "NoName" "File where matrix is stored"
annotation (Dialog(
group="Table data definition",
enable=tableOnFile,
loadSelector(filter="Text files (*.txt);;MATLAB MAT-files (*.mat);;Comma-separated values files (*.csv)",
caption="Open file in which table is present")));
parameter String delimiter="," "Column delimiter character for CSV file"
parameter String delimiter = "," "Column delimiter character for CSV file"
annotation (Dialog(
group="Table data definition",
enable=tableOnFile and isCsvExt),
Expand All @@ -1618,10 +1618,10 @@ parameter Real table[:, <strong>2</strong>]=[0, 0; 1, 1; 2, 4];
"Columns of table to be interpolated"
annotation (Dialog(group="Table data interpretation",
groupImage="modelica://Modelica/Resources/Images/Blocks/Sources/CombiTimeTable.png"));
parameter Modelica.Blocks.Types.Smoothness smoothness=Modelica.Blocks.Types.Smoothness.LinearSegments
parameter Modelica.Blocks.Types.Smoothness smoothness = Modelica.Blocks.Types.Smoothness.LinearSegments
"Smoothness of table interpolation"
annotation (Dialog(group="Table data interpretation"));
parameter Modelica.Blocks.Types.Extrapolation extrapolation=Modelica.Blocks.Types.Extrapolation.LastTwoPoints
parameter Modelica.Blocks.Types.Extrapolation extrapolation = Modelica.Blocks.Types.Extrapolation.LastTwoPoints
"Extrapolation of data outside the definition range"
annotation (Dialog(group="Table data interpretation"));
parameter SI.Time timeScale(
Expand All @@ -1635,7 +1635,7 @@ parameter Real table[:, <strong>2</strong>]=[0, 0; 1, 1; 2, 4];
parameter SI.Time shiftTime=startTime
"Shift time of first table column"
annotation (Dialog(group="Table data interpretation"));
parameter Modelica.Blocks.Types.TimeEvents timeEvents=Modelica.Blocks.Types.TimeEvents.Always
parameter Modelica.Blocks.Types.TimeEvents timeEvents = Modelica.Blocks.Types.TimeEvents.Always
"Time event handling of table interpolation"
annotation (Dialog(group="Table data interpretation", enable=smoothness == Modelica.Blocks.Types.Smoothness.LinearSegments));
parameter Boolean verboseExtrapolation=false
Expand All @@ -1650,7 +1650,7 @@ parameter Real table[:, <strong>2</strong>]=[0, 0; 1, 1; 2, 4];
final parameter Real t_maxScaled=Internal.getTimeTableTmax(tableID)
"Maximum (scaled) abscissa value defined in table";
protected
final parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)*offset[1] else offset)
final parameter Real p_offset[nout] = (if size(offset, 1) == 1 then ones(nout)*offset[1] else offset)
"Offsets of output signals";
parameter Modelica.Blocks.Types.ExternalCombiTimeTable tableID=
Modelica.Blocks.Types.ExternalCombiTimeTable(
Expand Down
Loading