Modeling the traffic demands accurately has important significance for network resource utilization and performance optimization. The uncertainty of demands has made the long term forecasting of traffic a particularly difficult problem. So the traffic model named as sliding scheduled lightpath demands (SSLDs) is considered in this paper. A time-disjointness maximizing algorithm is proposed, which is combined with simulated annealing (SA) algorithm to solve routing and resource assignment problem for SSLDs. This solution is evaluated and compared with two fixed routing algorithms. Simulation results show that SA algorithm has a better performance for routing and resource assignment.