How to turn a algorithm into a cost surface?

Discussion created by gingerlilmoore on Jul 12, 2013
Latest reply on Jul 13, 2013 by schmidtlein
I need to create a cost surface using an algorithm that calculates that amount of energy expended as a person walks over a specified study area.  I was wondering how to do this in python, or if anyone knew of an easier way to do this.  I have very little programming experience (just learning as I go), so could really use the help.

M= 1.5W + 2.0(W+L)(L/W)^2+n(W+L)(1.5V^2+0.35VS)

M= metabolic rate in watts (kilojoules/minute)
W=the weight of the person in kilograms
L=the load carried by the person in kilograms
n=value reflecting the terrain
V=the speed of walking in m/s
S=percentage gradient

Unfortunately I need to figure this out over the weekend, and have had no luck with trying to figure it out on my own.