Todo ----- X Have the right patch sizes in the initialisation (i.e. distributed properly) - Comment/document all methods and classes properly - Write norms in LandscapeHabitat properly - Sort out numPatches / getTotPatches in Habitat ... bit of a mess X Sort out LandscapeHabitat so that XYMin, XYMax works properly, or think about better way of doing this - Add to Habitat a method to load a habitat and save habitat - Check that sim code is generic so that we don't need a different sim class for each model ... - Tidy up display of LandscapeHabitat using StdDraw - Do error catching on other parameters in Habitat and Model - Make an array of contributions to colonisation rate and look up rather than calculating each time - Check that everything is extensible to metapopulations with individuality -- patchStatus would need to be a multidimensional array -- rates could also be multidimensional, or work out which transition to make when a patch is selected - Write out to a file - Work out how to do the comparison with array measurement - Write code to figure out the array and to get eigenvectors and eigenvalues Project hierarchy ----------------- External jar files are in the folder /lib. Here these are Jama (for eigenvalue decomp) and commons-math3 (for the LogNormal distribution) .java files are in src .class files are in /out/production/OH2000 (invisible from inside IntelliJ) .jar file for the project in /out/artifacts How to compile and run this project from the command line --------------------------------------------------------- Compilation ----------- From the main project folder , compile to the same folder as IntelliJ: -cp indicates the classpath for includes (jar files) and here I've just said to include everything in lib -d tells it where to store the compiled class files > javac -cp "lib/*" src/*.java -d out/production/OH2000/ Execution --------- Run compiled classes from /src: -cp gives the classpath for dependencies (":" separates the dependencies, "." is where I am right now) Exper is the main class, and the long thing afterwards is the parameter (here the absolute path of the properties file) > java -cp .:../lib/commons-math3-3.0.jar:../lib/jama-1.0.2.jar Exper "/Users/rebeccamancy/gitProjects/dev/ccs/OH2000/out/production/OH2000/Exper.properties" In IntelliJ, we can instead create a jar file (rather than separate classes), which automatically includes all the other jar files that we need as dependencies, so rather simplifies things. We can do this from File > Project Structure > Artifacts and then Build > Build Artifacts The jar file gets put into out/artifacts/_jar/ We can now run this from the level directly from the jar file Here, we need the -jar flag to tell the java command we're running a jar file, and then the path to the jar file, followed by any arguments (here the relative path to the properties file) > java -jar out/artifacts/OH2000_jar/OH2000.jar src/Exper.properties