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

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?
Having to set objectives for developers, even though objectives don't work [closed]
How would you go about evaluating a programmer? [closed]

Categories

HOME
highmaps
redhawksdr
ms-application-insights
software-collections
jpql
drush
fine-uploader
tmux
jq
include-path
typedef
screen-scraping
wai-aria
devexpress-mvc
knapsack-problem
cloudformation
multiple-inheritance
proof-general
pushpad
hierarchy
federated
concrete5
apm
exacttarget
login-required
spring-oauth2
eclipse-jdt
leaderboard
strategy-pattern
area
jquery-inputmask
compiled-query
uitextview
apiman
reqif
anonymous-function
pyopenssl
beanshell
cancan
totalview
jtextarea
printer-control-language
apache-commons-cli
pyautogui
scanf
mavlink
consolidation
mrunit
boost-bind
pebble-js
jersey-test-framework
web-performance
matlab-engine
php-gd
textblob
litedb
opennebula
tidesdk
ultraedit
indices
report-builder2.0
system.io.packaging
ccmenuitem
triplestore
step
scjp
atg-dynamo
elixir-framework
boofcv
surfaceview
google-voice
8-puzzle
sygic
tlbimp
octokit
caroufredsel
gwt2
xcode4.6.3
beep
optimistic-concurrency
inserthtml
scriptmanager
utm
cgaffinetransform
sipdroid
auto-compile
xhtmlrenderer
chromebug
newspeak
pixel-bender
qlibrary
jgrowl

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