Page 1 of 1
HOC run/function fitness
Posted: Mon Jul 10, 2006 11:57 pm
by mctavish
I would like to make my own fitness function, analyzing simulation runs, as HOC code. What is the best way to do this-- as a run fitter, or function fitter, and what are the details to do this?
Thanks,
Tom
Posted: Wed Jul 12, 2006 11:47 am
by mctavish
With help from Michael, I can answer my own post which may be useful for others.
What I needed out of the MRF was a "Fitness Primitive". With that, I can give it the expression "myfun()"
A skeleton function fitness hoc file can be loaded with the following:
Code: Select all
objref vec
vec=new Vector()
func myfun() {
vec.record($soma.v(0.5))
init()
run()
// Do whatever analysis on vec
err=AnalysisOnVec(vec)
return err
}
Posted: Wed Jul 12, 2006 12:12 pm
by ted
The init() isn't necessary; run() does an init() for you. Depending on the model, the time
savings may be big.