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
BUG: sim._check_volume #18
Comments
Hi @sadimoodi , I don't see the problem. >>> round(2.545 / 0.01, 6).is_integer()
False
>>> round(2.54 / 0.01, 6).is_integer()
True |
then why not just use:
This will ensure that the result is a mutiplication of 0.01 without the need for the above validation, you are expecting a two decimal point float in _get_modified_volume because you use:
isnt the above approach simpler and faster? |
Because volume_step is not always 0.01. It is variable and I wanted to support all cases. |
in your pickle files all the instruments where having 0.01 as volume step but i understand where you come from. |
Hmm, I see. So it's not a bug. Anyway, I don't think it has a huge impact on execution speed. |
hello @AminHP ,
There is a bug in the check volume function inside the simulator, you write :
you are rounding the volume to 6 decimals and expecting an integer as a result, this can only be true if the passed volume was an integer, your error message says mutiple of 0.01 (volume step), this also contradicts with your voume check function inside env._get_modified_volume where you expect volume to be mutiple of 0.01 as well.
The text was updated successfully, but these errors were encountered: