org.jactr.tools.itr
Class LongitudinalParameterSetModifier

java.lang.Object
  extended by org.jactr.tools.itr.ParameterSetModifier
      extended by org.jactr.tools.itr.LongitudinalParameterSetModifier
All Implemented Interfaces:
org.jactr.core.utils.parameter.IParameterized, IParameterModifier, IParameterSetModifier, ISliceListener

public class LongitudinalParameterSetModifier
extends ParameterSetModifier
implements ISliceListener

saves models of terminal runs and restores them to the run directory so that longitudinal runs can be bootstrapped from prior runs

Author:
harrison

Field Summary
 
Fields inherited from interface org.jactr.tools.itr.IParameterModifier
PARAMETER_NAME, PARAMETER_VALUES
 
Constructor Summary
LongitudinalParameterSetModifier()
           
 
Method Summary
 void associate(java.lang.String modelName, java.lang.String modelFile)
          called by the parser..
 void copyModels(java.util.Collection<org.jactr.core.model.IModel> models, long iteration)
          serializes the models to the temp directory
 void deleteModels()
          delete the models from working dir..
 boolean isFirstSlice(java.lang.String parameterValue)
          is this the first slice in a longitudinal run?
 boolean isLastSlice(java.lang.String parameterValue)
           
 void setParameter(org.antlr.runtime.tree.CommonTree modelDescriptor, int parameterValueIndex)
           
 void startIteration(ISlice slice, long iteration, java.util.Collection<org.jactr.core.model.IModel> models)
          called just before the models are to be run, but after their parameters have been set
 void startSlice(ISlice slice)
          called before loading, we get a chance to copy models in..
 void stopIteration(ISlice slice, long iteration, java.util.Collection<org.jactr.core.model.IModel> models)
           
 void stopSlice(ISlice slice)
          called after a slice has completed
 
Methods inherited from class org.jactr.tools.itr.ParameterSetModifier
add, getNestedParameterValues, getParameter, getParameterDisplayName, getParameterName, getParameterValues, getPossibleParameters, getSetableParameters, remove, setParameter, setParameter
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LongitudinalParameterSetModifier

public LongitudinalParameterSetModifier()
Method Detail

associate

public void associate(java.lang.String modelName,
                      java.lang.String modelFile)
called by the parser.. should probably just be a parameter for simplicities sake.

Parameters:
modelName -
modelFile -

deleteModels

public void deleteModels()
delete the models from working dir..


copyModels

public void copyModels(java.util.Collection<org.jactr.core.model.IModel> models,
                       long iteration)
serializes the models to the temp directory

Parameters:
models -

setParameter

public void setParameter(org.antlr.runtime.tree.CommonTree modelDescriptor,
                         int parameterValueIndex)
Specified by:
setParameter in interface IParameterModifier
Overrides:
setParameter in class ParameterSetModifier

isFirstSlice

public boolean isFirstSlice(java.lang.String parameterValue)
is this the first slice in a longitudinal run?

Parameters:
parameterValue -
Returns:

isLastSlice

public boolean isLastSlice(java.lang.String parameterValue)

startSlice

public void startSlice(ISlice slice)
called before loading, we get a chance to copy models in..

Specified by:
startSlice in interface ISliceListener

startIteration

public void startIteration(ISlice slice,
                           long iteration,
                           java.util.Collection<org.jactr.core.model.IModel> models)
Description copied from interface: ISliceListener
called just before the models are to be run, but after their parameters have been set

Specified by:
startIteration in interface ISliceListener

stopIteration

public void stopIteration(ISlice slice,
                          long iteration,
                          java.util.Collection<org.jactr.core.model.IModel> models)
Specified by:
stopIteration in interface ISliceListener

stopSlice

public void stopSlice(ISlice slice)
Description copied from interface: ISliceListener
called after a slice has completed

Specified by:
stopSlice in interface ISliceListener