Opened 10 years ago
Last modified 10 years ago
#3176 new defect
String parameters cannot be changed at run-time
Reported by: | jwharington@… | Owned by: | somebody |
---|---|---|---|
Priority: | high | Milestone: | Future |
Component: | Run-time | Version: | trunk |
Keywords: | Cc: |
Description
Using -override or by editing the _init.xml file, parameters of type String ignore the start value and use whatever value was set at compilation.
Change History (2)
comment:1 Changed 10 years ago by lochel
- Component changed from Unknown to Run-time
comment:2 Changed 10 years ago by jwharington@…
Here's an example. If the String is not used in a CombiTable1Ds, it's ok (works with override), but in the example below it can't be overridden.
class TestString import Modelica.Utilities.Streams.print; parameter String par = "parameter_default"; Modelica.Blocks.Tables.CombiTable1Ds ctable(tableOnFile = true, fileName = par, u = time); initial equation print("Data is " + par); end TestString;
./TestString -override par="foo" The file name for a table (= "parameter_default") is defined, but not the corresponding table name.
I cannot reproduce the issue here. It is possible to manipulate each kind of parameter using the override flag.
Can you please provide an example that covers the issue?