Skip to content

Commit

Permalink
repeated eval fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sunethwarna authored Aug 5, 2024
1 parent 932884f commit fee23b9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def EvaluateResponseExpression(response_expression: str, optimization_problem: O
# if the response has children and has some dependence on the variables, then
# we need to use the EvaluationResponseFunction to clear the evaluation data
# whenever CalculateValue, CalculateGradient is used.
evaluated_response = EvaluationResponseFunction(__EvaluateResponseExpressionImpl(response_expression, optimization_problem), optimization_problem)
evaluated_response = EvaluationResponseFunction(evaluated_response_impl, optimization_problem)
optimization_problem.AddComponent(evaluated_response)
return evaluated_response
else:
Expand All @@ -243,4 +243,4 @@ def EvaluateResponseExpression(response_expression: str, optimization_problem: O
# 3. Has children, no dependence variables -> An expression with only LiteralValueResponses and functions, without any responses such as mass.
# in the above cases, there is no need to clear the response evaluation data, hence the original evaluated
# response is returned without the EvaluationResponseFunction wrapper.
return evaluated_response_impl
return evaluated_response_impl

0 comments on commit fee23b9

Please sign in to comment.