From d89341a179893ac1b9850a08d4658bd7e7c91d33 Mon Sep 17 00:00:00 2001 From: Michael Tiller Date: Sat, 27 Jun 2026 22:49:38 -0400 Subject: [PATCH] fix: restore protected population in RegionalPopulation Commit 00e04171 changed this declaration from protected to public solely to get it compiling, noting the cause was unclear. Under OpenModelica 1.24.0 / MSL 3.2.3 the protected binding checks cleanly (verified in isolation: protected vs public makes no difference), so the band-aid is unnecessary. Revert to protected to restore the original intent that the variable is internal to the component. Co-Authored-By: Claude Opus 4.8 --- .../Components/LotkaVolterra/Components/RegionalPopulation.mo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ModelicaByExample/Components/LotkaVolterra/Components/RegionalPopulation.mo b/ModelicaByExample/Components/LotkaVolterra/Components/RegionalPopulation.mo index 62c455ff..f85411bb 100644 --- a/ModelicaByExample/Components/LotkaVolterra/Components/RegionalPopulation.mo +++ b/ModelicaByExample/Components/LotkaVolterra/Components/RegionalPopulation.mo @@ -12,7 +12,7 @@ model RegionalPopulation "Population of animals in a specific region" Interfaces.Species species annotation (Placement(transformation(extent={{-10,90},{10,110}}), iconTransformation(extent={{-10,90},{10,110}}))); -public +protected Real population(start=10) = species.population "Population in this region"; initial equation if init==InitializationOptions.FixedPopulation then