Optimization of Post-Surgery Wake Up Time Providing Adequate Analgesia

What is the best drug concentration during anesthesia? We are creating algorithms to minimize pain and shorten wake up time after surgery. This will be used by anesthesiologist during surgery to continuously provide optimal drug cocktails with surgery and patient specificity.