Jenetics constraint seems to have no effect
问题 I have implemented a variant of the knapsack problem using Jenetics as follows: @Value public class Knapsack { public static void main( final String[] args ) { final var knapsackEngine = Engine.builder( Knapsack::fitness, Knapsack.codec() ) .constraint( Knapsack.constraint() ) .build(); final var bestPhenotype = knapsackEngine.stream() .limit( 1000L ) .collect( EvolutionResult.toBestPhenotype() ); final var knapsack = bestPhenotype.getGenotype().getGene().getAllele(); final var profit =