#6030 closed defect (fixed)
Resimulate doesn't read the updated value from resource file
Reported by: | Adeel Asghar | Owned by: | Karim Adbdelhak |
---|---|---|---|
Priority: | blocker | Milestone: | 1.16.0 |
Component: | Run-time | Version: | |
Keywords: | Cc: |
Description
- Load the attached package in OMEdit
- Simulate model
ParametersTest.M
- Update the value of parameter
a
from 5 to 3 in theResources/parameters.txt
file. - Resimulate the model.
This is working fine in 1.14 so its a regression.
Attachments (3)
Change History (12)
by , 5 years ago
Attachment: | ParametersTest.zip added |
---|
comment:1 by , 5 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
by , 5 years ago
comment:2 by , 5 years ago
Works perfectly fine for me (see attached file test.mos
to reproduce). It gives me follwing output:
true "" true "" true "" record SimulationResult resultFile = "/home/kab/Repo/FH/promotion/modelicaLibs/ticketTests/6030_resimulate/ParametersTest/ParametersTest.M_res.mat", simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'ParametersTest.M', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''", messages = "LOG_SUCCESS | info | The initialization finished successfully without homotopy method. LOG_SUCCESS | info | The simulation finished successfully. ", timeFrontend = 0.319610634, timeBackend = 0.005402797, timeSimCode = 0.006130322000000001, timeTemplates = 0.0067082, timeCompile = 0.70830842, timeSimulation = 0.015158859, timeTotal = 1.061422651 end SimulationResult; "" 5.0 "" true "" record SimulationResult resultFile = "/home/kab/Repo/FH/promotion/modelicaLibs/ticketTests/6030_resimulate/ParametersTest/ParametersTest.M_res.mat", simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'ParametersTest.M', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''", messages = "LOG_SUCCESS | info | The initialization finished successfully without homotopy method. LOG_SUCCESS | info | The simulation finished successfully. ", timeFrontend = 0.330398854, timeBackend = 0.002453019, timeSimCode = 0.00507403, timeTemplates = 0.005688008, timeCompile = 0.726595409, timeSimulation = 0.014970361, timeTotal = 1.085277973 end SimulationResult; "" 3.0 ""
Is this not what you would expect?
Tested on Ubuntu 18.04 with latest omc OMCompiler v1.16.0-dev.438+g65a42873ff
.
comment:4 by , 5 years ago
Your script calls simulate
which is not really a resimulate as it calls the translation of model again.
follow-up: 6 comment:5 by , 5 years ago
I added test_2.mos
script which showcases the problem. This is due to NF evaluating the function which reads the file.
Model after new Frontend:
class ParametersTest.M constant String config.paramFile = "/home/kab/Repo/FH/promotion/modelicaLibs/ticketTests/6030_resimulate/ParametersTest/Resources/Parameters.txt"; parameter Real config.a = 3.0; end ParametersTest.M;
comment:6 by , 5 years ago
Replying to Karim.Abdelhak:
I added
test_2.mos
script which showcases the problem. This is due to NF evaluating the function which reads the file.
Fixed in 0c5b95d.
follow-up: 9 comment:8 by , 5 years ago
Thank you folks! If we keep on fixing tickets at this pace, in a couple years the backlog will be gone :)
comment:9 by , 5 years ago
Replying to casella:
Thank you folks! If we keep on fixing tickets at this pace, in a couple years the backlog will be gone :)
Nah don't be scared, i am already brewing up the next bugs. ;)
test with two different parameter values