Giter Club home page Giter Club logo

Comments (9)

dbhart avatar dbhart commented on July 24, 2024

from wntr.

Stormyend avatar Stormyend commented on July 24, 2024

Thanks a lot for the quick response. This sounds like exciting news, I am looking forward to the updates!
I understand the limitation of the step-size for the EPANET Simulator, but does the same apply to the WNTR simulator? Maybe there are some restrictions I don't see.

from wntr.

kbonney avatar kbonney commented on July 24, 2024

@Stormyend, both simulators use the TimeOptions class for time-based simulation options. The hydraulic_timestep attribute is required to be an integer>=1, which represents the number of seconds for the timestep. For more information, check out the API docs for the mentioned class.

from wntr.

Stormyend avatar Stormyend commented on July 24, 2024

Hi @kbonney , thanks for your response! I understand that the requirement for the timestep is to be >=1, however I was wondering where this limitation comes from, as it is no limitation given by the solver or the equations, but given by the WNTR framework. When I rewrite the modulo-statements to work with floats/timesteps < 1 and bypass the if-statements, the simulation results still seem to be correct.
However I was wondering what the reason for the limitation is in the first place.
I hope my question is clear, thank you very much in advance!

from wntr.

michaelbynum avatar michaelbynum commented on July 24, 2024

@Stormyend - Are you using the EPANET simulator or the WNTR simulator?

from wntr.

Stormyend avatar Stormyend commented on July 24, 2024

Sorry for being vague, I am using the WNTR simulator.

from wntr.

michaelbynum avatar michaelbynum commented on July 24, 2024

This is not a "real" limitation. You are absolutely right. I think we just never considered going less than 1 second. I think there is some logic in there that relies on the time step being an integer (which is why we make sure it is an integer), but that is just an implementation detail. It could certainly be updated.

from wntr.

ucchejbb avatar ucchejbb commented on July 24, 2024

@Stormyend for reference EPANET-MSX now allows microsecond timesteps but as ints (which limits the total duration of a simulation to about 595 hours for extended period simulations). The one consideration when using a float is precision, so will 0.1 or 0.01 timesteps always yield 10 or 100 intervals per second because of machine precision? An alternative approach would be to include a subsecond loop with another range of ints to avoid that possible edge case.

from wntr.

Stormyend avatar Stormyend commented on July 24, 2024

Thank you both for the comments! I will keep the float precision problem in mind when implementing it! :)

from wntr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.