Consider adding state printing
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 issue 中所示的现有 model.iter_decisions()、symbol.state() 接口以及提议的 model.states 接口开始。在确定受影响的 API 入口点之前,先解决排序、标记、中间状态和输出配置问题;完成意味着行为和范围已经明确到足以实现和测试。
由索引模型根据 Issue 内容生成。
描述
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.
- 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 #17) and/or symbol printing (see #133) it would be hard to disambiguate the symbol that's being printed
- Do we print the state of all intermediate symbols or just the decisions? Do we want to make this configurable?
- Do we always print all states? Just the first? Make this configurable?
- 主要语言
- C++
- 星标
- 32
- 派生
- 38
- 平均合并
- 1 天 23 小时
- 30 天内合并 PR
- 20
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dwavesystems/dwave-optimization 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
dwavesystems/dwave-optimization#505 · 1 条评论 ·
维护者通常 2 天内回复
-
enhancement question
难度 4/5 3-5 天 新手友好度 45/100
dwavesystems/dwave-optimization#699 ·
维护者通常 2 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 48/100
dwavesystems/dwave-optimization#673 · 1 条评论 ·
维护者通常 2 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 30/100
dwavesystems/dwave-optimization#657 ·
维护者通常 2 天内回复
-
bug
难度 3/5 1-2 天 新手友好度 65/100
dwavesystems/dwave-optimization#631 ·
维护者通常 2 天内回复
查看 dwavesystems/dwave-optimization 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 90/100
维护者通常 2 天内回复
-
bug data-types
难度 2/5 1-3 小时 新手友好度 76/100
ClickHouse/clickhouse-cpp#645 ·
维护者通常 1 天内回复
-
bug compatibility difficulty:easy prio:normal
难度 2/5 1-3 小时 新手友好度 74/100
NatronGitHub/openfx-misc#524 ·
维护者通常 1 天内回复
-
documentation enhancement help wanted P0
难度 2/5 1-3 小时 新手友好度 68/100
Awesome-Embedded-Learning-Studio/Tutorial_AwesomeModernCPP#359 ·
维护者通常 1 天内回复
-
Type: Bug
难度 2/5 1-3 小时 新手友好度 82/100
openscad/openscad#7360 · 2 条评论 ·
维护者通常 1 天内回复