I think the way to do this is by having a objective functions module. We can have some built in objective functions, and we can have the ability for the user to build their own in the module based on reading from a tally output (or where ever). The input would then require the user to specify the function name and any required parameters (ex tally number).