PK t$4 META-INF/PK s$4a%|META-INF/MANIFEST.MFManifest-Version: 1.0 Ant-Version: Apache Ant 1.6.2 Created-By: 1.5.0_05-b05 (Sun Microsystems Inc.) Main-Class: optainet.Main X-COMMENT: Main-Class will be added automatically by build PK t$4 optainet/PK Ҙ$4-.j j optainet/Main.class1 1` abc de /fg /h /i /j /k /l /m /n /o /p /q r stu v wx `y z{ |}~   /       /numCellsI numDimensions numClonesmaxIter suppThresD errorThresdivRatio mutnParam lowerBounds[D upperBounds([Ljava/lang/String;)VCodeLineNumberTableLocalVariableTableoptLoptainet/OptAinet;thisLoptainet/Main;args[Ljava/lang/String; readConfig(Ljava/lang/String;)ZsLjava/lang/String;bitsiinLjava/io/BufferedReader;eLjava/lang/Exception;filenamefileLjava/io/File; readNextLine,(Ljava/io/BufferedReader;)Ljava/lang/String;strproceedZ Exceptionsmain SourceFile Main.java ?  Usage: please supply config file JKoptainet/OptAinet 23 53 63 78 98 :8 ;8 43 <= >= ? Exiting java/io/File ? java/lang/StringBuilder Config file  does not exist java/io/BufferedReaderjava/io/FileReader ? ? WX  :Upper and lower bounds for each dimension must be provided, java/lang/ExceptionError opening config file # K K optainet/Main ?@java/lang/Object()Vjava/lang/SystemoutLjava/io/PrintStream;java/io/PrintStreamprintln(Ljava/lang/String;)V(IIIDDDDI[D[D)Voptimiseexists()Zappend-(Ljava/lang/String;)Ljava/lang/StringBuilder;toString()Ljava/lang/String;(Ljava/io/File;)V(Ljava/io/Reader;)Vjava/lang/IntegerparseInt(Ljava/lang/String;)Ijava/lang/Double parseDouble(Ljava/lang/String;)Djava/lang/Stringsplit'(Ljava/lang/String;)[Ljava/lang/String;readLinetrim startsWithmatches!/1 234353637898:8;8<=>=?@A_*+L*+2:Y*** * * * * ***M, B& %, -./O1S2V4^5C ODE_FG_HIJKA"Y+M,#Y+YY, N**-!"**-!"**-!" **-!# **-!# **-!# **-!# **-!"****6*D*-!: $%&:*2#R*2#RNY(+0''Bv= AB.C0I@KLLXMdNpO|PQRTUYZ\]^cdeYkhij oCR4LMNIJO3@PQRS"FG"TM UVWXA(M>+)M,*M,+, ,-.>,B"z  "&C*(FG(PQ&YM$Z[\' ]@A8 /Y*0WB  C  HI^_PK k$4O>HHoptainet/Main.java/* * Main.java * * Author: Paul Andrews * * Last Modified: 20/10/2005 */ package optainet; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; /** * Main class of the optainet package. Checks that a configuration file has been * presented, reads that configuration file and executes the opt-aiNet algorithm * appropriately using an instance of the OptAinet class. */ public class Main { private int numCells; // Number of initial network cells private int numDimensions; // Number of optimisation problem dimensions private int numClones; // Number of clones to make of each network cell private int maxIter; // Maximum number of algorithm iterations private double suppThres; // Threshold value for network cell suppression private double errorThres; // Threshold value for average population error during clonal selection private double divRatio; // Proportion of current population size to be added for diversity private double mutnParam; // Affinity proportionate mutation parameter private double[] lowerBounds; // Lower bound on each optimisation problem dimension private double[] upperBounds; // Upper bound on each optimisation problem dimension /** * Creates a new instance of Main * @param args the command line arguments */ public Main(String[] args) { // If the number of command line parameters is not 1 then issue warning and // exit, else if values are read in correctly from the configuration file // provided as a command line parameter, then create an instance of the // OptAinet class and run the optimisation once if (args.length != 1) System.out.println("Usage: please supply config file"); else if (readConfig(args[0])) { OptAinet opt = new OptAinet(numCells,numClones,maxIter,suppThres,errorThres, divRatio,mutnParam,numDimensions,lowerBounds,upperBounds); opt.optimise(); } else System.out.println("Exiting"); } /** * Reads the contents of the configuration file into appropriate variables * @param filename the configuration file * @return true if file configuration file read successfully, false if not */ private boolean readConfig(String filename) { File file = new File(filename); // Check that file exists if (!file.exists()) { System.out.println("Config file " + filename + " does not exist"); return false; } // Read each line from the config file, setting the relevent variables try { BufferedReader in = new BufferedReader(new FileReader(file)); numCells = Integer.parseInt(readNextLine(in)); numClones = Integer.parseInt(readNextLine(in)); maxIter = Integer.parseInt(readNextLine(in)); suppThres = Double.parseDouble(readNextLine(in)); errorThres = Double.parseDouble(readNextLine(in)); divRatio = Double.parseDouble(readNextLine(in)); mutnParam = Double.parseDouble(readNextLine(in)); numDimensions = Integer.parseInt(readNextLine(in)); lowerBounds = new double [numDimensions]; upperBounds = new double [numDimensions]; // Specific bounds for each dimension must be provided for (int i = 0 ; i < numDimensions ; i++) { String s = readNextLine(in); if (s == null) { System.out.println("Upper and lower bounds for each dimension must be provided"); return false; } // Split the input string in two using the "," character String[] bits = s.split(","); lowerBounds[i] = Double.parseDouble(bits[0]); upperBounds[i] = Double.parseDouble(bits[1]); } } catch (Exception e) { System.out.println("Error opening config file " + filename); return false; } // Return true as no problems have been encountered return true; } /** * Reads a single line from the configuration file, ignoring empty lines and * removing commenting characters * @param in the buffered input stream for the config file * @throws java.lang.Exception a line cannot be read * @return the String containing the contents of the line read */ private String readNextLine(BufferedReader in) throws Exception { String str = null; boolean proceed; // Read in lines from the input stream ignoring lines that are empty or // start with the "#" character do { proceed = false; str = in.readLine(); str = str.trim(); if (str.startsWith("#") || str.matches("")) proceed = true; } while (proceed); return str; } /** * Creates an instance of Main * @param args the command line arguments */ public static void main(String[] args) { new Main(args); } } PK Ҙ$40#optainet/NetworkCell.class1r O P Q R S T U V WX Y Z@ W[ W\ ]^ _]'` a b cd Oe OfgrandomLjava/util/Random;optFuncLoptainet/OptFunction; mutnParamDdims[D lowerBounds upperBoundsfitness fitnessNorm (DI[D[D)VCodeLineNumberTableLocalVariableTableiIthisLoptainet/NetworkCell;numDimsmutate()Valpha getAffinity(Loptainet/NetworkCell;)Dcellaffinityclone()Ljava/lang/Object;eLjava/lang/Exception;setFitnessNorm(DD)V lowestFitnesshighestFitnessgetFitnessNorm()D getDimension(I)Dindexevaluate getFitness SourceFileNetworkCell.java ,7 $% (' )' &' ! hF +%i jk lF GH mn ok =>optainet/NetworkCell'java/lang/Exception *% "# pqjava/util/Randomoptainet/OptFunctionjava/lang/Objectjava/lang/Cloneable nextDoublejava/lang/Mathexp(D)D nextGaussianpow(DD)Dsqrt evaluateCell([D)D! !"#$%&'(')'*%+% ,-.O**'***6*(*111gkcRԱ/& +, -.04)5H4N60>/12O34O$%O52O('O)'67.r*o* k kH>*V**1' kcR*1*1**1R*1*1**1R/& BHI3KCLON_OkHqR0 \12r34_8%9:.1I6* (*1+ gcI(/[_`&_,b0*'121341;4/<%=>.{!L*L+*M+/jm qtsv0 ?@!34;4AB.Q**'g)'go / 0 34C%D%EF./* /0 34GH.;*1/034I2J7.=**/ 0 34KF./*/0 34L7.1YY/  MNPK k$49koptainet/NetworkCell.java/* * NetworkCell.java * * Author: Paul Andrews * * Last Modified: 14/10/2005 */ package optainet; import java.util.LinkedList; import java.util.Random; /** * This class represents the network cells of the opt-aiNet algorithm. Each cell * has a real-valued vector representing a possible solution to the function being * optimised. For each value in this vector, lower and upper bounds exist. Each * cell also holds its fitness value and provides methods to mutate dimension * values, clone the cell, compare affinity with another cell, and to evaluate the * cell against the optimiation function. */ public class NetworkCell implements Cloneable { private static final Random random = new Random(); // Random number generator private static final OptFunction optFunc = new OptFunction(); // Function to optimise private double mutnParam; // Affinity proportionate mutation parameter private double[] dims; // Network cell dimension values private double[] lowerBounds; // Lower bound for each dimension private double[] upperBounds; // Upper bound for each dimension private double fitness; // Fitness of network cell private double fitnessNorm; // Normalised fitness of network cell compared to other network cells /** * Creates a new instance of NetworkCell and initialises variable values using * the provided parameters. Each network cell dimension is set to a random value * between the upper and lower bounds for that dimension. * @param mutnParam the affinity proportionate mutation parameter * @param numDims the number of optimisation problem dimensions * @param lowerBounds the array of dimension lower bounds * @param upperBounds the array of dimension upper bounds */ public NetworkCell(double mutnParam, int numDims, double[] lowerBounds, double[] upperBounds) { this.mutnParam = mutnParam; this.lowerBounds = lowerBounds; this.upperBounds = upperBounds; dims = new double [numDims]; // Randomly initialise each dimension to a value between the lower and upper bounds for ( int i = 0 ; i < dims.length ; i++ ) dims[i] = lowerBounds[i] + (upperBounds[i] - lowerBounds[i]) * random.nextDouble(); } /** * Mutates each dimension in the network cell. The mutations are generated using a * Gaussian random number and an affinity proportionate variable calculated so that * the fitter the network cell, the smaller the mutation value is. */ public void mutate() { double alpha; // Calculate alpha - the affinity proportionate variable alpha = ( 1.0 / mutnParam ) * Math.exp(-1 * fitnessNorm); // Mutate each dimension by adding an affinity proportionate Gaussian random // number if the new value is outside the lower or upper bound on the // dimension, then set to the appropriate bound value for ( int i = 0 ; i < dims.length ; i++ ) { dims[i] = dims[i] + alpha * random.nextGaussian(); if ( dims[i] > upperBounds[i] ) dims[i] = upperBounds[i]; if ( dims[i] < lowerBounds[i] ) dims[i] = lowerBounds[i]; } } /** * Gets the affinity value between this network cell and the one provided by * calculating the Euclidean distance between the dimension values of the cells * @param cell the network cell to calculate affinity with * @return the affinity value */ public double getAffinity(NetworkCell cell) { double affinity = 0; // Calculate the Euclidean distance beween the network cells for ( int i = 0 ; i < dims.length ; i++ ) affinity = affinity + Math.pow((dims[i]-cell.getDimension(i)),2); return Math.sqrt(affinity); } /** * Clones this network cell making a deep copy of the dimensions array * @return a clone of this network cell */ protected Object clone() { NetworkCell cell = null; try { cell = (NetworkCell) super.clone(); // Make a deep copy of the dimension values cell.dims = (double[]) dims.clone(); } catch (Exception e) { } return cell; } /** * Sets the normalised fitness of this network cell * @param lowestFitness the lowest fitness of all network cells * @param highestFitness the highest fitness of all network cells */ public void setFitnessNorm(double lowestFitness, double highestFitness) { fitnessNorm = (fitness - lowestFitness) / (highestFitness - lowestFitness); } /** * Gets the normalised fitness of this network cell * @return the normalised fitness value */ public double getFitnessNorm() { return fitnessNorm; } /** * Gets the value of the specified dimension * @param index the index value of the dimension required * @return the value of the dimension */ public double getDimension(int index) { return dims[index]; } /** * Evaluates this network cell against the optimisation function */ public void evaluate() { fitness = optFunc.evaluateCell(dims); } /** * Gets the fitness of this network cell * @return the fitness of the network cell */ public double getFitness() { return fitness; } } PK t$4Knoptainet/OptAinet.class1 3no n 2p 2q 2r 2s 2t 2u 2v 2w 2x 2y 2z 2{ 2| 2} ~   n         2 2      j  g cellListLjava/util/ArrayList; Signature-Ljava/util/ArrayList; numInitCellsI numClonesmaxIternumDims suppThresD errorThresdivRatio mutnParam lowerBounds[D upperBounds(IIIDDDDI[D[D)VCodeLineNumberTableLocalVariableTablethisLoptainet/OptAinet;optimise()VproceedZjiiter preNumCellsaddCells(I)VcellLoptainet/NetworkCell;numCellsclonalSelection preAvgFitnesspostAvgFitness fitnessSum evaluateCellsi$Ljava/util/Iterator;lowesthighest firstTime cloneCells currentCellbestclones[Loptainet/NetworkCell;networkInteractions affinities[[D cellArray SourceFile OptAinet.java EMjava/util/ArrayList 45 89 :9 ;9 <9 => ?> @> A> BC DC TU YM hM   java/lang/StringBuilder optainet/NetworkCell   E ]M cM  M M optainet/OptAinetjava/lang/Objectsize()Ijava/lang/Mathround(D)Jjava/lang/SystemoutLjava/io/PrintStream;get(I)Ljava/lang/Object; getDimension(I)Dappend(D)Ljava/lang/StringBuilder;-(Ljava/lang/String;)Ljava/lang/StringBuilder;toString()Ljava/lang/String;java/io/PrintStreamprint(Ljava/lang/String;)V getFitness()Dprintln(D)V (DI[D[D)Vadd(Ljava/lang/Object;)Ziterator()Ljava/util/Iterator;java/util/IteratorhasNext()Znext()Ljava/lang/Object;evaluatesetFitnessNorm(DD)Vclonemutateset'(ILjava/lang/Object;)Ljava/lang/Object; getAffinity(Loptainet/NetworkCell;)DtoArray(([Ljava/lang/Object;)[Ljava/lang/Object;remove!23 456789:9;9<9=>?>@>A>BCDCEFGI**Y**** * * * * * *H6 4689:;$<*=0>6?<@BAHBIp IJKI89I:9I;9I=>I?>I@>IA> I<9 IBC IDCLMGf<=******>">*=*** k6*Y6*2Y*˲* HNJKP UYZb*c/e1f9gNiRoapmqprotIH,NOd8P9UbQ9JKR9S91NOTUG/>*Y* ** *!M*,"WױH~(~.I*VW,Q9/JK/X9YMG ^I*#*$96**c9*o9(g* <<IH: 06COTVY]IH&Q9QNO^JKVNO\Z>C[> Q\>]MGCHJ6*%:&N':(HJ6#) J' H*%:&':'))HJ&+06<?BLR\beIR&<VWU^_VWn ^_JK`>a>bOcMG*M6*r*L>6*6,+*S,2+,2(,2,2>,2+*,2,WH>$&2=DK\_esI>)<P9$bdW&`e9 {Q9JKfghMG|**-L=*H>*5 +2R!+2**.RƄ*/0M>,X6,H<+21* .,2,2*,21W*,21WHJ  -2;Y _ et| !"#% 'IH"=P9PQ9LP9v[Q9JKijt^kglmPK t$4gD,,optainet/OptAinet.java/* * OptAinet.java * * Author: Paul Andrews * * Last Modified: 19/10/2005 * * The opt-aiNet algorithm contained within this class is based on that * presented by Leandro N. de Castro and Jon Timmis in "An Artificial Immune * Network for Multimodal Function Optimisation", Proceedings of the IEEE * Congress on Evolutionary Computation, 2002 */ package optainet; import java.util.ArrayList; /** * This class represents the main functionality of the opt-aiNet algorithm * described by de Castro and Timmis 2002 (see reference above). Please refer to * de Castro and Timmis 2002 for the algorithm pseudocode and description of how * the algorithm work. */ public class OptAinet { private ArrayList cellList; // List of all the network cells private int numInitCells; // Number of initial network cells private int numClones; // Number of clones to make of each network cell private int maxIter; // Maximum number of algorithm iterations private int numDims; // Number of optimisation problem dimensions private double suppThres; // Threshold value for network cell suppression private double errorThres; // Threshold value for average population error during clonal selection private double divRatio; // Proportion of current population size to be added for diversity private double mutnParam; // Affinity proportionate mutation parameter private double[] lowerBounds; // Lower bound on each optimisation problem dimension private double[] upperBounds; // Upper bound on each optimisation problem dimension /** * Creates a new instance of OptAinet setting the given algorithm parameters * @param numInitCells the initial number of network cells * @param numClones the number of clones to be made of each network cell * @param maxIter the maximum number of algorith iterations * @param suppThres the network cell suppresion threshold * @param errorThres the average error threshold value used during clonal selection * @param divRatio the proportion of population size to be used when adding diversity * @param mutnParam the affinity proportionate mutation parameter * @param numDims the number of optimisation problem dimensions * @param lowerBounds the array of dimension lower bounds * @param upperBounds the array of dimension upper bounds */ public OptAinet(int numInitCells, int numClones, int maxIter, double suppThres, double errorThres, double divRatio, double mutnParam, int numDims, double[] lowerBounds, double[] upperBounds) { cellList = new ArrayList(); this.numInitCells = numInitCells; this.numClones = numClones; this.maxIter = maxIter; this.numDims = numDims; this.suppThres = suppThres; this.errorThres = errorThres; this.divRatio = divRatio; this.mutnParam = mutnParam; this.lowerBounds = lowerBounds; this.upperBounds = upperBounds; } /** * Provides the main control loop for the opt-aiNet algorithm. The algorithm is * run until a stopping condition is met. Once the algorithm has completed, * details of each network cell is printed to the standard output. */ public void optimise() { int iter = 0; // Iteration count int preNumCells = 0; // Number of network cells in the previous iteration boolean proceed; // Loop stopping condition variable // Add the initial number of cells to the network addCells(numInitCells); // Iterate until a stopping condition is met do { iter++; // Perform clonal selection and network cell interactions clonalSelection(); networkInteractions(); // If maximum iteration reached, or there has been no change in the number // if cells in the network since the last iteration, then terminate the loop // Else continue looping, making a note of the number of cells in the // network for comparison in the next iteration, and add a number of new // cells to the network depending given by the divRation parameter if ((iter == maxIter) || (preNumCells == cellList.size())) proceed = false; else { proceed = true; preNumCells = cellList.size(); addCells((int) Math.round(cellList.size() * divRatio)); } } while (proceed); // Print out the details of each cell in the network, givin all the // dimension values followed by the cell's fitness according to the // optimistaion function for (int i = 0 ; i < cellList.size() ; i++) { for (int j = 0 ; j < numDims ; j++) System.out.print(cellList.get(i).getDimension(j) + " "); System.out.println(cellList.get(i).getFitness()); } } /** * Adds a specified number of new cells to the network. Each cell has its * dimension values set to random values. * @param numCells the number of new cells to add */ private void addCells(int numCells) { NetworkCell cell; for ( int i = 0 ; i < numCells ; i++ ) { cell = new NetworkCell(mutnParam,numDims,lowerBounds,upperBounds); cellList.add(cell); } } /** * Provides the main control loop for the affinity maturation stage of the * opt-aiNet algorithm. */ private void clonalSelection() { boolean proceed; // Loop stopping condition variable double preAvgFitness = 0.0; // Average population fitness before clonal selection double postAvgFitness; // Average population fitness after clonal selection double fitnessSum; // Sum of fitnesses of all network cells // Iterate until stopping condition is met do { // Clonal selection: evaluate all cells against optimistaion function // then clone accordingly evaluateCells(); cloneCells(); // Calculate the average fitness of all network cells fitnessSum = 0; for (int i = 0 ; i < cellList.size() ; i++) fitnessSum = fitnessSum + cellList.get(i).getFitness(); postAvgFitness = fitnessSum / cellList.size(); // If the difference between the average cell fitnesses before and after // clonal selectionS is below a pre-defined threshold (errorThres) then // stop iterating, Else continue to iterate noting the current average // cell fitness for comparison in the next iteration if ((postAvgFitness-preAvgFitness) < errorThres) proceed = false; else { proceed = true; preAvgFitness = postAvgFitness; } } while (proceed); } /** * Evaluates each network cell against the optimisation function and sets the * normalised fitness for each network cell */ private void evaluateCells() { double lowest = 0; // lowest cell fitness double highest = 0; // highest cell fitness boolean firstTime = true; // the first element in the list // Evaluate each cell noting the lowest and highest fitnesses in the network for (NetworkCell cell : cellList) { cell.evaluate(); // If this is the first cell to be evaluated then its fitness becomes // both the lowest and highest seen sofar, Else check cell's fitness // against the current highest and lowest and change accordingly if ( firstTime ) { lowest = cell.getFitness(); highest = cell.getFitness(); firstTime = false; } else { if ( cell.getFitness() > highest ) highest = cell.getFitness(); if ( cell.getFitness() < lowest ) lowest = cell.getFitness(); } } // Normalise fitness for each cell based on the lowest and highest fitnesses // in the network for (NetworkCell cell : cellList) cell.setFitnessNorm(lowest,highest); } /** * For each cell, a number of clones are creating, producing a clonal pool. * All members of the clonal pool are mutated and the most fit clone is * selected. If this clone is more fit than its parent cell, then the clone * replaces the parent cell in the network */ private void cloneCells() { NetworkCell currentCell; // Current network cell being cloned NetworkCell clones[] = new NetworkCell[numClones]; // Clonal pool int best; // Array index of the current best clone in the clonal pool // All cells in the network undergo cloning, mutation and selection // Only the clones of the cell are mutated, with the parent remaining // unchanged, thus this is an elitest strategy for (int i = 0 ; i < cellList.size() ; i++) { currentCell = cellList.get(i); best = 0; // Set the best clone to be the first by default // A set number of clones is produced dependent on the numClones // parameter. All clones are mutated proportionally to fitness and // evaluated against the optimistaion function. A note is made of the // clone with the highest fitness in the clonal pool for (int j = 0 ; j < numClones ; j++) { clones[j] = (NetworkCell) currentCell.clone(); clones[j].mutate(); clones[j].evaluate(); if (clones[j].getFitness() > clones[best].getFitness()) best = j; } // If the best clone produced has a better fitness than its parent cell // then the clone replaces the parent in the network. If it is not, then // the parent remains in the network if (clones[best].getFitness() > currentCell.getFitness()) cellList.set(i,clones[best]); } } /** * Carries out the interactions between the network cells. Affinities are * calculated between all network cells and if two cells have an affinity * below a pre-defined threshold, then the cell with the lowest fitness is * deleted from the network */ private void networkInteractions() { double affinities[][] = new double [cellList.size()][cellList.size()]; // affinities array // Calculate affinities between all network cells, only the upper diagonal // of the affinities array needs to be filled out for ( int i = 0 ; i < cellList.size() ; i++ ) for ( int j = 0 ; j < cellList.size() ; j++ ) { if ( i > j ) affinities[i][j] = 0; else affinities[i][j] = cellList.get(i).getAffinity(cellList.get(j)); } // Network cells are copied into an array for comparision purposes, as // cells will be deleted from the main cellList ArrayList, thus it cannot be // iterated through NetworkCell[] cellArray = cellList.toArray(new NetworkCell[0]); // For each pair of cells in the network (the upper diagonal of the // affinities array), if their affinity is below a threshold determined by // the suppThres parameter, then the cell with the lowest fitness is removed // from the network for ( int i = 0 ; i < cellArray.length ; i++ ) for ( int j = 0 ; j < cellArray.length ; j++ ) if ( (i < j) && (affinities[i][j] < suppThres) ) { if ( cellArray[i].getFitness() < cellArray[j].getFitness() ) cellList.remove(cellArray[i]); else cellList.remove(cellArray[j]); } } } PK Ҙ$49*0optainet/OptFunction.class1 @)!TD- @ !TD-()VCodeLineNumberTableLocalVariableTablethisLoptainet/OptFunction; evaluateCell([D)D dimensions[DfitnessD SourceFileOptFunction.java  optainet/OptFunctionjava/lang/Objectjava/lang/Mathsin(D)D!  /*   h&+1+1kk+1+1kckgcI( "$% &&$PK k$4 E optainet/OptFunction.java/* * OptFunction.java * * Author: Paul Andrews * * Last Modified: 12/10/2005 */ package optainet; /** * This class represents the optimisation problem that is to be solved by opt-aiNet. * It contains just one method that evaluates an array of real value numbers that * represents the dimension values of a network cell. */ public class OptFunction { /** * Creates a new instance of OptFunction */ public OptFunction() { } /** * Evaluates an array of real value numbers that represent the dimensions of a * network cell, returning a single real number value that represents the fitness * of the provided array values. This fitness is calculated by applying the array * values to the fitness function: f(x,y) = x.sin(4x.PI) - y.sin(4y.PI+PI) + 1 * @param dimensions the dimension values of a network cell * @return the evaluated fitness of the network cell dimension values */ public double evaluateCell(double[] dimensions) { double fitness; fitness = dimensions[0] * Math.sin(4 * Math.PI * dimensions[0]) - dimensions[1] * Math.sin(4 * Math.PI * dimensions[1] + Math.PI) + 1; return fitness; } }PK t$4 AMETA-INF/PK s$4a%|'META-INF/MANIFEST.MFPK t$4 Aoptainet/PK Ҙ$4-.j j Aoptainet/Main.classPK k$4O>HH optainet/Main.javaPK Ҙ$40#T optainet/NetworkCell.classPK k$49k)optainet/NetworkCell.javaPK t$4Kna>optainet/OptAinet.classPK t$4gD,,$Ooptainet/OptAinet.javaPK Ҙ$49*0?|optainet/OptFunction.classPK k$4 E u~optainet/OptFunction.javaPK X