JuliaHomotopyContinuation / HomotopyContinuation.jl

A Julia package for solving systems of polynomials via homotopy continuation.
https://www.JuliaHomotopyContinuation.org
MIT License
181 stars 30 forks source link

type IntrinsicSubspaceHomotopy has no field starts #462

Closed alexheaton2 closed 3 years ago

alexheaton2 commented 3 years ago

Hello everyone. I am getting an error for this code.

xvarz = [Variable(:x,i) for i in 1:3]
g1 = sum([xvarz[i]^2 for i in 1:3]) - 1 # sphere
N,d = 3,2 # ambient dimension, dimension of variety
randL = HomotopyContinuation.rand_subspace(N; codim=d)
randResult = HomotopyContinuation.solve([g1]; target_subspace = randL, variables=xvarz)
randsols = HomotopyContinuation.solutions(randResult)

numsamples = 100
Ωs = HomotopyContinuation.solve(
            [g1],
            randsols;
            variables = xvarz,
            start_subspace = randL,
            target_subspaces = [HomotopyContinuation.rand_subspace(N; codim = d, real = true) for _ in 1:numsamples],
            transform_result = (R,p) -> HomotopyContinuation.real_solutions(R),
            flatten = true
)

The last bit throws an error saying...

type IntrinsicSubspaceHomotopy has no field starts

Stacktrace:
 [1] getproperty(::IntrinsicSubspaceHomotopy{MixedSystem{Int32,(0x293ba38edfa0e852, 1)}}, ::Symbol) at ./Base.jl:33
 [2] target_parameters!(::IntrinsicSubspaceHomotopy{MixedSystem{Int32,(0x293ba38edfa0e852, 1)}}, ::LinearSubspace{Float64}) at /Users/heaton/.julia/packages/HomotopyContinuation/xsVeI/src/homotopies/intrinsic_subspace_homotopy.jl:141
 [3] target_parameters!(::Tracker{IntrinsicSubspaceHomotopy{MixedSystem{Int32,(0x293ba38edfa0e852, 1)}},Array{Complex{Float64},2}}, ::LinearSubspace{Float64}) at /Users/heaton/.julia/packages/HomotopyContinuation/xsVeI/src/tracker.jl:1024
 [4] target_parameters!(::EndgameTracker{IntrinsicSubspaceHomotopy{MixedSystem{Int32,(0x293ba38edfa0e852, 1)}},Array{Complex{Float64},2}}, ::LinearSubspace{Float64}) at /Users/heaton/.julia/packages/HomotopyContinuation/xsVeI/src/endgame_tracker.jl:826
 [5] target_parameters! at /Users/heaton/.julia/packages/HomotopyContinuation/xsVeI/src/solve.jl:647 [inlined]
 [6] many_solve(::Solver{EndgameTracker{IntrinsicSubspaceHomotopy{MixedSystem{Int32,(0x293ba38edfa0e852, 1)}},Array{Complex{Float64},2}}}, ::Array{Array{Complex{Float64},1},1}, ::Array{LinearSubspace{Float64},1}, ::ProgressMeter.Progress, ::var"#108#110", ::typeof(identity), ::Val{true}; threading::Bool, catch_interrupt::Bool) at /Users/heaton/.julia/packages/HomotopyContinuation/xsVeI/src/solve.jl:753
 [7] solve(::Solver{EndgameTracker{IntrinsicSubspaceHomotopy{MixedSystem{Int32,(0x293ba38edfa0e852, 1)}},Array{Complex{Float64},2}}}, ::Array{Array{Complex{Float64},1},1}, ::Array{LinearSubspace{Float64},1}; show_progress::Bool, threading::Bool, catch_interrupt::Bool, transform_result::Function, transform_parameters::Function, flatten::Bool) at /Users/heaton/.julia/packages/HomotopyContinuation/xsVeI/src/solve.jl:698
 [8] solve(::Array{Expression,1}, ::Vararg{Any,N} where N; show_progress::Bool, threading::Bool, catch_interrupt::Bool, target_parameters::Nothing, stop_early_cb::Function, transform_result::Function, transform_parameters::typeof(identity), flatten::Bool, target_subspaces::Array{LinearSubspace{Float64},1}, kwargs::Base.Iterators.Pairs{Symbol,Any,Tuple{Symbol,Symbol},NamedTuple{(:variables, :start_subspace),Tuple{Array{Variable,1},LinearSubspace{Complex{Float64}}}}}) at /Users/heaton/.julia/packages/HomotopyContinuation/xsVeI/src/solve.jl:475
 [9] top-level scope at In[22]:2
 [10] include_string(::Function, ::Module, ::String, ::String) at ./loading.jl:1091
saschatimme commented 3 years ago

Looks like a stupid typo 🤦‍♂️

saschatimme commented 3 years ago

Should be fixed with 2.5.2