Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

floating point format mismatch between loading and saving files #282

Open
swilske opened this issue Apr 15, 2019 · 1 comment
Open

floating point format mismatch between loading and saving files #282

swilske opened this issue Apr 15, 2019 · 1 comment

Comments

@swilske
Copy link

swilske commented Apr 15, 2019

Having a simple model with only one basic event which has a constant value of "25e-9". If you save this model to xml, close scram-gui, reopen it and load the file you get an error.

The file i get:

<?xml version="1.0" encoding="UTF-8"?>
<opsa-mef>
  <model-data>
    <define-basic-event name="BE">
      <label>BE1</label>
      <float value="2,5e-08"/>
    </define-basic-event>
  </model-data>
</opsa-mef>

The error i get:

Invalid input file

File: /home/user/theses/computation/safety/testFile.xml
Line: 6

Error details:

scram::xml::ValidityError

Element float failed to validate attributes

If you change the float value to 25e-9 instead of 2,5e-8 (2.5e-8 does not work as well), it now works fine.

EDIT:
SCRAM 0.16.2 on
Ubuntu 18.04 64 bit

@rakhimov
Copy link
Owner

Thank you for reporting in a so detailed manner. Yes, it seems GUI is localizing floats upon saves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants