Skip to content

Commit

Permalink
OptimizationResult: Drop deprecated getEvaluationNumber
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller committed May 4, 2024
1 parent 3f98160 commit 8cab78b
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 16 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* Removed deprecated Sample/CorrelationAnalysis.computePearsonCorrelation
* Removed deprecated Cobyla/TNC.setIgnoreFailure method
* Removed deprecated OptimizationAlgorithm.setMaximumEvaluationNumber method
* Removed deprecated OptimizationResult.getEvaluationNumber

=== Documentation ===

Expand Down
12 changes: 0 additions & 12 deletions lib/src/Base/Optim/OptimizationResult.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,6 @@ void OptimizationResult::setCallsNumber(const UnsignedInteger callsNumber)
callsNumber_ = callsNumber;
}

UnsignedInteger OptimizationResult::getEvaluationNumber() const
{
LOGWARN("OptimizationResult.getEvaluationNumber is deprecated, use getCallsNumber");
return getCallsNumber();
}

void OptimizationResult::setEvaluationNumber(const UnsignedInteger evaluationNumber)
{
LOGWARN("OptimizationResult.setEvaluationNumber is deprecated, use setCallsNumber");
setCallsNumber(evaluationNumber);
}

/* Iteration number accessor */
UnsignedInteger OptimizationResult::getIterationNumber() const
{
Expand Down
3 changes: 0 additions & 3 deletions lib/src/Base/Optim/openturns/OptimizationResult.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ public:
/** Calls number accessor */
void setCallsNumber(const UnsignedInteger callsNumber);
UnsignedInteger getCallsNumber() const;
// @deprecated
void setEvaluationNumber(const UnsignedInteger evaluationNumber);
UnsignedInteger getEvaluationNumber() const;

/** Iteration number accessor */
void setIterationNumber(const UnsignedInteger iterationNumber);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@
)

optim_res = resultSORM.getOptimizationResult()
print("Simulation budget:", optim_res.getEvaluationNumber())
print("Simulation budget:", optim_res.getCallsNumber())

# %%
# One can see that the probability estimate has been decreased by a factor 10 compared to the FORM estimate.
Expand Down

0 comments on commit 8cab78b

Please sign in to comment.