Content-Length: 203044 | pFad | http://github.com/dwavesystems/dwave-optimization/issues/157

DB Consider adding state printing · Issue #157 · dwavesystems/dwave-optimization · GitHub
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

Consider adding state printing #157

Open
arcondello opened this issue Oct 31, 2024 · 0 comments
Open

Consider adding state printing #157

arcondello opened this issue Oct 31, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@arcondello
Copy link
Member

It would be nice to be able to print all of the decisions/intermediate states of the model. Something like

>>> print(model.states)
BinaryVariable(5) = [0, 1, 0, 0, 0]
IntegerVariable((2, 3)) = [[0, 15, 5], [1, 4, 2]]

something like this can be accomplished now with

for symbol in model.iter_decisions():
    print(type(symbol))
    print(symbol.state())

but there are many design issues here.

  1. What order do we print the symbols? Topological? Do we require a locked model in order to print? And without some sort of labeling (see Add symbol labels #17) and/or symbol printing (see Consider adding Symbol.__str__() overload #133) it would be hard to disambiguate the symbol that's being printed
  2. Do we print the state of all intermediate symbols or just the decisions? Do we want to make this configurable?
  3. Do we always print all states? Just the first? Make this configurable?
@arcondello arcondello added the enhancement New feature or request label Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/dwavesystems/dwave-optimization/issues/157

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy