- Index
- » Users
- » m7453
- » Profile
Posts
Posts
Page Start Prev 1 Next End
Hello!
I want to run simulations where the input values have discontinuities. Therefor I want to use Modelica.Blocks.Sources.CombiTimeTable. The Sources.mo file says, that the time in the first column in the table need to be only increasing and not strictly increasing. The model is the following (test.mo):
Code:
model test "Test"
import Modelica.Blocks.Sources;
import Modelica.Blocks.Continuous;
import Modelica.Blocks.Math;
import Modelica.Blocks.Tables;
Sources.CombiTimeTable input1(tableOnFile=true,fileName="data01.txt",tableName="tab1");
Math.Gain gain1(k=2);
equation
connect(input1.y[1],gain1.u);
end test;
The file data01.txt is
Code:
#1
double tab1(7,2) # comment line
0 0
1 0
1 1
2 1
3 4
4 9
5 16
When I run the simulation, the output is
Code:
>>> simulate(test,startTime=0,stopTime=6,outputFormat="mat")
record SimulationResult
resultFile = "",
simulationOptions = "startTime = 0.0, stopTime = 6.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'test', storeInTemp = false, noClean = false, options = '', outputFormat = 'mat', variableFilter = '.*', measureTime = false, cflags = ''",
messages = "Simulation execution failed for model: test
TimeTable: Column with time variable not monotonous: 1 >= 1.
Simulation terminated while the initialization. Could not find suitable initial values.
",
timeFrontend = 0.0,
timeBackend = 0.0,
timeSimCode = 0.0,
timeTemplates = 0.0,
timeCompile = 0.0,
timeSimulation = 0.0,
timeTotal = 0.0
end SimulationResult;
Does anyone know, why it does not work with the used data file.
Thank and best regards!
Page Start Prev 1 Next End
- Index
- » Users
- » m7453
- » Profile