|
13 | 13 |
|
14 | 14 | from epde.optimizers.moeadd.moeadd import ParetoLevels, ObjFunNormalizer |
15 | 15 | from epde.operators.utils.template import CompoundOperator, add_base_param_to_operator |
| 16 | +import epde.globals as global_var |
16 | 17 | from epde.operators.multiobjective.mutations import get_basic_mutation |
17 | 18 |
|
18 | 19 | from epde.structure.main_structures import SoEq |
@@ -447,10 +448,12 @@ def apply(self, objective: ParetoLevels, arguments: dict): |
447 | 448 | self.suboperators['pareto_level_updater'].apply(objective=(temp_offspring, objective), |
448 | 449 | arguments=subop_args['pareto_level_updater']) |
449 | 450 | objective.history.add(system) |
450 | | - print(temp_offspring.obj_fun) |
| 451 | + if global_var.verbose.candidate_objectives: |
| 452 | + print(temp_offspring.obj_fun) |
451 | 453 | break |
452 | 454 | if replaced == offspring_attempt_limit: |
453 | | - print("Could not generate unique offspring") |
| 455 | + if global_var.verbose.candidate_objectives: |
| 456 | + print("Could not generate unique offspring") |
454 | 457 | break |
455 | 458 | if attempt == mutation_attempt_limit: |
456 | 459 | temp_offspring.create() |
@@ -533,7 +536,8 @@ def apply(self, objective : ParetoLevels, arguments : dict): |
533 | 536 | self.suboperators['chromosome_fitness'].apply(objective=candidate, |
534 | 537 | arguments=subop_args['chromosome_fitness']) |
535 | 538 | objective.history.add(system) |
536 | | - print(candidate.obj_fun) |
| 539 | + if global_var.verbose.candidate_objectives: |
| 540 | + print(candidate.obj_fun) |
537 | 541 | objective.associate_weights() |
538 | 542 | objective.initial_placing() |
539 | 543 |
|
|
0 commit comments