Skip to content

Commit

Permalink
Added the ability to calculate criteria one by one (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
LebedevIlyaG committed May 15, 2024
1 parent d33eade commit 2b6ad95
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions iOpt/method/mco_method_evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ def calculate_functionals(self, point: SearchDataItem) -> SearchDataItem:
point.function_values[number_of_constraints + i] = FunctionValue(FunctionType.OBJECTIV, i)
point = self.task.calculate(point, -1)

# Если нужно считать по очереди критерии то заменить цикл выше на следующий код:
#for i in range(self.task.problem.number_of_objectives):
# point.function_values[number_of_constraints + i] = FunctionValue(FunctionType.OBJECTIV, i)
# point = self.task.calculate(point, i)

point = self.task.calculate(point, -1, TypeOfCalculation.CONVOLUTION)
point.set_index(number_of_constraints)

Expand Down

0 comments on commit 2b6ad95

Please sign in to comment.