def make_p(p0,p1,t0,t1):
  """make_p(p0,p1,t0,t1) returns a zero, linear, zero 1/2 load function, p(t)"""
  dp = p1-p0 ; dt = t1-t0 ; a = dp/dt ; b = p0 - a*t0
  def p(t):
    if t0<=t<=t1:
      return a*t+b
    else:
      return 0.0
  return p