JuliaSmoothOptimizers / OptimizationProblems.jl

Optimization Problems for Julia
Other
88 stars 48 forks source link

Type unstability of obj() with IntervalBox input #174

Closed d-monnet closed 2 years ago

d-monnet commented 2 years ago

Issues:

  1. Looks like the returned type of obj() is not the same than the second argument when this last is an IntervalBox from the IntervalArithmetics library for some problems.
  2. Error indicates that ^ is not defined for Interval{32}, but it is, for :"broydn7d", "hs101", "hs102", "hs103", "hs104", "hs110", "hs25", "hs70"

I am not sure is the problem comes from JSO or IntervalArithmetics though.

Run attached code for details. interval_type_unstable.zip

d-monnet commented 2 years ago

Note: I is necessary to cast an IntervalBox into vector{Interval} to call obj(). This corresponds to the first lines of the code.

tmigot commented 2 years ago

Thanks @d-monnet for reporting this issue.

The issue for AMPGO14 and schmvett comes from our package. It misses a conversion of pi for both.

Then, there is an issue with the function ^ and also for abs. The problem seems to be that these functions are not defined for Interval derived type used by ForwardDiff. Maybe you can report this on IntervalArithmetic or ForwardDiff directly. For instance,

ForwardDiff.gradient(x -> abs(x[1]), X0)
tmigot commented 2 years ago

Following #184 , it's all from IntervalArithmetics so I am closing this.