  We study scheduling problems on a machine with varying speed. Assuming a
known speed function we ask for a cost-efficient scheduling solution. Our main
result is a PTAS for minimizing the total weighted completion time in this
setting. This also implies a PTAS for the closely related problem of scheduling
to minimize generalized global cost functions. The key to our results is a
re-interpretation of the problem within the well-known two-dimensional Gantt
chart: instead of the standard approach of scheduling in the {\em
time-dimension}, we construct scheduling solutions in the weight-dimension.
  We also consider a dynamic problem variant in which deciding upon the speed
is part of the scheduling problem and we are interested in the tradeoff between
scheduling cost and speed-scaling cost, which is typically the energy
consumption. We observe that the optimal order is independent of the energy
consumption and that the problem can be reduced to the setting where the speed
of the machine is fixed, and thus admits a PTAS. Furthermore, we provide an
FPTAS for the NP-hard problem variant in which the machine can run only on a
fixed number of discrete speeds. Finally, we show how our results can be used
to obtain a~$(2+\eps)$-approximation for scheduling preemptive jobs with
release dates on multiple identical parallel machines.
