Open linuxguy123 opened 2 weeks ago
@n0rbed do you have a idea for this one? I guess we only support square linear subsystems because non-square could only give the L2 solution? It might be good to throw a more informative error on that.
@ChrisRackauckas The author didnt use symbolic_solve
here; If he did it wouldnt have worked aswel - We do support parameterizing in symbolic_solve but its a little weak right now (the system is 9 equations in 12 variables)
ERROR: DomainError with The monomial ordering is invalid.:
For symbolic_linear_solve, yes you're right
also, @linuxguy123 , fyi:
If we input
Requ*iIn ~ Vin
instead of
Requ ~ Vin/iIn
For eq9, we get:
1-element Vector{Any}:
Dict{Num, Any}(R2 => R2, i2 => (R3*R5*Vin - R3*Requ*Vin + R4*R5*Vin - R5*Requ*Vin) / (R2*R3*Requ + R2*R4*Requ + R3*R4*Requ + R4*R5*Requ), R1 => (-R2*R3*R5 + R2*R3*Requ - R2*R4*R5 + R2*R4*Requ + R2*R5*Requ - R3*R4*R5 + R3*R4*Requ + R4*R5*Requ) / (R2*R3 + R2*R4 - R2*Requ + R3*R4 + R3*R5 - R3*Requ + R4*R5 - R5*Requ), R5 => R5, Requ => Requ, Vin => Vin, iIn => Vin / Requ, i1 => (R2*R3*Vin + R2*R4*Vin - R2*Requ*Vin + R3*R4*Vin + R3*R5*Vin - R3*Requ*Vin + R4*R5*Vin - R5*Requ*Vin) / (R2*R3*Requ + R2*R4*Requ + R3*R4*Requ + R4*R5*Requ), i4 => (R2*Requ*Vin - R3*R5*Vin + R3*Requ*Vin + R5*Requ*Vin) / (R2*R3*Requ + R2*R4*Requ + R3*R4*Requ + R4*R5*Requ), R4 => R4…)
So solve_multivar suffers a bit when fractions are present. It's a bit difficult to validate this because we have some correctness issues with transendence_basis and the output solely depends on that for nonsquare systems.
Right, non-square are supported, but with a caveat. In transcendence_basis, the heuristic choice is not correct for systems whose irreducible components have different transcendence bases
I had plans to fix this when I had time; for now we can perhaps put a note in the docs that non-square solution is not proven.
Btw, do we get 0 if we substitute the solution back in this example?
I’m trying to find Requ(ivalent) for a circuit in terms of the 5 resistors in the circuit.
I’ve written out the equations for the circuit as follows:
I get a “DimensionMismatch: matrix is not square: dimensions are (9, 1)” error.
What am I doing wrong ?