symbench/electric-circuits

Generalize recommendation format from RecommendNextComponents

Closed this issue · 1 comments

The recommendation format returned from RecommendNextComponents should be generalized to support recommending arbitrary subgraphs/sets of nodes or edges rather than simply a single next node. This would simplify recommending a connected node (as well as larger subgraphs).

The problem with the current approach is that recommending a component and linking it would need to be done in two steps (possibly by 2 plugins) but the exchange format between these is nonobvious as the incomplete circuit would likely not be able to be serialized as spice.

One possible format for the recommendations could be returning a list of pairs where the first value is the subgraph and the second is the probability/weight/likelihood.

Subgraphs need to be able to:

  • create (and reference) new nodes
  • define connections between new and existing nodes

(I am imagining this will be the format returned by the analytic and may be post-processed before returning the results to the design studio.)

One possible representation

[
  {
    type: "Resistor",
    pins: ["N0001", "NewNodeReference"]
  },
  {
    type: "Capacitor",
    pins: ["N0009", "NewNodeReference"]
  }
]