Consensus Code

From Worden
Jump to: navigation, search

The consensus simulation is working.

Next is to

  • make the simulation code output statistics on outcomes (done)
  • write batch script to run it a bunch of times and aggregate the results (done, mostly by copying from another project)
  • compare a couple different strategies in terms of statistics on outcomes.

Never mind the "No more species" line in the output - it's left over in the code that was written for evolutionary ecology models...

WorkingWiki messages

(debug message) User agent is 'Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)', relying on mathjax

Makefile
# We store simulation outputs in a separate project directory, so it can be used with
# "do not copy".  This is very convenient.
outdir = $(PROJECT_DIR_Consensus_Results)/$(1).out
%.out run-% : %.experiment make-exe
	$(CONSENSUS_EXE) -f $(PROJECT_DIR_consensus_simulation)/settings/default.settings -f $< --outputDirectory=$(call outdir,$*)
	ln -s $(call outdir,$*) $@
 
# The simulation program and run-batch script are in the code from github
CONSENSUS_EXE = $(PROJECT_DIR_consensus_simulation)/consensus
RUN_BATCH = $(PROJECT_DIR_consensus_simulation)/run-batch.pl
export LIBDIR=$(PROJECT_DIR_adap_dyn)
export VXLDIR=/usr/local/src/vxl/vxl-1.14/vxl
export OTHERCFLAGS=-I/usr/local/src/vxl/bin/vcl -I$(EXECSTREAMDIR)
export EXECSTREAMDIR=/usr/local/src/libexecstream
 
# we are responsible for compiling the simulation program
make-exe :
	$(MAKE) $(COMPILE_ARGS) -C $(dir $(CONSENSUS_EXE)) $(notdir $(CONSENSUS_EXE))
 
# a first batch run, running the simulation a lot of times with varying
# settings.  Collect the data in the results project.
# BATCH0 = $(PROJECT_DIR_Consensus_Results)/batch-0
BATCH_ARGS = --executable=$(CONSENSUS_EXE) -f $(PROJECT_DIR_consensus_simulation)/settings/default.settings --logToCout=false --vary replicate=1-10 --vary nBits=4,16,64 --vary nBlocks=1,2,4 --vary weightingForSharedLandscape=0,0.2,0.4,0.6,0.8,1 --vary groupSize=4,12,20 --vary facilitationStrategy="anyone proposes","blockers propose" --vary individualProposalStrategy="best","best neighbor","any improvement" --vary blockStrategy="if worse","if worse and not acceptable"
run-batch-% : $(CONSENSUS_EXE)
	$(RUN_BATCH) -D $(PROJECT_DIR_Consensus_Results)/batch-$* $(BATCH_ARGS)
 
# rule to aggregate the outcomes in an existing batch directory.  This should
# only be necessary in case of a problem, because the above rule does this
# after running all the simulations.
batch-outcomes-% : 
	$(RUN_BATCH) -d -D $(PROJECT_DIR_Consensus_Results)/batch-$* -c

Personal tools
Namespaces

Variants
Actions
Navigation
Projects
Toolbox