Throughout your day, you are executing plans to achieve your daily goals. In the Planner/Scheduler section, we described a plan designed to accomplish the goal of buying milk. However, creating a plan is not enough to accomplish the goal; the plan must also be carried out. For example, one task in the plan was to find keys and wallet. In order to do this, your eyes have to be told to be looking for these two objects, your hands must be told to move any obstacles that might be covering the objects, and your legs must be told to carry you from room to room. Your brain is actually sending signals to your eyes, arms, legs to work together to accomplish the task; it happens so quickly and autonomously that you are not even aware of it.
In addition to coordinating different parts of your body to do different things at the appropriate times, you must also make sure the plan is carried out successfully. If the car doesn't start at first, you might try to turn the key in the ignition again. If it takes you too long to find the milk in the store, you may want to ask someone where the milk is located. If your car starts smoking during the drive to the store, you may have to pull over and stop the car and scrap the plan of going to the store until someone can help fix your car.
Smart Executive (EXEC) is the part of Remote Agent that is responsible for executing the plans created by Planner/Scheduler (PS). EXEC must command different parts of the spacecraft to act at the appropriate times, make sure each part's task is accomplished successfully, and must decide what to do if something is not going as planned.
EXEC's ability to carry out flexible plans is one of its most unique and significant qualities. In the past, plans created for spacecraft activities were made up of specific tasks that were to be done at specific times. The flexible plans generated by PS do not always have specific times that actions must take place; instead, many actions are given windows of time within which an activity can take place. EXEC uses information about the spacecraft's position and status to determine the best time within the window to accomplish the task. This increases the chance that the plan can be carried out successfully. For example, it is difficult to predict how long things will take and the effects of unexpected variables in space. If a plan dictates that a picture be taken of an asteroid at a particular time, it is possible that the asteroid will not be in front of the camera at that time. On DS1, however, EXEC can determine on its own the ideal time to take the picture based on up-to-date information on the position of the asteroid relative to the spacecraft. This flexibility, along with EXEC's ability to recover from faults, significantly increases mission reliability.
Another advantage of EXEC's ability to carry out flexible plans is it enables a spacecraft to take advantage of unexpected science opportunities. Sometimes, significant science discoveries are made unexpectedly, like the discovery of pennicillin on moldy bread. EXEC's flexibility opens up the future possibility of spacecraft being able to take advantage of unexpected science opportunities. The hope is that if the spacecraft detects something unusual, like a unique type of radiation coming from an asteroid, the EXEC will be able to make scientific observations of it, while still continuing with the original plan.
EXEC has two main roles: executing the plan and recovering from failures that prevent proper execution of it. To execute a plan the EXEC:
To detect and recover from failures, EXEC: