Skip to content

uniqueness of names #548

Closed
Closed
@mlubin

Description

@mlubin

On the call yesterday we discussed the issue about names for display purposes being different than names that one would want to use as unique lookup keys. I proposed allowing two different names per variable/constraint, a lookup name and a display name. Thinking about it more, this seems too complicated.

New proposal: We allow variables to have arbitrary non-unique names. On lookup, if there are two variables with the same name, we throw an error. That's all.

Pros:

  • This is overall less breaking from 0.18
  • Simple rules
  • We already allow variables to have non-unique lookup names (the empty string), so this removes that exception

Cons:

  • Authors of code that generates JuMP sub-models will have to decide if they prefer simple names that print well or names that are guaranteed to be unique and useful for lookup

@ccoffrin @jd-lara @IainNZ

jump-dev/JuMP.jl#1292

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions