You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The import clause in ModelicaByExample.Components.LotkaVolterra.Examples.ThirdSpecies is invalid; quoting System Modeler:
Error: ModelicaByExample.Components.LotkaVolterra.Examples.ThirdSpecies [2:3-2:3] Invalid qualified import. ModelicaByExample.Components.LotkaVolterra.Components.RegionalPopulation.InitializationOptions.FixedPopulation is an enumeration element and ModelicaByExample.Components.LotkaVolterra.Components.RegionalPopulation.InitializationOptions is a type but a qualified import must reference a package or a package element.
A simple fix is to simply not do the import:
--- a/ModelicaByExample/Components/LotkaVolterra/Examples/ThirdSpecies.mo
+++ b/ModelicaByExample/Components/LotkaVolterra/Examples/ThirdSpecies.mo
@@ -1,8 +1,7 @@
within ModelicaByExample.Components.LotkaVolterra.Examples;
model ThirdSpecies "Adding a third species to Lotka-Volterra"
- import ModelicaByExample.Components.LotkaVolterra.Components.RegionalPopulation.InitializationOptions.FixedPopulation;
extends ClassicLotkaVolterra(rabbits(initial_population=25), foxes(initial_population=2));
- Components.RegionalPopulation wolves(init=FixedPopulation, initial_population=4)
+ Components.RegionalPopulation wolves(init=Components.RegionalPopulation.InitializationOptions.FixedPopulation, initial_population=4)
annotation (Placement(transformation(extent={{30,40},{50,60}})));
Components.Starvation wolf_starvation(gamma=0.4)
annotation (Placement(transformation(extent={{70,40},{90,60}})));
The text was updated successfully, but these errors were encountered:
The
import
clause inModelicaByExample.Components.LotkaVolterra.Examples.ThirdSpecies
is invalid; quoting System Modeler:A simple fix is to simply not do the import:
The text was updated successfully, but these errors were encountered: