Skip to content

Commit 28925e1

Browse files
committed
Fixed ideal point in KS and nadir point in TV
1 parent 297b9f5 commit 28925e1

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

src/algorithms/KirlikSayin.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ function optimize_multiobjective!(algorithm::KirlikSayin, model::Optimizer)
111111
return status, nothing
112112
end
113113
_, Y = _compute_point(model, variables, f_i)
114-
yI[i] = Y + 1
114+
yI[i] = Y
115115
model.ideal_point[i] = Y
116116
MOI.set(
117117
model.inner,
@@ -125,7 +125,7 @@ function optimize_multiobjective!(algorithm::KirlikSayin, model::Optimizer)
125125
return status, nothing
126126
end
127127
_, Y = _compute_point(model, variables, f_i)
128-
yN[i] = Y
128+
yN[i] = Y + 1
129129
end
130130
# Reset the sense after modifying it.
131131
MOI.set(model.inner, MOI.ObjectiveSense(), sense)

src/algorithms/TambyVanderpooten.jl

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,9 @@ function optimize_multiobjective!(
100100
warm_start_supported = true
101101
end
102102
solutions = Dict{Vector{Float64},Dict{MOI.VariableIndex,Float64}}()
103-
YN = Vector{Float64}[]
104103
variables = MOI.get(model.inner, MOI.ListOfVariableIndices())
105104
n = MOI.output_dimension(model.f)
106-
yI, yN = zeros(n), zeros(n)
105+
yI = zeros(n)
107106
scalars = MOI.Utilities.scalarize(model.f)
108107
for (i, f_i) in enumerate(scalars)
109108
MOI.set(model.inner, MOI.ObjectiveFunction{typeof(f_i)}(), f_i)
@@ -114,18 +113,10 @@ function optimize_multiobjective!(
114113
return status, nothing
115114
end
116115
_, Y = _compute_point(model, variables, f_i)
117-
yI[i] = Y + 1
116+
yI[i] = Y
118117
model.ideal_point[i] = Y
119-
MOI.set(model.inner, MOI.ObjectiveSense(), MOI.MAX_SENSE)
120-
MOI.optimize!(model.inner)
121-
status = MOI.get(model.inner, MOI.TerminationStatus())
122-
if !_is_scalar_status_optimal(status)
123-
_warn_on_nonfinite_anti_ideal(algorithm, sense, i)
124-
return status, nothing
125-
end
126-
_, Y = _compute_point(model, variables, f_i)
127-
yN[i] = Y
128118
end
119+
yN = fill(typemax(Float64), n)
129120
MOI.set(model.inner, MOI.ObjectiveSense(), MOI.MIN_SENSE)
130121
U_N = Dict{Vector{Float64},Vector{Vector{Vector{Float64}}}}()
131122
V = [Tuple{Vector{Float64},Vector{Float64}}[] for k in 1:n]

0 commit comments

Comments
 (0)