Interface IPlanRequest
An interface that marks an implementation of a plan request, a request to compute a plan
Namespace: Unity.AI.Planner
Syntax
public interface IPlanRequest
Properties
Plan
The plan constructed by the planning process
Declaration
IPlan Plan { get; }
Property Value
| Type | Description |
|---|---|
| IPlan |
Status
The current status of the plan request
Declaration
PlanRequestStatus Status { get; }
Property Value
| Type | Description |
|---|---|
| PlanRequestStatus |
Methods
Cancel()
Cancels the plan request
Declaration
void Cancel()
Dispose()
Halts the planning process and disposes the plan for the query
Declaration
void Dispose()
Pause()
Halts the planning process until resumed
Declaration
void Pause()
PlanUntil(Nullable<Int32>, Nullable<Int32>, Nullable<Single>, Action<IPlan>)
Sets the criteria for ending the planning process
Declaration
IPlanRequest PlanUntil(int? maximumUpdates = default(int? ), int? planSize = default(int? ), float? rootStateTolerance = default(float? ), Action<IPlan> requestCompleteCallback = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Nullable<Int32> | maximumUpdates | The maximum number of updates the planning process may schedule |
| Nullable<Int32> | planSize | The maximum plan size threshold |
| Nullable<Single> | rootStateTolerance | A threshold of convergence between the upper and lower bound for the root state of the plan |
| Action<IPlan> | requestCompleteCallback | A callback to be invoked once the plan request has completed |
Returns
| Type | Description |
|---|---|
| IPlanRequest | The updated plan request |
Resume()
Resumes the paused planning process
Declaration
void Resume()
SchedulingMode(Nullable<Int32>, Nullable<SelectionJobMode>, Nullable<BackpropagationJobMode>)
Sets the frequency and job modes for the planning jobs
Declaration
IPlanRequest SchedulingMode(int? framesPerUpdate = default(int? ), SelectionJobMode? selectionJobMode = default(SelectionJobMode? ), BackpropagationJobMode? backpropagationJobMode = default(BackpropagationJobMode? ))
Parameters
| Type | Name | Description |
|---|---|---|
| Nullable<Int32> | framesPerUpdate | The number of frames to skip per planning iteration |
| Nullable<SelectionJobMode> | selectionJobMode | The mode of the selection job to run, sequential or parallel |
| Nullable<BackpropagationJobMode> | backpropagationJobMode | The mode of the backpropagation job to run, sequential or parallel |
Returns
| Type | Description |
|---|---|
| IPlanRequest | The updated plan request |
WithBudget(Nullable<Int32>, Nullable<Int32>)
Sets the number of planning iterations per update to perform as well as the number of states to expand per iteration.
Declaration
IPlanRequest WithBudget(int? planningIterationsPerUpdate = default(int? ), int? stateExpansionsPerIteration = default(int? ))
Parameters
| Type | Name | Description |
|---|---|---|
| Nullable<Int32> | planningIterationsPerUpdate | The number of planning iterations to perform at each update |
| Nullable<Int32> | stateExpansionsPerIteration | The number of states in the plan to expand during each planning iteration |
Returns
| Type | Description |
|---|---|
| IPlanRequest | The updated plan request |
WithSettings(PlannerSettings)
Sets the planning settings.
Declaration
IPlanRequest WithSettings(PlannerSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| PlannerSettings | settings |
Returns
| Type | Description |
|---|---|
| IPlanRequest |