Skip to content
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

Variable Encoding #31

Closed
pedromxavier opened this issue Mar 24, 2022 · 0 comments · Fixed by #59
Closed

Variable Encoding #31

pedromxavier opened this issue Mar 24, 2022 · 0 comments · Fixed by #59
Labels
enhancement New feature or request idea This is just an idea next steps Interesting follow-up feature

Comments

@pedromxavier
Copy link
Member

We are currently dealing with variables according to a ::Symbol parameter used to chose how encoding and expansion takes place.

The current VirtualVariable UI takes:

  • Variable bounds [a, b]
  • Encoding technique (Unary/Binary x Binary/Discrete/Real)
  • Is Semidiscrete/Semicontinuous? (Not in use, but already implemented at this level)
  • A variable factory function for initialization
  • A source variable from the original model (if it is not a slack)
  • number of bits
  • variable name (we need it?)

I'm considering refactoring our UI using something like an EncodingType in a similiar fashion as we did with quadratization methods.

The expansion is currently done via Base.iterate(::VirtualVariable) and Base.collect(::VirtualVarible). Both methods yield ::Set{VI}, ::Float64 pairs, which is very PBF-friendly. Indeed, the syntax PBF{VI, Float64}(collect(::VirtualVariable{VI, Float64})) works very well.

A more suitable output UI should also be under investigation since one-hot-encoding (our next milestone) requires the addition of a uniqueness constraint among the generated variables.

@pedromxavier pedromxavier added enhancement New feature or request next steps Interesting follow-up feature idea This is just an idea labels Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request idea This is just an idea next steps Interesting follow-up feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant