Brian's Brain
-------------
To get started:
****************
Note: Make sure you are in the C:\eclipse3.5\workspace\BriansBrain\ directory or edit the path in the BAT files accordingly.

Instructions:
**************
For Project Simulation:
1)Import BriansBrains.zip in a new CD++ Project
2)Select Simulate Project;
  choose BriansBrain6.ma, BriansBrain20.ma, BriansBrain100.ma, BriansBrain400.ma or BriansBrain500.ma  for the Coupled Model file name; 
  then click on Load.bat and select matching bat for the .ma file selected.
3) Start Simulation, a log file will be generated.

For drawlogs:
1)Select Drawlog your models in the CD++ menu
2)Load a xxxdrawlog.bat depending on the size model you want to use and then select Drawlog. A DRW will be generated

For Visualization with CD++ Modeler:
1) Select CD++ Modeller, then Cell-DEVS animation
2) Load the DRW file (BriansBrain6.drw, BriansBrain20.drw, BriansBrain100.drw, BriansBrain500.drw, etc.)
3) Choose Modify palette and load BriansBrain.pal
4) Start the simulation. Values correspond to the states described in the report.
   

To run different simulations
*****************************
Not all the test value files (BriansBrain6.val, BriansBrain20.val, BriansBrain100.val, BriansBrain400.val and BriansBrain500.val) are provided.
There is a default test value file for each size of the four sizes of the model (for size 20 and 100 it corresponds to 01_BrainsBrainxxx.val). 
a) If you want to test the other files provided (for 20x20 and 100x100), please follow the steps described below:

	For 20x20:

	1)Delete the BriansBrain20.val file in the current file. It is recommend to backup the file before delete it.

	2)Rename any file you like with the name of xx_BriansBrain20.val to BriansBrain20.val

	3)Make sure that BriansBrain20.val is into the project file and follow the above instructions.

	4)All the files have been randomly generated. The are do scenarios: random seeds in the hole network and random seeds only in the centre.
	
	For 100x100 the instructions are analogous for the files ending in 100.val.
	
b) If you want to run more test a script is provided to generate new random initial states.

	1)Open Cwing (make sure gcc compiler is installed)
	2)Place the prompt in ".../BriansBrain/initial_value_generator" directory
	3)If you want the new input for the case random seeds in the whole network and for size 20 type on the terminal:  ./20_random.sh
	  If you want the new input for the case random seeds in the whole network and for size 100 type on the terminal:  ./100_random.sh
	  If you want the new input for the case random seeds in the whole network and for size 5000 type on the terminal:  ./500_random.sh
	  If you want the new input for the case random seeds in the centre of the network and for size 20 type on the terminal:  ./20_centre_random.sh
	  If you want the new input for the case random seeds in the centre of the network and for size 100 type on the terminal:  ./100_centre_random.sh
	  If you want the new input for the case random seeds in the centre of the network and for size 400 type on the terminal:  ./400_centre_random.sh
	4)Refresh the project folder to see .val file generated
	5)Follow the instructions above