-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Start values topic should also mention fixed attribute #133
Comments
In fact almost all simple domain models use start values and fixed attributes. Also start values are easier to implement than initial equations for a Modelica compiler vendor. |
There is one more strong argument for using the start/fixed attributes in preference. You can modify them, i.e. set them by dialog. |
Mike, can you please commenr on this issue. I consider it as an important issue not just a matter of taste. |
Thomas, I agree with you in general on this point and I think more discussion on this topic is required in the book. I simply haven't had the time to invest in that part just yet. I have a conference coming up so I'm pretty busy with that at the moment. Hopefully once that is done I'll have a bit more time to think about this. |
Thomas, I've added some further discussion about |
Maybe you also want to add a model that makes use of it. E.g. BasicEquations\LotkaVolterra\ClassicModelFixedStartValues.mo |
This is what I mean within ModelicaByExample.BasicEquations.LotkaVolterra;
model ClassicModelFixedStartValues "This is the typical equation-oriented model"
parameter Real alpha=0.1 "Reproduction rate of prey";
parameter Real beta=0.02 "Mortality rate of predator per prey";
parameter Real gamma=0.4 "Mortality rate of predator";
parameter Real delta=0.02 "Reproduction rate of predator per prey";
parameter Real x0=10 "Initial prey population";
parameter Real y0=10 "Initial predator population";
Real x(start=x0, fixed=true) "Prey population";
Real y(start=y0, fixed=true) "Predator population";
equation
der(x) = x*(alpha-beta*y);
der(y) = y*(delta*x-gamma);
end ClassicModelFixedStartValues; |
When you speak about start values first time (in Lotka-Volterra Systems) you compare advantages and disadvantages with initial equations. What I miss here is the introduction of the fixed attribute which means - if set to fixed - that the start attribute is no longer just a hint but a fixed initial assignment.
The text was updated successfully, but these errors were encountered: