From c81c03736cea6d413e6beed2cc2357f6be6574f6 Mon Sep 17 00:00:00 2001 From: Dialectiek Date: Tue, 9 Dec 2025 15:12:29 +0100 Subject: [PATCH 1/6] updated workflow because tests succeed locally... --- .github/workflows/test_examples.yml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test_examples.yml b/.github/workflows/test_examples.yml index 398c1c1..afb7e5d 100644 --- a/.github/workflows/test_examples.yml +++ b/.github/workflows/test_examples.yml @@ -1,38 +1,31 @@ name: Test Examples -# Workflow triggers tell GitHub when to run the workflow: -# a) when there is a new commit on the main or develop branch -# b) when a new pull request is opened to merge a branch into main or develop on: push: branches: [ "main", "develop"] pull_request: branches: [ "main", "develop"] -# This workflow defines one job: test-examples jobs: test-examples: - - # Use ubuntu-latest runner. - # See https://github.com/actions/runner-images for a list of available runners. runs-on: ubuntu-latest - - steps: - # Checkout a copy of this repository on the runner - # We use the "checkout" GitHub Action - # https://github.com/actions/checkout + steps: + # Checkout the repository - uses: actions/checkout@v4 + # Setup Miniconda - uses: conda-incubator/setup-miniconda@v3 with: - activate-environment: illuminator-examples auto-activate-base: false - - name: Create conda environment from environment.yml - run: conda env update -n illuminator-examples -f environment.yml + # Create a fresh conda environment from environment.yml + - name: Create conda environment + run: conda env create -n illuminator-examples -f environment.yml --force + # Activate environment and run tests - name: Run tests shell: bash -l {0} run: | + conda activate illuminator-examples pytest -v From 0fb527b10ca42d4c978ed88dbb94964bc6f80f72 Mon Sep 17 00:00:00 2001 From: Dialectiek Date: Tue, 9 Dec 2025 15:15:48 +0100 Subject: [PATCH 2/6] new yml for workflow --- .github/workflows/test_examples.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_examples.yml b/.github/workflows/test_examples.yml index afb7e5d..8634ffe 100644 --- a/.github/workflows/test_examples.yml +++ b/.github/workflows/test_examples.yml @@ -11,17 +11,23 @@ jobs: runs-on: ubuntu-latest steps: - # Checkout the repository + # Checkout repository - uses: actions/checkout@v4 # Setup Miniconda - uses: conda-incubator/setup-miniconda@v3 with: auto-activate-base: false + # optional: specify Python version for conda itself + python-version: 3.11 - # Create a fresh conda environment from environment.yml + # Remove environment if it exists + - name: Remove old conda environment + run: conda env remove -n illuminator-examples || true + + # Create conda environment from environment.yml - name: Create conda environment - run: conda env create -n illuminator-examples -f environment.yml --force + run: conda env create -n illuminator-examples -f environment.yml # Activate environment and run tests - name: Run tests From 114dea6955dcb21a70383777dc69503bc27832fc Mon Sep 17 00:00:00 2001 From: JortGroen <7791955+JortGroen@users.noreply.github.com> Date: Fri, 6 Mar 2026 17:14:57 +0100 Subject: [PATCH 3/6] update yaml for core update --- ...al_physical_congestion_RES_bat_elec_loadshift.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tutorials/physical_congestion/data/Tutorial_physical_congestion_RES_bat_elec_loadshift.yaml b/tutorials/physical_congestion/data/Tutorial_physical_congestion_RES_bat_elec_loadshift.yaml index 552548d..c9f9a68 100644 --- a/tutorials/physical_congestion/data/Tutorial_physical_congestion_RES_bat_elec_loadshift.yaml +++ b/tutorials/physical_congestion/data/Tutorial_physical_congestion_RES_bat_elec_loadshift.yaml @@ -49,7 +49,7 @@ models: tolerance_limit: 0.67 # a load on the connection between 67% and 90% is tolerable but causes a warning critical_limit: 0.9 # a load on the connection over 90% of the connection capacity is critical inputs: - dump: 0 + power_flow: 0 states: flag_critical: # flag_warning: @@ -64,6 +64,8 @@ models: outputs: load_dem: # total energy or power consumption for all houses (kWh) over the time step consumption: # Current energy or power consumption based on the number of houses and input load (kWh) + states: + load_dem_state: 0 # incoming energy or power demand per house (kWh) for each time step (15 minutes) - name: Load_EV1 type: LoadEV @@ -110,6 +112,8 @@ models: outputs: pv_gen: g_aoi: + states: + pv_genState: 0 - name: Wind1 type: Wind # models can reuse the same type @@ -128,6 +132,7 @@ models: u: # Adjusted wind speed (m/s) at 25m height after converting from the original height (e.g., 100m or 60m). states: u60: 0 # Wind speed at 60m height (m/s) used to calculate the wind power generation. + wind_genState: 0 # State variable to track the current power output or energy generation of the wind turbine. - name: Battery1 type: Battery # models can reuse the same type @@ -148,6 +153,8 @@ models: mod: 0 # operation mode: 0=no action, 1=charge, -1=discharge soc: 10 # state of charge of the battery (%) flag: 0 # flag indicating battery status: 1=fully charged, -1=fully discharged, 0=available for control + p_in_state: 0 # data on current power input to the battery (kW) + p_out_state: 0 # data on current power output of the battery (kW) - name: Controller1 type: ControllerT3Congestion # models can reuse the same type @@ -227,7 +234,7 @@ connections: time_shifted: True - from: Controller1.dump - to: Grid1.dump + to: Grid1.power_flow - from: Grid1.flag_warning to: Controller1.flag_warning From 27fc2fc4576c9d5108097fe6118b11dceb580994 Mon Sep 17 00:00:00 2001 From: Jort Groen <7791955+JortGroen@users.noreply.github.com> Date: Fri, 6 Mar 2026 17:22:26 +0100 Subject: [PATCH 4/6] tmp test --- tests/test_tutorials.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_tutorials.py b/tests/test_tutorials.py index d6ae48f..0615170 100644 --- a/tests/test_tutorials.py +++ b/tests/test_tutorials.py @@ -18,6 +18,7 @@ def test_physical_congestion(tmp_path: Path): - Numerical equality (within a tolerance) for 'Controller1.dump' """ # Copy entire tutorial directory (including data folder) into tmp_path/physical_congestion + print("jort tmp test") tutorial_dir = Path("tutorials/physical_congestion") running_dir = tmp_path / "physical_congestion" shutil.copytree(tutorial_dir, running_dir, ignore=ignore_cache_dirs) From 1b4bbc0427d5ebb6c1067d6afb4a2e6aa8f4bd5a Mon Sep 17 00:00:00 2001 From: JortGroen <7791955+JortGroen@users.noreply.github.com> Date: Tue, 26 May 2026 10:17:02 +0200 Subject: [PATCH 5/6] update expected data for congestion tutorial --- ...ut_Tutorial_bat_elec_assets_load_shift.csv | 188 +++++++++--------- 1 file changed, 94 insertions(+), 94 deletions(-) diff --git a/tests/expected_data/physical_congestion/out_Tutorial_bat_elec_assets_load_shift.csv b/tests/expected_data/physical_congestion/out_Tutorial_bat_elec_assets_load_shift.csv index 284c68b..229ccaa 100644 --- a/tests/expected_data/physical_congestion/out_Tutorial_bat_elec_assets_load_shift.csv +++ b/tests/expected_data/physical_congestion/out_Tutorial_bat_elec_assets_load_shift.csv @@ -1,96 +1,96 @@ date,Controller1.dump 2012-02-01,-15.536747115713691 -2012-02-01 00:15:00,-10.5 -2012-02-01 00:30:00,-10.5 -2012-02-01 00:45:00,-10.5 -2012-02-01 01:00:00,-10.5 -2012-02-01 01:15:00,-10.5 -2012-02-01 01:30:00,-10.5 -2012-02-01 01:45:00,-10.5 -2012-02-01 02:00:00,-10.5 -2012-02-01 02:15:00,-10.5 -2012-02-01 02:30:00,-10.5 -2012-02-01 02:45:00,-10.5 -2012-02-01 03:00:00,-10.5 -2012-02-01 03:15:00,-10.5 -2012-02-01 03:30:00,-10.5 -2012-02-01 03:45:00,-10.5 -2012-02-01 04:00:00,-10.5 -2012-02-01 04:15:00,-10.5 -2012-02-01 04:30:00,-10.5 -2012-02-01 04:45:00,-10.5 -2012-02-01 05:00:00,-10.5 -2012-02-01 05:15:00,-10.5 -2012-02-01 05:30:00,-10.5 -2012-02-01 05:45:00,-10.5 -2012-02-01 06:00:00,-10.5 -2012-02-01 06:15:00,-10.5 -2012-02-01 06:30:00,-10.5 -2012-02-01 06:45:00,-10.5 -2012-02-01 07:00:00,-10.5 -2012-02-01 07:15:00,-10.5 -2012-02-01 07:30:00,-10.5 -2012-02-01 07:45:00,-10.5 -2012-02-01 08:00:00,-10.5 -2012-02-01 08:15:00,-10.5 -2012-02-01 08:30:00,-10.5 -2012-02-01 08:45:00,-10.5 -2012-02-01 09:00:00,-10.5 -2012-02-01 09:15:00,-10.5 -2012-02-01 09:30:00,-10.5 -2012-02-01 09:45:00,-10.5 -2012-02-01 10:00:00,-10.5 -2012-02-01 10:15:00,-10.5 -2012-02-01 10:30:00,-10.5 -2012-02-01 10:45:00,-10.5 -2012-02-01 11:00:00,-10.5 -2012-02-01 11:15:00,-10.5 -2012-02-01 11:30:00,-10.5 -2012-02-01 11:45:00,-10.5 -2012-02-01 12:00:00,-10.5 -2012-02-01 12:15:00,-10.5 -2012-02-01 12:30:00,-10.5 -2012-02-01 12:45:00,-10.5 -2012-02-01 13:00:00,-10.5 -2012-02-01 13:15:00,-10.5 -2012-02-01 13:30:00,-10.5 -2012-02-01 13:45:00,-10.5 -2012-02-01 14:00:00,-10.5 -2012-02-01 14:15:00,-10.5 -2012-02-01 14:30:00,-10.5 -2012-02-01 14:45:00,-10.5 -2012-02-01 15:00:00,-10.5 -2012-02-01 15:15:00,-10.5 -2012-02-01 15:30:00,-10.5 -2012-02-01 15:45:00,-10.5 -2012-02-01 16:00:00,-10.5 -2012-02-01 16:15:00,-10.5 -2012-02-01 16:30:00,-10.5 -2012-02-01 16:45:00,-10.5 -2012-02-01 17:00:00,-10.5 -2012-02-01 17:15:00,-10.5 -2012-02-01 17:30:00,-10.5 -2012-02-01 17:45:00,-10.5 -2012-02-01 18:00:00,-10.5 -2012-02-01 18:15:00,-10.5 -2012-02-01 18:30:00,-10.5 -2012-02-01 18:45:00,-10.5 -2012-02-01 19:00:00,-10.5 -2012-02-01 19:15:00,-10.5 -2012-02-01 19:30:00,-10.5 -2012-02-01 19:45:00,-10.5 -2012-02-01 20:00:00,-10.5 -2012-02-01 20:15:00,-10.5 -2012-02-01 20:30:00,-10.5 -2012-02-01 20:45:00,-10.5 -2012-02-01 21:00:00,-10.5 -2012-02-01 21:15:00,-10.5 -2012-02-01 21:30:00,-10.5 -2012-02-01 21:45:00,-10.5 -2012-02-01 22:00:00,-10.5 -2012-02-01 22:15:00,-10.5 -2012-02-01 22:30:00,-10.5 -2012-02-01 22:45:00,-10.5 -2012-02-01 23:00:00,-10.5 -2012-02-01 23:15:00,-10.5 -2012-02-01 23:30:00,-10.5 +2012-02-01 00:15:00,-14.854553459334957 +2012-02-01 00:30:00,-11.536725723300131 +2012-02-01 00:45:00,-11.457077463128675 +2012-02-01 01:00:00,-8.726688542059382 +2012-02-01 01:15:00,-13.46611491119928 +2012-02-01 01:30:00,-11.814682166650993 +2012-02-01 01:45:00,-11.596356372082493 +2012-02-01 02:00:00,-14.381186400785483 +2012-02-01 02:15:00,-13.073729125282998 +2012-02-01 02:30:00,-9.57051955778332 +2012-02-01 02:45:00,-11.69057121458618 +2012-02-01 03:00:00,-10.695664409305945 +2012-02-01 03:15:00,-10.855405365108941 +2012-02-01 03:30:00,-8.95967356044388 +2012-02-01 03:45:00,-9.698475321518043 +2012-02-01 04:00:00,-9.230084271143918 +2012-02-01 04:15:00,-13.077351470508937 +2012-02-01 04:30:00,-10.592304251649002 +2012-02-01 04:45:00,-11.628027518304508 +2012-02-01 05:00:00,-9.337052837455502 +2012-02-01 05:15:00,-9.937744438291906 +2012-02-01 05:30:00,-7.3617048260942415 +2012-02-01 05:45:00,-9.750150590966985 +2012-02-01 06:00:00,-10.61829407898035 +2012-02-01 06:15:00,-11.72569598031281 +2012-02-01 06:30:00,-12.954812836592017 +2012-02-01 06:45:00,-12.305316722318857 +2012-02-01 07:00:00,-10.572276970136212 +2012-02-01 07:15:00,-10.874361101454818 +2012-02-01 07:30:00,-13.864243633137756 +2012-02-01 07:45:00,-14.061186431240264 +2012-02-01 08:00:00,-13.197715737071523 +2012-02-01 08:15:00,-13.247212795703385 +2012-02-01 08:30:00,-11.097434272812425 +2012-02-01 08:45:00,-11.666721356657314 +2012-02-01 09:00:00,-13.213046934648004 +2012-02-01 09:15:00,-7.518349403544138 +2012-02-01 09:30:00,-10.31067386757334 +2012-02-01 09:45:00,-11.32206315564952 +2012-02-01 10:00:00,-6.262143231191394 +2012-02-01 10:15:00,-26.013117476452678 +2012-02-01 10:30:00,-15.715685265245387 +2012-02-01 10:45:00,-15.010905416499144 +2012-02-01 11:00:00,-19.714311296698625 +2012-02-01 11:15:00,-14.49694740239919 +2012-02-01 11:30:00,-12.072302103655256 +2012-02-01 11:45:00,-10.483023531668882 +2012-02-01 12:00:00,-4.68792540994686 +2012-02-01 12:15:00,-4.047366251299134 +2012-02-01 12:30:00,-6.530016807825397 +2012-02-01 12:45:00,-5.264609532063124 +2012-02-01 13:00:00,-7.496642435031255 +2012-02-01 13:15:00,-15.58235012141391 +2012-02-01 13:30:00,-9.276131617965492 +2012-02-01 13:45:00,-10.276190108026665 +2012-02-01 14:00:00,-11.254062624413034 +2012-02-01 14:15:00,-6.116738503249418 +2012-02-01 14:30:00,-4.902894149972077 +2012-02-01 14:45:00,-6.72398421290306 +2012-02-01 15:00:00,-6.472785899721678 +2012-02-01 15:15:00,-3.495432326610201 +2012-02-01 15:30:00,-9.412164281593672 +2012-02-01 15:45:00,-7.925667460974129 +2012-02-01 16:00:00,-8.318549677880693 +2012-02-01 16:15:00,-5.618729940457792 +2012-02-01 16:30:00,-10.854354341043855 +2012-02-01 16:45:00,-12.466544171008733 +2012-02-01 17:00:00,-9.528662955078941 +2012-02-01 17:15:00,-11.286986536799104 +2012-02-01 17:30:00,-11.254459037547125 +2012-02-01 17:45:00,-9.03601637267616 +2012-02-01 18:00:00,-14.978092703386155 +2012-02-01 18:15:00,-33.22393527370776 +2012-02-01 18:30:00,-30.543547918711127 +2012-02-01 18:45:00,-31.266026081138747 +2012-02-01 19:00:00,-33.249733983732625 +2012-02-01 19:15:00,-33.94295275335173 +2012-02-01 19:30:00,-42.42189438348847 +2012-02-01 19:45:00,-33.98154861826937 +2012-02-01 20:00:00,-29.55654706043012 +2012-02-01 20:15:00,-24.78622084091682 +2012-02-01 20:30:00,-20.482648917969822 +2012-02-01 20:45:00,-16.21784997088451 +2012-02-01 21:00:00,-13.009709373360295 +2012-02-01 21:15:00,-9.784515292367734 +2012-02-01 21:30:00,-13.451415216029188 +2012-02-01 21:45:00,-11.140439934025757 +2012-02-01 22:00:00,-13.705957337947668 +2012-02-01 22:15:00,-12.463205337216023 +2012-02-01 22:30:00,-10.26993758982245 +2012-02-01 22:45:00,-10.09216585799856 +2012-02-01 23:00:00,-10.310821160387047 +2012-02-01 23:15:00,-10.897140040860412 +2012-02-01 23:30:00,-11.845784088165196 From 63e29743119cf47c19be1d460debae6a5213f02a Mon Sep 17 00:00:00 2001 From: Jort Groen <7791955+JortGroen@users.noreply.github.com> Date: Tue, 26 May 2026 10:56:39 +0200 Subject: [PATCH 6/6] removing test print --- tests/test_tutorials.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_tutorials.py b/tests/test_tutorials.py index 0615170..d6ae48f 100644 --- a/tests/test_tutorials.py +++ b/tests/test_tutorials.py @@ -18,7 +18,6 @@ def test_physical_congestion(tmp_path: Path): - Numerical equality (within a tolerance) for 'Controller1.dump' """ # Copy entire tutorial directory (including data folder) into tmp_path/physical_congestion - print("jort tmp test") tutorial_dir = Path("tutorials/physical_congestion") running_dir = tmp_path / "physical_congestion" shutil.copytree(tutorial_dir, running_dir, ignore=ignore_cache_dirs)