Intelligent Real Time Scheduling and Control for Pharmaceutical Industry