Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refs ticket:4850 Belonging to [master]: - OpenModelica/OMCompiler#2332 - OpenModelica/OpenModelica-testsuite#910
- Loading branch information
1 parent
e1daf28
commit b374bc7
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// name: cseSum | ||
// keywords: cse | ||
// status: correct | ||
|
||
loadString(" | ||
function foo | ||
input Real[:] x; | ||
output Real[:] y = x; | ||
end foo; | ||
|
||
model foobar | ||
Real y = sum(foo({time, time*2})); | ||
end foobar; | ||
"); | ||
getErrorString(); | ||
|
||
simulate(foobar); | ||
getErrorString(); | ||
|
||
val(y, {0,1}); | ||
|
||
// Result: | ||
// true | ||
// "" | ||
// record SimulationResult | ||
// resultFile = "foobar_res.mat", | ||
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'foobar', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''", | ||
// messages = "LOG_SUCCESS | info | The initialization finished successfully without homotopy method. | ||
// LOG_SUCCESS | info | The simulation finished successfully. | ||
// " | ||
// end SimulationResult; | ||
// "" | ||
// {0.0,3.0} | ||
// endResult |