#3533 closed defect (invalid)
strange behaviour of variableFilter
Reported by: | Owned by: | somebody | |
---|---|---|---|
Priority: | high | Milestone: | never |
Component: | Run-time | Version: | |
Keywords: | regex variable filter | Cc: | Adrian Pop, Martin Sjölund |
Description
My model contains variables p1.pc_t and p1.t.
Matching only second variable does not work with filter p1\.t
In runtime, this variable filter is extended to following regex: ^(p1\.t)$
However, both variables are matched. Is it just me or is there something wrong?
Change History (10)
comment:1 by , 9 years ago
comment:3 by , 9 years ago
Cc: | added |
---|
There is an issue with Q-idents. The following script produces different results on Linux and Windows:
loadString(" model test block foo Real t = cos(time); Real pc_t = sin(time); end foo; foo 'p1'; end test; "); getErrorString(); simulate(test, simflags="-override=outputFormat=csv,variableFilter=\\'p1\\'.t"); getErrorString();
On Linux there is time
and 'p1'.t
in the result file, but on Windows there is only time
in the result file.
comment:4 by , 9 years ago
Running the executable directly from the command prompt produces the same results on Linux and Windows again.
./test -override=outputFormat=csv,variableFilter=\'p1\'.t
follow-up: 6 comment:5 by , 9 years ago
Could be an issue on how OMEdit sends these flags to the simulation executable.
follow-up: 7 comment:6 by , 9 years ago
Replying to adrpo:
Could be an issue on how OMEdit sends these flags to the simulation executable.
OMEdit was not used for any of the tests.
follow-up: 8 comment:7 by , 9 years ago
comment:8 by , 9 years ago
Replying to adrpo:
You didn't use it, but maybe the ticket poster did.
Sorry, maybe I should have said that Christoph - the ticket poster - is my colleague and has also not used OMEdit. He run the executable from command line and used only used override flag to specify the output format and variable filter as in my example from above.
comment:9 by , 9 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
I am not sure what we actually did wrong, but it seems that it is working just fine. It's just about doing the escape sequence right. The following filter matches 'p1'.t
and 'p2'.t_[1]
and works for Windows and Linux:
./test -override=variableFilter=\(\'p1\'\.t\|\'p2\'\.t_\\[1\\]\)
comment:10 by , 9 years ago
Milestone: | Future → never |
---|
Sorting away the closed as invalid, won't fix and duplicate tickets from Future.
I cannot reproduce the issue. I tested it on Linux and Windows using the following script:
The result file does only contain
time
andp1.t
as intended.