Using Feedback to Update a Schedule
For indeterminate schedules that depend on real feedback, Scheduler API commands can be used to change aspects of the Schedule and/or STK Scenario.
Jamming Triggered Flight Path Augmentation
The jamming of aircraft communication bandwidths is a common problem faced in combat situations. This use case will simulate aircraft transit between two airports, however, the target facility may be jammed. Scheduler, automated via script, will determine the state of contact between the two entities and, if needed, divert the aircraft to an airport where communication can properly be established.
Python 2.7 is required for this Use Case
File: Aircraft_Feedback.vdf Path: C:\Program Files\AGI\STK 11\STKScheduler\Scenarios\Use Cases
File: Aircraft_Feedback.py Path: C:\Program Files\AGI\STK 11\STKScheduler\Examples\TCP\Python
Line 157 of Aircraft_Feedback.py will automatically ingest the Aircraft_Feedback.txt commands from the program files. If you wish to ingest the commands you construct in these steps, change the current path to your saved commands absolute path. (See step 5)
- Open STK Scheduler.
- Load the associated STK Scenario.
- Navigate to Schedule > STK > Load Scenario....
- In the Schedule Properties window, click Change Scenario.
- Select the file path to Aircraft_Feedback.vdf.
- Click Open then OK and the STK scenario will be associated with your Scheduler file.
- Ingest Resources from STK.
- Navigate to Resource > Ingest From STK > All.
- In the Select Map Objects for Resource Creation window, click Select All.
- Click OK.
- Create Task definitions.
- Go to Task > New Task.
- In the Task ID: field, enter "F1_Contact".
- In the Duration tab, select the radio button next to Variable Duration.
- Set the Min Total Duration to 1 minute and the Max Total Duration to unlimited.
- Click the check box next to Allow Multiple Segments.
- Adjust the Min Segment Duration to 1 minute.
- Create the following Resource Constraints string: <"Aircraft1" AND "Facility1">.
- Click Create Possibilities, then Update.
- Click Create New Task then repeat steps 4 B-H for "F2_Contact" with the following Resource Constraints String: <"Aircraft1" AND "Facility2">.
- Edit script.
- Open Aircraft_Feedback.py in the editor of your choice.
- Ensure lines 23-25 are correct.
- Export Commands
- In Scheduler, navigate to File > Export Commands As... and save the commands in the location of your choice.
- Change line 157 from: command = "IngestCommands 'C:\Program Files\AGI\STK 11\STKScheduler\Examples\TCP\Python\Aircraft_Feedback.txt'" to: command = "IngestCommands '<your absolute path>'"
- Save Aircraft_Feedback.py
- Run the python optimization script.
- Run Aircraft_Feedback.py in your method of choice.
- Watch the Animation!
There are two possible outcomes when the script is run. If Facility 2 is not jammed, Scheduler will positively evaluate the contact task and land at that facility. If, however, the facility is jammed, Scheduler will not be able to establish contact and divert the flight path. Viewing both the animation and the terminal window as the script runs will offer insight into this behavior. Reviewing the Gantt view in Scheduler offers information regarding the contact task times and durations, as well as resource availability.
Ingest Command File
A sample ingest command file named Aircraft_Feedback.txt is available in the Examples/Use Cases folder. Ingesting that file will replicate the schedule described here.