iterators
Class TransectIterator

java.lang.Object
  extended byiterators.ModelIterator
      extended byiterators.TransectIterator
All Implemented Interfaces:
java.lang.Runnable

public class TransectIterator
extends ModelIterator
implements java.lang.Runnable

This performs a sensitivity analysis on a model. It takes each parameter and varies it across its whole range, in a user determined number of steps, while holding all the other parameters at their original values. At each parameter value, it runs the model and records the score from the stopper. These all are saved to a file, which at the end contains the scores from transects along each parameter emanating out from the original (presumably good) parameter set. This tells you something about how large the basin of good behavior is that the original parameter set is sitting in, and how robust that parameter set would be to small changes in parameters. Note that you can easily imagine cases where this analysis would fool you as to the size or shape of the basin.


Field Summary
 
Fields inherited from class iterators.ModelIterator
cells, finalScore, model, network, nParsTV, numCells, numFunctionCalls, origStopper, outFileName, p, parsTV, ps, running, runThread, theFunction, TheIteratorViewer, verbose
 
Constructor Summary
TransectIterator()
           
 
Method Summary
 ModelIterator copy()
           
 void doRun()
           
protected  void loadParameter(java.lang.String info, BetterTokenizer tokenizer)
           
 void loadParameters(BetterTokenizer tokenizer)
           
 void saveOutput(java.io.PrintWriter ps, java.lang.String inset)
          Saves tagged output from this iterator to a cam file.
 void saveOutputTags(java.io.PrintWriter ps, java.lang.String inset)
          This is called when a cam file is being set up.
 
Methods inherited from class iterators.ModelIterator
continueF, didBomb, didPass, doStartRun, F, getOutputFileName, getParameterSet, getState, getStopper, getValue, init, isRunning, isSaveExtra, iterError, print, println, println, quit, reset, resetStopper, run, saveExtra, setFunction, setIteratorViewer, setOutputFile, setPrint, setPrintStream, setState, setStopper, startRun, stopRun
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang.Runnable
run
 

Constructor Detail

TransectIterator

public TransectIterator()
Method Detail

copy

public ModelIterator copy()
                   throws java.lang.Exception
Overrides:
copy in class ModelIterator
Throws:
java.lang.Exception

saveOutputTags

public void saveOutputTags(java.io.PrintWriter ps,
                           java.lang.String inset)
Description copied from class: ModelIterator
This is called when a cam file is being set up. It should print a list of the tags which this iterator will be outputting for each parameter set saved in the file. Following each tag should be either the string "number" or the string "flag", indicating whether the output will be numerical or text. Most iterators will not need to implement this function since they have no extra information to save beyond score, num function calls, and the parameters themselves

Overrides:
saveOutputTags in class ModelIterator

saveOutput

public void saveOutput(java.io.PrintWriter ps,
                       java.lang.String inset)
Description copied from class: ModelIterator
Saves tagged output from this iterator to a cam file. This is called by the UberIteratorFunction whenever it gets a good score. This function should save any useful information the iterator possesses about the set of parameters using the standard &tag format. The data should be either a number or a string. The cam file can't handle more complex data objects currently. Note that the Score is saved directly by the UberIteratorFunction. Other Iterators should call super.saveOutput() to get things that are general to all iterators saved (i.e. NumFunctionCalls).

Most iterators will not need to implement this function since they have no extra information to save beyond score, num function calls, and the parameters themselves

Overrides:
saveOutput in class ModelIterator

loadParameters

public void loadParameters(BetterTokenizer tokenizer)
                    throws java.lang.Exception
Overrides:
loadParameters in class ModelIterator
Throws:
java.lang.Exception

loadParameter

protected void loadParameter(java.lang.String info,
                             BetterTokenizer tokenizer)
                      throws java.lang.Exception
Overrides:
loadParameter in class ModelIterator
Throws:
java.lang.Exception

doRun

public void doRun()
Overrides:
doRun in class ModelIterator