ASKSAGE: Sage Q&A Forum - Latest question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 27 Aug 2019 07:44:34 -0500Stopiteration Raisedhttps://ask.sagemath.org/question/47619/stopiteration-raised/I am using gray codes to generate a set of of combinations and testing each combination for certain qualities. I have never had the code fail for any reason before this run. I kind of no idea why this would occur. There should be many more test cases. Has anyone seen G.eulerian_circuit() fail with a StopIteration before? I can post more code if needed.
Find all length 13 sets from 36 edges
Processing | | 4329384/2310789600
Traceback (most recent call last):
File "fold.sage.py", line 334, in <module>
planar, G = gray(flatten, all_vertex_pairs)
File "fold.sage.py", line 70, in gray
flag, planar, G = test_edges(all_vertex_pairs, s, flatten)
File "fold.sage.py", line 243, in test_edges
if G.eulerian_circuit() is False:
File "/opt/sagemath-8.6/local/lib/python2.7/site-packages/sage/graphs/generic_graph.py", line 3935, in eulerian_circuit
next_edge = next(g_edge_iter(v))
StopIterationmqpsfTue, 27 Aug 2019 07:44:34 -0500https://ask.sagemath.org/question/47619/Efficient fields over arithmetic circuitshttps://ask.sagemath.org/question/46328/efficient-fields-over-arithmetic-circuits/What type of fields are used when we want to have efficient reduction over Fp ?jonathansmithWed, 24 Apr 2019 01:54:19 -0500https://ask.sagemath.org/question/46328/Graph theory for symbolic electrical circuit analysis?https://ask.sagemath.org/question/32977/graph-theory-for-symbolic-electrical-circuit-analysis/Looking for how to go from graph theory directly to solve circuit/nodal analysis.
This link has been helpful: (have to google graphsandckts.pdf because I can't post the link) but I seem to be getting lost in the graph theory part. Circuit analysis software like SPICE must do something like this numerically.
I can build a directed graph in Sagemath by adding vertices/edges.
Sagemath will return the incidence matrix. Or you can enter the incidence matrix directly but for something like a circuit netlist it can be a lot easier to enter nodes, ie. vertices of the graph.
Resistances/impedances go into a diagonal matrix R, known voltages/currents go into a vector.
I'm not clear on finding the spanning tree/re-arranging the incidence matrix.
Seems like this should be some standard graph theory or linear algebra functions. You eliminate one row/column and should have a matrix A =[ At I ]
where At = edges in the graph spanning tree and I = n x n identity matrix.
The rest should be basic linear algebra: transpose, inverse, multiplying it out
John Paul MorrisonSun, 03 Apr 2016 14:21:14 -0500https://ask.sagemath.org/question/32977/