function marshallcostfunctions(cost_functions){ for(var i=0;i