HOC run/function fitness

Using the Multiple Run Fitter, praxis, etc..
Post Reply
mctavish
Posts: 74
Joined: Tue Mar 14, 2006 6:10 pm
Location: New Haven, CT

HOC run/function fitness

Post 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
mctavish
Posts: 74
Joined: Tue Mar 14, 2006 6:10 pm
Location: New Haven, CT

Post 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
}
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

The init() isn't necessary; run() does an init() for you. Depending on the model, the time
savings may be big.
Post Reply