// TODO downcast return type SolverPhase
public SolverPhase buildSolverPhase(EnvironmentMode environmentMode, SolutionDescriptor solutionDescriptor,
ScoreDefinition scoreDefinition, Termination solverTermination) {
if (constructionHeuristicType != null) {
// TODO delete GreedyFitSolverPhase
DefaultGreedyFitSolverPhase greedySolverPhase = new DefaultGreedyFitSolverPhase();
configureSolverPhase(greedySolverPhase, environmentMode, scoreDefinition, solverTermination);
greedySolverPhase.setGreedyPlanningEntitySelector(buildGreedyPlanningEntitySelector(solutionDescriptor));
greedySolverPhase.setGreedyDecider(buildGreedyDecider(solutionDescriptor, environmentMode));
if (environmentMode == EnvironmentMode.DEBUG || environmentMode == EnvironmentMode.TRACE) {
greedySolverPhase.setAssertStepScoreIsUncorrupted(true);
}
return greedySolverPhase;
// } else if (!CollectionUtils.isEmpty(entityPlacerConfigList)) {
// if (constructionHeuristicPickEarlyType != null) {
// // TODO throw decent exception