Wolfram code gives protected error


So I’m making a sort of graph with 2 main points and I’ve inspired myself on the internet and this is the final piece of code. Unfortunately it gives me a “Protected” error on multiple occasions. How do I solve this?

In[93]:= (*Ecuațiile,ecuațiile inițiale,conectorii și parametrii modelului.*) noOfAnimals = "aniFlow.noOfAnimals"; rate = "aniFlow.rate"; equation = {populationSize'[t] == rate[t],  populationSize[t] == noOfAnimals[t]}; initialEquation = {If[steadyState, populationSize'[0] == 0,  populationSize[0] == initialPopulationSize]}; connectors = {aniFlow \[Element] "PredatorPrey.Components.AnimalConnector",  steadyState \[Element] Booleans}; parameters = {"initialPopulationSize" -> 10, "steadyState" -> False}; mmodel = CreateSystemModel["Hare", Join[equations, initialEquations], t,  connectors, <|"ParameterValues" -> parameters|>] SystemModel[mmodel, "ModelicaDisplay"]   Out[99]= CreateSystemModel["Hare",  Join[equations,  initialEquations], t, {aniFlow \[Element]  "PredatorPrey.Components.AnimalConnector",  steadyState \[Element]  Booleans}, <|"ParameterValues" -> {"initialPopulationSize" -> 10,  "steadyState" -> False}|>]  Out[100]= SystemModel[ CreateSystemModel["Hare", Join[equations, initialEquations],  t, {aniFlow \[Element] "PredatorPrey.Components.AnimalConnector",  steadyState \[Element]  Booleans}, <|"ParameterValues" -> {"initialPopulationSize" -> 10,  "steadyState" -> False}|>], "ModelicaDisplay"]    (*Ieșirea  reprezintă versiunea de vizualizare text Modelica a modelului \ creat*)  In[116]:= model Hare parameter Real initialPopulationSize = 10; parameter Boolean steadyState = false; Real populationSize; PredatorPrey.Components.AnimalConnector aniFlow; initial equation if steadyState then der (populationSize) = 0; else  populationSize = initialPopulationSize; end if; equation der (populationSize) = anyFlow.rate; populationSize = aniFlow.noOfAnimals; end Hare;  Out[116]= Hare CreateSystemModel["Hare", Join[equations, initialEquations],  t, {aniFlow \[Element] "PredatorPrey.Components.AnimalConnector",  SteadyState \[Element]  Booleans}, <|"ParameterValues" -> {"initialPopulationSize" -> 10,  "steadyState" -> False}|>]  During evaluation of In[116]:= Set::write: Tag Times in initialPopulationSize parameter Real is  Protected.  During evaluation of In[116]:= Set::write: Tag Times in Boolean parameter steadyState is Protected.  Out[121]= {initial (Derivative[1][(aniFlow."aniFlow.noOfAnimals")][t] ==  "aniFlow.rate"[t]),  initial ((aniFlow."aniFlow.noOfAnimals")[t] == "aniFlow.noOfAnimals"[t])}  Out[122]= if steadyState then  During evaluation of In[116]:= Set::write: Tag Times in der aniFlow.aniFlow.noOfAnimals is Protected.  Out[124]= else  Out[127]= {Derivative[1][(aniFlow."aniFlow.noOfAnimals")][t] ==  "aniFlow.rate"[t], (aniFlow."aniFlow.noOfAnimals")[t] ==  "aniFlow.noOfAnimals"[t]}  During evaluation of In[116]:= Set::write: Tag Times in der initialPopulationSize is Protected. 

This code insert includes the errors as well.

PS: Please fix the code insert as it is garbage at the moment.