Algorithms for some dynamic lot-size scheduling problems with time varying costs and capacity constraints