Skip to content

Commit

Permalink
Initial commit of Jablus version 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Conrad Rider committed Aug 12, 2015
1 parent 9ec7674 commit e1b4df6
Show file tree
Hide file tree
Showing 837 changed files with 210,951 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/.settings/
/graphics_unused/
/private/
/nbproject/private/
/build/
/dist/lib/
/dist/store/

10 changes: 10 additions & 0 deletions MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.9.3
Created-By: 1.7.0_79-b14 (Oracle Corporation)
Bundle-Name: jablus
Bundle-Version: 1.0
Bundle-Date: 2015-08-12 14:20:59 ICT
Implementation-Title: jablus
Implementation-Version: 1.0
Implementation-URL: http://www.crider.co.uk

77 changes: 75 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,75 @@
# jablus
Full dairy farm simulator, driven by scientific crop and animal models
# Dairy Farm Simulator

A whole dairy farm simulator, driven by scientific crop and animal models


## Instructions
To get the simulator up and running:
1. Download the program at: https://raw.githubusercontent.com/Cride5/jablus/master/dist/jablus-1.0.jar
2. Double click on jablus.jar to start the simulator
3. If it won't start, make sure the Java Runtime Environment is installed on your computer. It
can be downloaded here: http://java.sun.com/javase/downloads/index.jsp

Once the program is running you can
* Manage Livestock
1. Buy or sell them (market tab on left)
2. Buy or sell feeds for the livestock (market tab)
3. Assign feeds offered to cows – in kg/cow (livestock tab on left)
4. Manage percentage of heifers and cows confined (livestock tab)
* Manage Crops
5. Sew grass, maize or wheat (right click over field)
6. Assign grass fields for grazing
7. Harvest grass for silage, or wheat/maize for fodder
8. Plough fields
* Move on to next month (Next button on bottom right)

These visualisations provide feedback on what's going on:
1. Stores of cattle, feeds and manure (top)
2. Map of fields (crop-type, expected yield, soil water, soil nitrates, nitrate leaching)
3. Weather graph and balance graph (right)
4. Balance Sheet (market tab)
5. Time - conspicuously hidden under the bottom left of the map!Dairy Farm Simulator


## Improvements
There are a lot of things which could be improved upon with this simulator. These are a few things
which come to mind:
* Help
- Detailed web-based instructions
- Initial pop-up to explain the scenario
- Tool tips to explain buttons and visuals
* Livestock Management
- A visualisation to show the herd in more detail, with info on the age of the animals and the
lactation number/stage
- Information on how much offered feed is being consumed to help in choosing an
appropriate diet
* Crop Management
- Ability buy/sell fertiliser and apply it to fields
- Ability to apply manure to fields
- Keys on the map visualisations
* Farm management
- Ability to buy extra buildings (storage space)
- Information on how well the farm is running
* Pollution (Nitrate leaching, wasted manure)
* Environmental Friendliness (set aside land, lower fertiliser use)
* Productivity (animals, milk, crops)
* Level of self sufficiency
* Market
- Show graph of changing buying and sale prices of feeds, fertilisers, cattle and milk
- how pop-up summarising financial performance at end of year
* Time
- Time-line showing how far through the simulation we are and what year/month it is
* Weather
- Instead of the graph given, a wee bar at the top showing a BBC-style 5-day forecast
* Decision-Making
- Ability to input any number of decisions/reasons for each round


## License
GNU Public License Version 2.0


## Author
[Conrad Rider](http://www.crider.co.uk)


130 changes: 130 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="jablus" default="default" basedir=".">
<description>Builds, tests, and runs the project jablus.</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar: JAR building
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="jablus-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->

<target name="-pre-init">
<property name="project.name" value="jablus" />
<property name="version.num" value="1.0" />
<property name="dist.jar" value="dist/${project.name}-${version.num}.jar" />
<tstamp>
<format property="NOW" pattern="yyyy-MM-dd HH:mm:ss z" />
</tstamp>

<manifest file="MANIFEST.MF">
<attribute name="Bundle-Name" value="${project.name}" />
<attribute name="Bundle-Version" value="${version.num}" />
<attribute name="Bundle-Date" value="${NOW}" />
<!--<attribute name="Bundle-Revision" value="${svna.version}" />-->
<attribute name="Implementation-Title" value="${project.name}" />
<attribute name="Implementation-Version" value="${version.num}" />
<attribute name="Implementation-URL" value="http://www.crider.co.uk" />
</manifest>

</target>


<target name="-post-jar" depends="package-for-store">
<!--delete file="MANIFEST.MF"/-->
</target>


<target name="package-for-store">

<property name="store.jar.name" value="jablus-${version.num}"/>

<property name="store.dir" value="dist/store"/>
<property name="store.jar" value="dist/${store.jar.name}.jar"/>

<echo message="Packaging ${application.title} into a single JAR at ${store.jar}"/>

<delete dir="${store.dir}"/>
<mkdir dir="${store.dir}"/>

<jar destfile="${store.dir}/temp_final.jar" filesetmanifest="skip">
<zipgroupfileset dir="dist" includes="*.jar"/>
<zipgroupfileset dir="dist/lib" includes="*.jar"/>

<manifest>
<attribute name="Main-Class" value="${main.class}"/>
</manifest>
</jar>

<zip destfile="${store.jar}">
<zipfileset src="${store.dir}/temp_final.jar"
excludes="META-INF/*.SF, META-INF/*.DSA, META-INF/*.RSA"/>
</zip>

<delete file="${store.dir}/temp_final.jar"/>

</target>

</project>
1 change: 1 addition & 0 deletions data
32 changes: 32 additions & 0 deletions dist/README.TXT
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
========================
BUILD OUTPUT DESCRIPTION
========================

When you build an Java application project that has a main class, the IDE
automatically copies all of the JAR
files on the projects classpath to your projects dist/lib folder. The IDE
also adds each of the JAR files to the Class-Path element in the application
JAR files manifest file (MANIFEST.MF).

To run the project from the command line, go to the dist folder and
type the following:

java -jar "jablus-1.0.jar"

To distribute this project, zip up the dist folder (including the lib folder)
and distribute the ZIP file.

Notes:

* If two JAR files on the project classpath have the same name, only the first
JAR file is copied to the lib folder.
* Only JAR files are copied to the lib folder.
If the classpath contains other types of files or folders, these files (folders)
are not copied.
* If a library on the projects classpath also has a Class-Path element
specified in the manifest,the content of the Class-Path element has to be on
the projects runtime path.
* To set a main class in a standard Java project, right-click the project node
in the Projects window and choose Properties. Then click Run and enter the
class name in the Main Class field. Alternatively, you can manually type the
class name in the manifest Main-Class element.
Binary file added dist/jablus-1.0.jar
Binary file not shown.
Loading

0 comments on commit e1b4df6

Please sign in to comment.