@Override
    public OccurrenceAllocation select(SolverState schedule, Occurrence forOccurrence) {
        
        if (schedule.constraintsCost() < smallestConflict) {
            smallestConflict = schedule.constraintsCost();
        }
        
        // until we are lowering conflict value, store last iteration to current
        if (lastConflictCost > smallestConflict && schedule.constraintsCost() == smallestConflict) {
            lastConflictLoweringIteration = schedule.getItearation();
        }
        lastConflictCost = schedule.constraintsCost();
        
        // if current conflict value is worst than smallest found OR 
        // we are not moving better in last stayMinConflictSelction iterations
        if (schedule.constraintsCost() > smallestConflict || schedule.getItearation() - lastConflictLoweringIteration < stayMinConflictSelectionAfterToZeroConflict) {
            // best minimal conflict
            //System.out.printf("AlocSelection: min conflict, min cost. sc:%s, lzi:%s\n",smallestConflict, lastConflictLoweringIteration);
            return conflictingSelection.select(schedule, forOccurrence);
        } else {
           // if (random.nextDouble() < probBestIgnoringSelWhenNoConflict) {
                // best conflicting
                // see constructor for explanation of only this selection
                //System.out.println("AlocSelection: best ignoring conflict");
                return selectBestIgnoringConflict(schedule, forOccurrence);
            //} else {
                // roulette selection
            //    System.out.println("AlocSelection: roullette");
            //    return optimizingSelection.select(schedule, forOccurrence);
            //}
        }
    }