Planning and scheduling in manufacturing and services