Zero issueshttps://git.ligo.org/sean-leavey/zero/-/issues2021-10-02T01:00:13Zhttps://git.ligo.org/sean-leavey/zero/-/issues/49Allow connecting sub-circuits together to form a larger circuits2021-10-02T01:00:13ZAnchal GuptaAllow connecting sub-circuits together to form a larger circuitsWe should take advantage of the circuit being a class fully by allowing connecting different circuit objects together to form bigger circuits. This will make zero scalable and will make debugging easier.
I think we can define a function ...We should take advantage of the circuit being a class fully by allowing connecting different circuit objects together to form bigger circuits. This will make zero scalable and will make debugging easier.
I think we can define a function like:
```
def combineCircuits(Cir1,Cir2,['cir1n1->cir2n2','cir1n2->cir2n5',.....]):
.
.
.
return combinedCircuit
```
Here, Cir1 and Cir2 are two different circuit objects and the third argument is the mapping of node connections to be made. The combined circuit will have all nodes of Cir1 and all nodes of Cir2 except for those which have been merged with nodes of Cir1.Node graphshttps://git.ligo.org/sean-leavey/zero/-/issues/48Node regeneration required when circuit nodes are manipulated2020-01-28T15:06:09ZAnchal GuptaNode regeneration required when circuit nodes are manipulatedI have attached a notebook example which illustrates this issue.[NodeRegenerationOnCircuitChanges.ipynb](/uploads/e7c5a5fa96d331884c3bfddd0098bc9a/NodeRegenerationOnCircuitChanges.ipynb). Right after someone changes any node of a circuit...I have attached a notebook example which illustrates this issue.[NodeRegenerationOnCircuitChanges.ipynb](/uploads/e7c5a5fa96d331884c3bfddd0098bc9a/NodeRegenerationOnCircuitChanges.ipynb). Right after someone changes any node of a circuit, there are no calls made to _regenerate_node_set() function. I see this is because nodes are set through property setter function and in that scope, it doesn't have knowledge of the circuit object it is part of.
Due to this, right after a node is manipulated, the number of nodes circuit.n_nodes and the list of nodes circuit.nodes is outdated and may have errors in them unless _regenerate_node_set() is called. There are two solutions that I can think of:
1) Ban changing the nodes of the circuit object directly and define the set_node function to ensure _regenerate_node_set is called inside it.
2) Some clever __setitem__ function for the circuit object which works with dictionary-like functionality of circuit as well. I'm not really sure if this is possible, but this will be way more intuitive and will make using circuit['r1'].node2='n3' legal.Node graphshttps://git.ligo.org/sean-leavey/zero/-/issues/29Handle mutual inductances where one component has been deleted2019-08-08T06:14:46ZSean LeaveyHandle mutual inductances where one component has been deletedMutual inductances are stored in `Inductor` objects, but they have no way of knowing if the other inductor has since been deleted from the circuit. Perhaps use `weakref` to check, or have the `Circuit` object deal with cleaning up induc...Mutual inductances are stored in `Inductor` objects, but they have no way of knowing if the other inductor has since been deleted from the circuit. Perhaps use `weakref` to check, or have the `Circuit` object deal with cleaning up inductor references.Node graphsSean LeaveySean Leaveyhttps://git.ligo.org/sean-leavey/zero/-/issues/9Support not loaded/not connected components2020-01-28T15:06:09ZSean LeaveySupport not loaded/not connected componentsWhen the value of a component is "NL" or "NC", add the component to the circuit but have the solver exclude such components from the calculations. This means that the component will still show up in the graph or representation of the cir...When the value of a component is "NL" or "NC", add the component to the circuit but have the solver exclude such components from the calculations. This means that the component will still show up in the graph or representation of the circuit, and can still have its value assigned interactively, or from within a loop.Node graphsSean LeaveySean Leavey