lanl-ansi / WaterModels.jl

A Julia/JuMP Package for Water Distribution Network Optimization
https://lanl-ansi.github.io/WaterModels.jl/latest/
Other
70 stars 11 forks source link

Rename formulation types #105

Closed tasseff closed 4 years ago

tasseff commented 4 years ago

Use a convention similar to the new version of GasModels.

tasseff commented 4 years ago

Suggested renaming:

NLP -> P (Full physics) MILP -> LAP (Piecewise-linear approximation of the physics) MICPR -> CRDP (Convex relaxation of disjunctive physics) MILPR -> LRDP (Linear relaxation of disjunctive physics)

tasseff commented 4 years ago

@ccoffrin, thoughts on this renaming? @rb004f and I also discussed potentially using WP (Water Physics) instead of P.

ccoffrin commented 4 years ago

Maybe keep NLP, but with the long name "full NonLinear Physics"? or NCP for "full NonConvex Physics"?

tasseff commented 4 years ago

Yeah, I think NCP might make sense. Is it intuitive and accurate, though, if it also includes discrete control decisions in NCP?

ccoffrin commented 4 years ago

Maybe NCP ("full NonConvex Physics") and MINCP ("full NonConvex and disjunctive Physics")? I thought the MI was indicating the disjunctive physics model?

tasseff commented 4 years ago

Here, MILP is not disjunctive, just a piecewise-linear approximation. In MILPR and MICP, they were the disjunctive (in direction) forms.

rb004f commented 4 years ago

Yes, this is it includes discrete control decisions. This is one of the reasons to go to this naming convention. With the math programming like naming conventions we had before, people thought they couldn't do discrete controls on a "NLP" model. So, the distinction seems to name make sense, and was inspired by PowerModels, is use names that talk about how the physics is modeled

tasseff commented 4 years ago

In that respect, maybe avoiding mathematical programming terminology like nonconvex and mixed-integer should be avoided. So maybe not NCP or MINCP.

rb004f commented 4 years ago

It is ok to use math terms, but we need the trailing "physics" in the acronym to make that it clear that it is a modifier on physics and not math programming. Though, I avoided mixed integer because that felt too math programming. I went with D for disjunctive (which could also be directed)

tasseff commented 4 years ago

In that case, maybe the following?

NLP -> NCP (Full nonconvex physics) MILP -> LAP (Piecewise-linear approximation of the physics) MICPR -> CRDP (Convex relaxation of disjunctive physics) MILPR -> LRDP (Linear relaxation of disjunctive physics)

ccoffrin commented 4 years ago

Over time do you expect all names to end with "P"? If so, maybe it can be dropped because it is always constant?

tasseff commented 4 years ago

Good point. We will use the following, then:

NLP -> NC (Full nonconvex physics) MILP -> LA (Piecewise-linear approximation of the physics) MICPR -> CRD (Convex relaxation of disjunctive physics) MILPR -> LRD (Linear relaxation of disjunctive physics)

ccoffrin commented 4 years ago

How would imagining naming different variants on approximations and relaxation? In PowerModels we use the variable space/model names, e.g. QC, WR, WRM, ... to distinguish different relaxations.

tasseff commented 4 years ago

I would imagine that anything that is an approximation of the full nonconvex physics will have no suffix (e.g., "LA"), and anything that uses the disjunctive (directed) forms will have the suffix "D." In the near term, I would expect to create a directed, equality-constrained quadratic formulation (for each pump's head gain, with the remaining constraints being linear), and I suppose we would call this "QD?" It definitely gets a bit tricky once we start making formulation assumptions for specific components... Open to better ideas, here.

ccoffrin commented 4 years ago

It definitely gets a bit tricky once we start making formulation assumptions for specific components... Open to better ideas, here.

I would recommend encoding that kind of distinction into the problem/constraint names. A lesson I think we are learning in PowerModels is less model types is better, when possible. You want just enough to enumerate the big-global modeling assumptions.

With my remark, I was wondering more about two different approximations, like LA1, LA2, ...; Maybe one example to motivate, how might you distinguish between a fixed interval linear approximation and an adaptive interval linear approximation?

I thin the "D" suffix is a good convention.

tasseff commented 4 years ago

I hadn't considered the case of having two formulations that use the same sort of approximation/relaxation but with subtly different assumptions (e.g., your LA1 and LA2 example). I think there are sufficiently few formulations that are implemented (or will be implemented) at the moment that we don't need to overly complicate the names. I also tend to think that subtle modifications to formulations might be better controlled by keyword arguments to build_model.

ccoffrin commented 4 years ago

Sounds good. I am good with the proposal for,

NLP -> NC (Full nonconvex physics) MILP -> LA (Piecewise-linear approximation of the physics) MICPR -> CRD (Convex relaxation of disjunctive physics) MILPR -> LRD (Linear relaxation of disjunctive physics)