evaluation


Modelica Evaluation Order


I can't really find any answer in the Modelica specification so ill ask you guys. The specification states that
A tool is free to solve equations, reorder expressions and to not evaluate expressions if their values do not influence the result (e.g. short-circuit evaluation of Boolean expressions). If-statements and if-expressions guarantee that their clauses are only evaluated if the appropriate condition is true, but relational operators generating state or time events will during continuous integration have the value from the most recent event.
If a numeric operation overflows the result is undefined. For literals it is recommended to automatically convert the number to another type with greater precision.
Now, I wonder, can the tool choose to evaluate an expression several time in an integrator step? For example (probably not an valid example, just to give you guys an idea of what I was wondering :) )
Real x;
equation
der(x) = -t;
Modelica.Utilities.Streams.print(String(time));
This will print the same time for several times, so I figured that there is some kind of iteration going on. But I would really like to have it confirmed by some source.
That is normal.
Variable step size solvers (like dassl) can go back
and forth in time to find the direction of the curve.
Also, if you have events more values can be generated
at the same time.
If you want to print time or values just at exact time instants you need when equations:
when sample(0, 1) then
Modelica.Utilities.Streams.print(String(time));
end when;
Read more in the Modelica Spec about sample.
Is also possible to use fixed step size solvers like Euler or so.

Related Links

SyntaxNet evaluation metrics
How am I misunderstanding call-by-need evaluation?
Math notation understanding
What criterias do you look for in a WAF (web application firewall)?
Predictionio evaluation fails with Text Classification template
Evaluation of APL direct functions
Modelica Evaluation Order
how compilers evaluate mathematical expressions? [closed]
What does “top-level evaluation” mean?
Boolean expression evaluation with a given context
Is relying on short-circuit evaluation good design? [closed]
Objectively evaluating new GUI toolkits
what are evaluation techniques for HCI projects (without involving users, or psychologist)?
Evaluating developers [closed]
Options to Common Criteria
What are some useful criteria for deciding on which software package to go for?

Categories

HOME
system-calls
postgresql-9.3
azure-eventhub
crm
okhttp3
psexec
sequence
jcodemodel
core-data
mamp
guidewire
resharper
infopath
appsettings
pylint
ringcentral
ofbiz
android-actionbar
my.cnf
suitescript
scripting-language
osgi-bundle
sphinx4
r-factor
xlib
schedule
jql
microstrategy
http-proxy
android-databinding
mybatis-generator
observer-pattern
tapply
quartz
uitextview
irr
rexx
bootstrap-carousel
amazon-fire-tv
chrome-custom-tabs
infovis
yank
stream-socket-client
htop
fckeditor
multi-targeting
overhead
node.js-client
timex
scanf
vertex-shader
fileopendialog
android-music-player
mac-app-store
consolidation
db2-zos
avi
jmh
google-finance-api
adempiere
musicbrainz
consul-template
xml-simple
nmock
cakephp-2.6
chrome-mobile
xmla
unityvs
agent-based-modeling
time-frequency
msdropdown
scjp
android-relativelayout
dylan
nsnumber
stringstream
latex-suite
wordbreaker
ntdll
freeimage
flatten
nserror
advanceddatagrid
pinchzoom
rjs
log-shipping
gmagick
object-tag
fxcopcmd
datarelation
oaw
pitch-shifting
data-formats
atmega16

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App