File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -801,12 +801,17 @@ end
801801 end
802802
803803 @parameters p= 2.0 q= missing [guess = 1.0 ] c= 1.0
804- @variables x= 1.0 y= 2.0 z= 3.0
805-
806- eqs = [0 ~ p * (y - x),
807- 0 ~ x * (q - z) - y,
808- 0 ~ x * y - c * z]
809- @mtkbuild sys = NonlinearSystem (eqs; initialization_eqs = [p^ 2 + q^ 2 + 2 p * q ~ 0 ])
804+ @variables x= 1.0 z= 3.0
805+
806+ # eqs = [0 ~ p * (y - x),
807+ # 0 ~ x * (q - z) - y,
808+ # 0 ~ x * y - c * z]
809+ # specifically written this way due to
810+ # https://github.com/SciML/NonlinearSolve.jl/issues/586
811+ eqs = [0 ~ - c * z + (q - z) * (x^ 2 )
812+ 0 ~ p * (- x + (q - z) * x)]
813+ @named sys = NonlinearSystem (eqs; initialization_eqs = [p^ 2 + q^ 2 + 2 p * q ~ 0 ])
814+ sys = complete (sys)
810815 # @mtkbuild sys = NonlinearSystem(
811816 # [p * x^2 + q * y^3 ~ 0, x - q ~ 0]; defaults = [q => missing],
812817 # guesses = [q => 1.0], initialization_eqs = [p^2 + q^2 + 2p * q ~ 0])
You can’t perform that action at this time.
0 commit comments