Consider adding state printing

オープン
#157 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python
領域
api

調査の方向性

Issue に示されている既存の model.iter_decisions()、symbol.state()、および提案されている model.states インターフェースから始めます。影響を受ける API エントリポイントを特定する前に、順序、ラベル付け、中間状態、出力設定に関する問題を解決してください。完了とは、実装とテストが可能な程度に動作と範囲が仕様化されていることを意味します。

索引モデルが issue の本文から書いたものです。

説明

enhancement

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 #17) and/or symbol printing (see #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?
主要言語
C++
スター
32
フォーク
38
平均マージ
1日 23時間
マージ済み PR(30日)
20

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

dwavesystems/dwave-optimization のほかの issue

dwavesystems/dwave-optimization の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。