Code Monkey home page Code Monkey logo

Comments (6)

ccoffrin avatar ccoffrin commented on May 31, 2024

Concerning these three points,

  1. Mathematical Model, i.e. MINLP or MISCOP, etc.
  2. Direction, i.e. whether or not the flow directions are fixed or not
  3. Pipeflow physics, i.e. Hazen-Williams or Darcy-Weichbach

Following the lessons from PowerModels I would recomend: (1) be solved with a model types; (2) be handed with different problem specifications, not types; (3) I am inclined to say this should also be different problem specifications as well, but it might also be reasonable to do with types. I would need to discuss the differences in the physics.

from watermodels.jl.

tasseff avatar tasseff commented on May 31, 2024

Concerning (2), I think this should be done through problem specification, not type. This is primarily because there may be occasions where it is useful to assume fixed directions for a only a subset of flow variables.

Concerning (3), I think this should also be handled via problem specification. Otherwise, the model will need to be constructed with the proper type after inspection of the friction formulation being used, as specified by the user's input file. We could, of course, read in the input data, then make this choice, but that seems to diverge from the way PowerModels and GasModels models are constructed.

from watermodels.jl.

rb004f avatar rb004f commented on May 31, 2024

I am open to discussion on how we engineer this. I would prefer to keep conditional statements out of the definitions of the constraints and variables. (i.e. if darcy do this. if directed do this). So, I'd like to see separate functions for each of these definitions. Then it can be the responsibility of the problem definition or type definition to determine which function to call.

In other words, I don't think the determination of the directed vs undirected etc should live in the data, rather that should be defined in the model type or problem definition. Maybe we can discuss this afternoon?

from watermodels.jl.

tasseff avatar tasseff commented on May 31, 2024

Regarding our discussion today, the following decisions were made:

  1. Mathematical models will be typed.
  2. Direction will be specified through the data model. Separate sets of directed and undirected edges will be maintained in ref. These sets will be looped over in the corresponding model post method, where different constraints will be applied within each loop.
  3. The physical model used (i.e., Hazen-Williams or Darcy-Weisbach) will be typed.

from watermodels.jl.

rb004f avatar rb004f commented on May 31, 2024

Just to clarify, on #3, these will be typed at the problem specification level, i.e. having something like post_wf_hw and post_wf_dw

from watermodels.jl.

ccoffrin avatar ccoffrin commented on May 31, 2024

I second @rb004f's remark.

from watermodels.jl.

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.