We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi: I want to use some Measurements variable in optim problem. but have some error,how do I handle it,wish to get reply
using Measurements,Optim f(x)=(1.0 - x[1])^2 + 100.0 * (x[2] - x[1]^2)^2 x=zeros(Measurement{Float64},2) optimize(f,x)
MethodError: no method matching Float64(::Measurement{Float64}) Closest candidates are: Float64(::Real, !Matched::RoundingMode) where T<:AbstractFloat at rounding.jl:200 Float64(::T) where T<:Number at boot.jl:715 Float64(!Matched::Int8) at float.jl:60 ... Stacktrace: [1] convert(::Type{Float64}, ::Measurement{Float64}) at .\number.jl:7 [2] Optim.MultivariateOptimizationResults{NelderMead{Optim.AffineSimplexer,Optim.AdaptiveParameters},Float64,Array{Measurement{Float64},1},Measurement{Float64},Measurement{Float64},Array{OptimizationState{Measurement{Float64},NelderMead{Optim.AffineSimplexer,Optim.AdaptiveParameters}},1},Bool}(::NelderMead{Optim.AffineSimplexer,Optim.AdaptiveParameters}, ::Array{Measurement{Float64},1}, ::Array{Measurement{Float64},1}, ::Measurement{Float64}, ::Int64, ::Bool, ::Bool, ::Measurement{Float64}, ::Measurement{Float64}, ::Measurement{Float64}, ::Measurement{Float64}, ::Bool, ::Measurement{Float64}, ::Measurement{Float64}, ::Measurement{Float64}, ::Measurement{Float64}, ::Bool, ::Measurement{Float64}, ::Measurement{Float64}, ::Bool, ::Array{OptimizationState{Measurement{Float64},NelderMead{Optim.AffineSimplexer,Optim.AdaptiveParameters}},1}, ::Int64, ::Int64, ::Int64, ::Bool, ::Float64, ::Float64) at C:\Users\Administrator\.julia\packages\Optim\SFpsz\src\types.jl:167 [3] optimize(::NonDifferentiable{Measurement{Float64},Array{Measurement{Float64},1}}, ::Array{Measurement{Float64},1}, ::NelderMead{Optim.AffineSimplexer,Optim.AdaptiveParameters}, ::Optim.Options{Float64,Nothing}, ::Optim.NelderMeadState{Array{Measurement{Float64},1},Measurement{Float64},Array{Measurement{Float64},1}}) at C:\Users\Administrator\.julia\packages\Optim\SFpsz\src\multivariate\optimize\optimize.jl:98 [4] optimize(::NonDifferentiable{Measurement{Float64},Array{Measurement{Float64},1}}, ::Array{Measurement{Float64},1}, ::NelderMead{Optim.AffineSimplexer,Optim.AdaptiveParameters}, ::Optim.Options{Float64,Nothing}) at C:\Users\Administrator\.julia\packages\Optim\SFpsz\src\multivariate\optimize\optimize.jl:33 [5] optimize(::Function, ::Array{Measurement{Float64},1}; inplace::Bool, autodiff::Symbol, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at C:\Users\Administrator\.julia\packages\Optim\SFpsz\src\multivariate\optimize\interface.jl:64 [6] optimize(::Function, ::Array{Measurement{Float64},1}) at C:\Users\Administrator\.julia\packages\Optim\SFpsz\src\multivariate\optimize\interface.jl:58 [7] top-level scope at In[48]:1
The text was updated successfully, but these errors were encountered:
Maybe @pkofod has some ideas 🙂
Sorry, something went wrong.
fine I will @pkofod
For reference, an issue has been opened in Optim.jl: JuliaNLSolvers/Optim.jl#823
Optim.jl
sorry I did not see this issue. Will think about the feedback Mosè gave on the other issue.
No branches or pull requests
Hi:
I want to use some Measurements variable in optim problem.
but have some error,how do I handle it,wish to get reply
The text was updated successfully, but these errors were encountered: