@@ -150,22 +150,11 @@ function compute_gap end
150150"""
151151$TYPEDSIGNATURES
152152
153- Compute `dot(θ, y)`. Override for non-linear objectives.
153+ Compute the objective value of given solution `y` for a specific benchmark.
154+ Must be implemented by each concrete benchmark type. For stochastic benchmarks,
155+ an additional `scenario` argument is required.
154156"""
155- function objective_value (:: AbstractBenchmark , θ:: AbstractArray , y:: AbstractArray )
156- return dot (θ, y)
157- end
158-
159- """
160- $TYPEDSIGNATURES
161-
162- Compute the objective value of given solution `y`.
163- """
164- function objective_value (
165- bench:: AbstractBenchmark , sample:: DataSample{CTX,EX,F,S,C} , y:: AbstractArray
166- ) where {CTX,EX,F,S,C<: AbstractArray }
167- return objective_value (bench, sample. θ, y)
168- end
157+ function objective_value end
169158
170159"""
171160$TYPEDSIGNATURES
@@ -527,7 +516,9 @@ Evaluate a decision `y` against stored scenarios (average over scenarios).
527516function objective_value (
528517 saa:: SampleAverageApproximation , sample:: DataSample , y:: AbstractArray
529518)
530- return mean (objective_value (saa. benchmark, ξ, y) for ξ in sample. extra. scenarios)
519+ return mean (
520+ objective_value (saa. benchmark, sample, y, ξ) for ξ in sample. extra. scenarios
521+ )
531522end
532523
533524"""
0 commit comments