Model-Free Plans
Model-Free Plans let you bring a plan created outside PlanDev into the planning interface without uploading a mission model JAR. The import file contains the plan and its activity and resource type definitions. It can also contain recorded simulation results, including simulated activity spans and resource profiles.
Use a Model-Free Plan when you want to review an externally generated plan, inspect its results, check constraints, or expand sequence templates, but do not have an executable PlanDev mission model JAR for it.
Model-Free Plans are read-only in PlanDev. The file describes the activities and any results you have supplied, but it does not contain the code needed to re-simulate changes to them. Allowing edits would leave the plan and its recorded results out of sync.
| Regular plan import | Model-Free Plan import | |
|---|---|---|
| Mission model | Select a model already uploaded to PlanDev | Type definitions are included in the file; no JAR is needed |
| Simulation results | Not included in the plan file | Spans and resource profiles can be included |
| Editing | Activities can be edited | Activities and plan time bounds are read-only |
| Simulation and scheduling | Available with a compatible executable model | Unavailable |
For the usual import workflow, see Plan Import/Export.
Prepare a Model-Free Plan File
Rather than a new format, Model-Free Plans extend the existing PlanDev plan.json format (now version 3) with type
definitions and optional recorded simulation results. The existing plan fields such as name, start_time, duration,
and activities remain the same.
See the v3 format schema for the complete field definitions. The main additions are:
modelis a required object containing the type definitions for the plan. It must contain both of the following arrays (use[]if you have no types):activity_typescontains one object for each activity type used inactivitiesorresults.spans. Each object'snamemust exactly match the corresponding activity or span'stype. For example, an activity with"type": "take_image"needs a declaration with"name": "take_image".- The optional
parametersarray on an activity type describes its arguments: each parameter'snameidentifies a key inarguments, and itsschemadescribes the expected value, such as{ "type": "string" }or{ "type": "int" }. A declaration containing onlynameis also supported; argument values are preserved without parameter schemas but may not be displayed correctly in the UI without types.
- The optional
resource_typescontains objects with anameandschema. These definitions describe the resources; their recorded values belong inresults.profiles. Each resource'snamemust exactly match its key inresults.profiles, and itsschemashould match that profile'sschema.
resultsis an optional object containing recorded simulation results or telemetry data. When present, it must contain bothspansandprofiles; use[]and{}, respectively, when either is empty:spansis an array of recorded activity instances, usually withdurations. Each span'styperefers to a declaration inmodel.activity_types. Itsspan_idmust uniquely identify it within the results. An optionaldirective_idlinks it to anidinactivities; spans without a corresponding directive can omitdirective_id.profilesis an object containing resource profiles keyed by resource name. Each profile contains atypeof"real"or"discrete", aschema, and asegmentsarray holding its recorded values. This uses the same resource profile format asprofileSetwhen importing external datasets. See that page for real and discrete profile examples, segment durations, and gaps.
The example below contains one activity directive and one recorded span corresponding to it, along with a simple
resource profile. For historical compatibility reasons, start_offset on a directive is an interval string;
start_offset and duration on a span are numbers of microseconds.
{
"version": "3",
"name": "camera pass",
"start_time": "2030-01-01T00:00:00+00:00",
"duration": "01:00:00",
"simulation_arguments": {},
"activities": [
{
"id": 1,
"anchor_id": null,
"anchored_to_start": true,
"name": "take image",
"type": "take_image",
"start_offset": "00:10:00",
"arguments": { "target": "crater a" },
"metadata": {}
}
],
"model": {
"activity_types": [
{
"name": "take_image",
"parameters": [
{ "name": "target", "schema": { "type": "string" } }
]
}
],
"resource_types": [
{
"name": "/images_taken",
"schema": { "type": "int" }
}
]
},
"results": {
"spans": [
{
"span_id": 1,
"type": "take_image",
"start_offset": 600000000,
"duration": 30000000,
"arguments": { "target": "crater a" },
"directive_id": 1
}
],
"profiles": {
"/images_taken": {
"type": "discrete",
"schema": { "type": "int" },
"segments": [
{ "duration": 630000000, "dynamics": 0 },
{ "duration": 2970000000, "dynamics": 1 }
]
}
}
}
}
See the complete v3 example and format schema for additional fields and resource profile examples.
Import the Plan
Once you have a plan file, you can import it the same way as a usual plan:
- Open the Plans page and choose Import.
- Select the JSON file. PlanDev fills in the plan name and time range from it. You can change the name before creating the plan; the time range comes from the file.
- Choose Create from .json. When the file contains
model, you do not select an uploaded mission model. - Wait for the import status to show that it has completed before using the plan. A large file may take time to load its activities and results.
If the import fails, PlanDev will display an error with the import status. Fix the file and import it again.
Work with the Imported Plan
Once the import completes, you can open the plan to inspect its activity directives, recorded spans, and resource profiles. Imported results can be used for constraint checking and sequence template expansion. Sequence templates are tied to the model-free plan they were made against, and are not automatically copied to any other imported plans.
You cannot add, edit, or remove activity directives, change the plan’s time range or model, run a new simulation or scheduling run, or branch and merge a Model-Free Plan. To change its contents, update the source file and import it as a new plan.
Keep the original file. The current Export plan as .json action exports the standard plan fields; it does not export the embedded type definitions and recorded results needed to recreate a Model-Free Plan. In future we plan to optionally allow exporting fully self-contained model-free plans from the UI.
Known Limitations
PlanDev has been tested with imported model-free plans with sizes up to ~100MB. Significantly larger plans or datasets may cause significant slowness or out-of-memory errors. More performance improvements are planned here in future - if you are interested in using PlanDev with much larger plans, please let us know.