/*********************************************************************** * Your information (name, id, etc.) goes here. * * * * * * * ***********************************************************************/ public class GeneticAlgorithm { // Constant public static final int NUMBER_OF_GENERATIONS = 1000; // Implements the top loop of the GA private static Chromosome solve( int weights[], int numberOfContainers ) { // Replace the body of the method (including the return statement) with your // implementation of the method solve. return null; } // Main method public static void main( String args[] ) { StudentInfo.display(); if ( args.length < 2 ) { System.err.println( "Usage: java GeneticAlgorithm k w1 [w2, w3, ...]" ); System.exit( 1 ); } int numberOfContainers; int[] weights; numberOfContainers = Integer.parseInt( args[ 0 ] ); weights = new int[ args.length - 1 ]; for ( int i=1; i java GeneticAlgorithm 8 27 1 26 24 8 22 6 29 26 44 11 22 45 19 34 2 20 47 45 22 // ************************************************************ // * * // * * // * * // * * // ************************************************************ // // [47,22],[8,11,19,34],[26,24,6],[44,2],[1,22,45],[22,29],[26,20],[27,45], fitness = 26