/ComplexSystems

Complex Systems school subject

Primary LanguageGroovyApache License 2.0Apache-2.0

ComplexSystems

Subject practices, scripts and projects.

What do I need?

  • Just a java 1.6 or higher.
  • A shell (cmd could be fine to!)
  • Mongodb server instance (2.7 or higher)
  • Gradle (gradle wrapper added).

How could I run a homework/practice?

Step 0: Clone the project in your terminal.

git clone https://github.com/pepo27/DSD.git

or simply download the zip file and extract it.

Step 1: Enter into Practices directory and run gradle for solving all the dependencies.

$ ./gradlew 

Step 2: Look into gradle tasks.

$ ./gradlew tasks

This will show all the tasks, considering Simulators, Exploration, Insertion and Statistics generation for all the practices and projects. Like the next code:

CreateDiffusioNRuleStatistics - Generate GameOfLife statistics from 0.1, 0.2, 0.5 and 0.75
CreateGameOfLifeStatistics - Generate GameOfLife statistics from 0.1, 0.2, 0.5 and 0.75
CreateMicroWorldStatistics - Generate MicroWorld statistics 0.0001, 0.001, 0.01, 0.1
Diffusion_5x5_1 - Insertion job for 5x5 Diffusion 1 of 4
Diffusion_5x5_2 - Insertion job for 5x5 Diffusion 2 of 4
Diffusion_5x5_3 - Insertion job for 5x5 Diffusion 3 of 4
Diffusion_5x5_4 - Insertion job for 5x5 Diffusion 4 of 4
Generator_DiffusionRule_4x4 - Dot file generation GoL 4x4
Generator_DiffusionRule_5x5 - Dot file generation GoL 4x4
Generator_GoL_4x4 - Dot file generation GoL 4x4
Generator_GoL_5x5 - Dot file generation GoL 4x4
GoL_5x5_1 - Insertion job for 5x5 GoL 1 of 4
GoL_5x5_2 - Insertion job for 5x5 GoL 2 of 4
GoL_5x5_3 - Insertion job for 5x5 GoL 3 of 4
GoL_5x5_4 - Insertion job for 5x5 GoL 4 of 4
MicroWorldSimulation - Start the simulation of a microworld
StartSimulator - Start a simulation of the game of life

All the insertion tasks will require Mongo to be running on your computer. This tasks are used for saving all the states generated by the Diffusion Rule and the Game of Life using a 4x4 and 5x5 matrix. You may need to consider to run this tasks using separated terminals, they will take a lot of time, just imagine! 2 ^ 25 just to explore all the possible combinations using the Game Of Life process!

If you are brave enough, I totally recommend you to load the file opts.sh on your system's environment. This options will tune up the JVM (Java Virtual Machine) using server configurations, a lot of memory and take advantage of a simple and poor link between the video card and the JVM (just relevant if you're running the simulators).

Step 3: Finally, look for a task and then run it!, for example:

$ ./gradlew StartSimulator
$ ./gradlew test

What about the docs?

You may need LaTex to be installed on your machine, enter into the TexFiles directory and run

pdflatex main.tex