symbench / electric-circuits

Electric Circuits Domain for webGME
https://webgme.symbench.org
Apache License 2.0
12 stars 3 forks source link

Generalize recommendation format from RecommendNextComponents #121

Closed brollb closed 3 years ago

brollb commented 3 years ago

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.

brollb commented 3 years ago

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:

(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"]
  }
]