- Index
- » Users
- » powerpsy
- » Profile
Posts
Posts
Solved by adding a input and evaluating it at the beginning:
Code:
loadModel(Modelica)
Sam
Hi, doing the code written on the first post with OpenModelica 1.8.1 I get the following error:
simulate(test,startTime=0,stopTime=6,outputFormat="mat")
Code:
record SimulationResult
resultFile = "",
simulationOptions = "startTime = 0.0, stopTime = 6.0, numberOfIntervals = 500, tolerance = 1e-006, method = 'dassl', fileNamePrefix = 'test', storeInTemp = false, noClean = false, options = '', outputFormat = 'mat', variableFilter = '.*', measureTime = false, cflags = '', simflags = ''",
messages = "Simulation failed for model: test
[<interactive>:6:3-6:89:writable] Error: Class Sources.CombiTimeTable not found in scope test.
Error: Error occurred while flattening model test
",
timeFrontend = 0.0,
timeBackend = 0.0,
timeSimCode = 0.0,
timeTemplates = 0.0,
timeCompile = 0.0,
timeSimulation = 0.0,
timeTotal = 0.0
end SimulationResult;
It seems the Source.om is not found or read ? any hints ? Is it OpenModelica specific ?
Thanks in advance,
Sam
Hi all,
Let's say I have a simple model: y = a*t+b
Where:
t is the time
a is a variable that is read from a txt file, which depend on time.
b is a fixed parameter
model simple
constant Real b=1;
Real a,y
equation
y = a*time+b;
end simple;
now I have the txt file looking like:
t a
0 1.0
5 1.1
11 1.0
17 0.9
...
I would like to launch a simulation taking the values from txt file (with linear interpolation between values for a continuous time simulation).
Is there a example on this topic somewhere ?
Thanks in advance,
Sam
- Index
- » Users
- » powerpsy
- » Profile