Temporal Planning with Intermediate Conditions and Effects