Skip to content
Snippets Groups Projects
Commit b4359bea authored by Bernhard Johannes Berger's avatar Bernhard Johannes Berger
Browse files

Fixed creation.

parent 29902f66
No related branches found
No related tags found
No related merge requests found
Pipeline #241009 passed
......@@ -5,6 +5,7 @@ import de.evoal.core.api.cdi.BeanFactory;
import de.evoal.core.api.cdi.ConfigurationValue;
import de.evoal.core.api.ea.initial.InitialPopulation;
import de.evoal.languages.model.instance.Instance;
import de.evoal.core.api.ea.constraints.strategies.RepairStrategy;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.context.Dependent;
......@@ -28,4 +29,15 @@ public class TrainingProducer {
return population;
}
@Produces
@Dependent
@Named("repair-with-training")
public RepairStrategy create() {
final RepairStrategy strategy = new TrainingRepairStrategy();
BeanFactory.injectFields(strategy);
return strategy;
}
}
......@@ -24,9 +24,8 @@ import java.io.File;
import java.util.List;
import java.util.stream.Collectors;
@Dependent
@Named("repair-with-training")
@Slf4j
@Dependent
public class TrainingRepairStrategy<G extends Gene<?, G>, C extends Comparable<? super C>> implements RepairStrategy<G, C> {
@Inject
private Blackboard board;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment