API Reference

Index

Docs

TaskGraphs.AbstractPCTAPFSolverType
AbstractPCTAPFSolver

Abstract type of which all PC-TAPF solvers must be concrete subtypes. All concrete solvers must implement the following interface for solving PC-TAPF problems:

  • solution, cost = solve!(solver,problem_def)
  • check_runtime(solver) should trigger an interrupt + early return if the allowable runtime has been exceeded

Also, we need a good Logger type for keeping track of thing like runtime, iterations, optimality gap (including upper and lower bound), etc.

source
TaskGraphs.CleanUpBotType
CleanUpBot <: AbstractRobotType

A robot type for picking up dropped objects, cleaning up spills, and taking care of dead robots

source
TaskGraphs.DeadRobotType
DeadRobot

Robot id is frozen.

Effect:

  • Freeze robot
  • Add "no-go" constraint to CBS/PIBT (how to do consistently? Perhaps place in SearchEnv and add directly to PCCBSEnv) OR temporarily remove vertex from graph
  • Set robot state to NULL state? How to avoid having CBS complain about conflicts? Maybe set State to NULL State and place DeadRobotObject at the collection site?
  • Dispatch CleanUpBot to collect frozen robot
  • When CleanUpBot returns to "garage", regenerate frozen Robot's ROBOT_AT node and valid state.
source
TaskGraphs.ExtendedAssignmentMILPType
ExtendedAssignmentMILP <: TaskGraphsMILP

Extended to the replanning setting. Replaces robotics with the "tips" of each robot's existing itinerary, and replaces objectics with each COLLECT node that with an invalid robot id.

source
TaskGraphs.FlowGraphType
FlowGraph

Represents a time-extended graph useful for MILP formulations. Each vertex of the FlowGraph corresponds to a "flow edge"

source
TaskGraphs.PathSpecType
PathSpec

Encodes information about the path that must be planned for a particular schedule node.

Fields:

  • node_type::Symbol = :EMPTY
  • start_vtx::Int = -1
  • final_vtx::Int = -1
  • min_duration::Int = 0
  • agent_id::Int = -1
  • object_id::Int = -1
  • plan_path::Bool = true - flag indicating whether a path must be planned. For example, Operation nodes do not require any path planning.
  • tight::Bool = false - if true, the path may not terminate prior to the beginning of successors. If tight == true, local slack == 0. For example, GO must not end before COLLECT can begin, because this would produce empty time between planning phases.
  • static::Bool = false - if true, the robot must remain in place for this planning phase (e.g., COLLECT, DEPOSIT).
  • free::Bool = false - if true, and if the node is a terminal node, the planning must go on until all non-free nodes are completed.
  • fixed::Bool = false - if true, do not plan path because it is already fixed. Instead, retrieve the portion of the path directly from the pre-existing solution.
source
TaskGraphs.StochasticProblemType
StochasticProblem{P<:AbstractPC_TAPF}

Defines a stochastic version of PC_TAPF, wherein different disturbances can cause unexpected problems in the factory.

source
TaskGraphs.TeamAssignmentMILPType
TeamAssignmentMILP

***Not yet implemented.***

Eextend the assignment matrix formulation of AssignmentMILP to the "team-forming" case where robots must collaboratively transport some objects.

source
TaskGraphs.UNDERTAKEType
UNDERTAKE <: AbstractRobotAction{CleanUpBot}

Encodes the task of collecting, carrying, and depositing a dead robot

source
CRCBS.load_problemMethod
CRCBS.load_problem(loader::TaskGraphsProblemLoader,solver_config,prob_path)

Currently only impemented for PCTAPF and PCTA

source
CRCBS.run_profilingMethod
CRCBS.run_profiling(loader::TaskGraphsProblemLoader,solver_config,problem_dir)

Run profiling with a TaskGraphsProblemLoader.

source
CRCBS.solve!Method
solve!(solver, base_env::SearchEnv;kwargs...) where {A,P}

Use the planner defined by solver to solve the PC-TAPF problem encoded by base_env. For solvers of type NBSSolver, the algorithm involves repeatedly solving an assignment problem followed by a route-planning problem. Within the generic solve! method it is possible to initialize an assignment problem (the type is not constrained) and then modify it via update_assignment_problem! prior to each new call to solve_assignment_problem!. This is the approach taken for various MILP-based assignment solvers. It is also possible to reconstruct the assignment problem from scratch within each call to solve_assignment_problem!.

Arguments:

  • solver <: AbstractPCTAPFSolver
  • base_env::SearchEnv : a PC-TAPF problem

Outputs:

  • best_env : a SearchEnv data structure that encodes a solution to the problem
  • cost : the cost of the solution encoded by best_env
source
TaskGraphs.add_gadget_layer!Function
add_gadget_layer!(G::FlowGraph,edge_list,t,vtx_map=Dict{Int,Int}())

vtxmap points to `START` vertices

[START (already added)]––––––––-<STAY>–––––––––[MID] | | |–<EDGE>–| |–<EDGE>–| [GADGET]–<EDGE>–[GADGET] |–<EDGE>–| |–<EDGE>–| | | [START (already added)]––––––––-<_STAY>–––––––––[MID]

source
TaskGraphs.add_job_shop_constraints!Method
add_job_shop_constraints!(milp_model::AbstractAssignmentMILP,sched::OperatingSchedule,spec::ProblemSpec) #,model::JuMP.Model)

After an AbstractAssignmentMILP has been optimized, add in any edges that result from an active ``job shop'' constraint (where two robots require the same resource).

source
TaskGraphs.add_vertex_layer!Method
add_vertex_layer!(G::FlowGraph,incoming::Dict{Int,Vector{Int}},t)

incoming points to _MID vertices. [MID (already added)]–<_BRIDGE>–[START]

source
TaskGraphs.align_stage_results!Method
align_stage_results!(primary_results,backup_results)

Align results dicts when they stages aren't aligned (i.e., if the backup planner only runs some of the time.)

source
TaskGraphs.align_with_predecessorMethod
align_with_predecessor(node,succ)

Modifies a node to match the information encoded by its predecessor. This is how e.g., robot ids are propagated through an existing operating schedule after assignments (or re-assignments) have been made.

source
TaskGraphs.align_with_successorMethod
align_with_successor(node,succ)

Modifies a node to match the information encoded by its successor. This is how e.g., robot ids are propagated through an existing operating schedule after assignments (or re-assignments) have been made.

source
TaskGraphs.backtrack_to_previous_nodeMethod
backtrack_to_previous_node(path,node,tf)

Work backward from tf until finding the beginning of the previous node's path segment. Returns:

  • t::Int : the time step at which the previous node's path segment begins
  • previous::ScheduleNode : the previous node
source
TaskGraphs.compute_lower_boundFunction
compute_lower_bound(env,[starts,assigned,dist_mtx,pairs])

Computes a lower bound on makespan for sched::OperatingSchedule by assuming that any robot can be simultaneously assigned to multiple tasks.

Args:

  • env SearchEnv
  • starts the set of vertices whose outgoing edges are available
  • assigned the set of vertices whose incoming edges are already assigned
  • dist_mtx encodes the cost of each edge v -> vp as dist_mtx[v,vp]
  • pairs specifies eligible edges
source
TaskGraphs.compute_route_plan!Method
compute_route_plan!

Computes all paths specified by the project schedule and updates the solution in the ConstraintTreeNode::node accordingly.

source
TaskGraphs.construct_cost_modelFunction
construct_cost_model(solver::AStarSC, args...;kwargs...)

Defines the cost model used by Slack- and Collision-aware A*. This particular setting of cost model is crucial for good performance of A_star, because it encourages depth first search. If we were to replace terms 3-5 with SumOfTravelTime(), we would get worst-case exponentially slow breadth-first search!

source
TaskGraphs.construct_random_project_specMethod
construct_random_project_spec(M::Int;max_children=1)

Inputs:
    `M` - number of objects involved in the operation
    `max_parents` - determines the max number of inputs to any operation
    `depth_bias` ∈ [0,1] - hyperparameter for tuning depth.
        If `depth_bias` == 1.0, the project_spec graph will always be depth
        balanced (all paths through the tree will be of the same length).
        For `depth_bias` == 0.0, the graph will be as "strung out" as
        possible.
source
TaskGraphs.construct_search_envFunction
construct_search_env(solver,schedule,env,...)

Constructs a new search env by combining the new schedule with the pre- existing get_route_plan(env). This involves constructing a new cost function that reflects the new schedule structure. TODO: Carry over information about get_cache(search_env)

source
TaskGraphs.construct_search_envFunction
function construct_search_env(solver, env::SearchEnv, ... )

Construct a new SearchEnv, with costmodel and heuristicmodel defined by the solver type.

source
TaskGraphs.convert_env_graph_to_undirectedMethod
convert_env_graph_to_undirected(G)

It is necessary to convert the env graph to an undirected graph because the gadget is based on undirected edges. Self-edges also need to be removed, as these are already accounted for in the gadget.

source
TaskGraphs.evaluate_path_gapMethod
evaluate_path_gap(search_env::SearchEnv,path,v)

Returns the gap between a path's length and it's expected length (based on times stored in get_cache(env).t0)

source
TaskGraphs.exclude_solutions!Method
exclude_solutions!(model::JuMP.Model,forbidden_solutions::Vector{Matrix{Int}})

Adds constraints to model such that the solution may not match any solution contained in forbiddensolutions. Assumes that the model contains a variable container called X whose entries are binary and whose dimensions are identical to the dimensions of each solution in forbiddensolutions.

source
TaskGraphs.find_inconsistenciesMethod
find_inconsistencies(env::MPCCBSEnv;

Return a dictionary mapping from node id to the amount of time by which the node completion time exceeds the time step at which the transition occurs in the itinerary of the associated robot.

source
TaskGraphs.fix_precutoff_nodes!Method
fix_precutoff_nodes!(sched::OperatingSchedule,
    problem_spec::ProblemSpec,t)

Identify all nodes that end before the cutoff time, and change their path spec so that the route planner will not actually plan a path for them.

source
TaskGraphs.formulate_assignment_problemMethod
formulate_assignment_problem(solver,prob;

Returns an assignment problem instance that can be updated (as opposed to being reconstructed from scratch) on each call to update_assignment_problem! prior to being resolved.

source
TaskGraphs.formulate_milpMethod
formulate_milp(milp_model::AbstractAssignmentMILP,sched,problem_spec;kwargs...)

Express the TaskGraphs assignment problem as an AbstractAssignmentMILP using the JuMP optimization framework.

Inputs: milpmodel::T <: TaskGraphsMILP : a milp model that determines how the sequential task assignment problem is modeled. Current options are AssignmentMILP, SparseAdjacencyMILP and GreedyAssignment. sched::OperatingSchedule : a partial operating schedule, where some or all assignment edges may be missing. problemspec::ProblemSpec : encodes the distance matrix and other information about the problem.

Keyword Args: optimizer - a JuMP optimizer (e.g., Gurobi.optimizer) cost_model=MakeSpan - optimization objective, currently either MakeSpan or SumOfMakeSpans. Defaults to the costmodel associated with `problemspecOutputs:model::AssignmentMILP` - an instantiated optimization problem

source
TaskGraphs.generate_path_specMethod
generate_path_spec(spec,node)

Generates a PathSpec struct that encodes information about the path to be planned for node.

Arguments:

  • spec::ProblemSpec
  • node::T <: AbstractPlanningPredicate
source
TaskGraphs.get_best_pairFunction
get_best_pair(Ao,Ai,cost_func,filt=(a,b)->true)

Return argmin v ∈ Ao, v2 ∈ Ai, cost_func(v,v2) s.t. filt(v,v2) == true

source
TaskGraphs.get_delivery_task_vtxsMethod
get_delivery_task_vtxs(sched::OperatingSchedule,o::ObjectID)

Return all vertices that correspond to the delivery task (COLLECTCARRYDEPOSIT) of object o.

source
TaskGraphs.get_duration_vectorMethod
get_duration_vector(spec::ProjectSpec)

Return a vector Δt such that Δt[i] is the amount of time that must elapse before object i can be picked up after its parent operation is performed.

source
TaskGraphs.get_random_problem_instantiationMethod
`get_random_problem_instantiation`

Args:
- `N`: number of robots
- `M`: number of delivery tasks
- `robot_zones`: list of possible start locations for robots
- `pickup_zones`: list of possible start locations for objects
- `dropoff_zones`: list of possible destinations for objects
source
TaskGraphs.get_sFMethod
get_sF(milp_model::AbstractAssignmentMILP)

Return an a vector of final object locations.

source
TaskGraphs.get_source_mapMethod
get_source_map(G::FlowGraph,env_graph,TMAX)

Return a source map such that source_map[v][t] points to the corresponding _START vertex in the gadget graph.

source
TaskGraphs.get_valid_robot_idsMethod
get_valid_robot_ids(sched::OperatingSchedule,n_id::AbstractID)

Returns vector of all robot ids associated with the schedule node referenced by n_id.

source
TaskGraphs.greedy_assignment!Method

GreedyAssignment maintains three sets: The "satisfied set" C, the "required incoming" set Ai, and the "available outgoing" set Ao.

At each step, the algorithm identifies the nodes v1 ∈ Ai and v2 ∈ Ao with shortest "distance" (in the context of OperatingSchedules, this distance refers to the duration of v1 if an edge v1 → v2 is added) and adds an edge between them. The distance corresponding to an ineligible edge is set to Inf.

After adding the edge, the algorithm sweeps through a topological ordering of the vertices and updates C, Ai, and Ao. In order for v to be placed in C, v must have enough incoming edges and all of v's predecessors must already be in C. In order to be added to Ai, v must have less than the required number of incoming edges and all of v's predecessors must already be in C. In order for v to be added to Ao, v must have less than the allowable number of outgoing edges, and must be in C.

source
TaskGraphs.handle_disturbance!Function
handle_disturbance!(solver,prob,env,d::DroppedObject,t,env_state=get_env_state(env,t))

Returns a new SearchEnv with a modified OperatingSchedule. The new schedule replaces the previous delivery task (OBJECT_AT(o,old_x)COLLECTCARRYDEPOSIT) with a new CleanUpBot delivery task (OBJECT_AT(o,new_x)CUB_COLLECTCUB_CARRYCUB_DEPOSIT). It is assumed that the time t corresponds to a moment when the object referred to by d.id is being CARRIED.

source
TaskGraphs.isolate_delivery_task_vtxsFunction
isolate_delivery_task_vtxs(sched,o,vtxs=get_delivery_task_vtxs(sched,o))

Returns:

  • incoming: a set of all incoming Action ScheduleNodes
  • outgoing: a set of all outgoing Action ScheduleNodes
  • op: the target Operation
source
TaskGraphs.multi_goal_queue_priorityMethod
multi_goal_queue_priority(solver,env::MPCCBSEnv,id::BotID)

Compute the priority (determines the order in which paths will be computed) for the itinerary of robot id.

source
TaskGraphs.pctapf_problem_10Method
pctapf_problem_10(;cost_function=MakeSpan(),verbose=false,Δt_op=0,Δt_collect=[0,0,0,0,0,0],Δt_deposit=[0,0,0,0,0,0])

Motivation for backtracking in ISPS The makespan optimal solution is T = 6. However, the optimistic schedule will always prioritize robot 2 over robot 1, causing robot 1 to get stuck waiting for 3, 4, and 5 to pass all in a row. This creates an unavoidable delay in the schedule, leading to a +1 delay that will not be caught without backtracking in ISPS. Hence, the solver will return a solution with T = 7.

source
TaskGraphs.pctapf_problem_11Method
pctapf_problem_11

Requires collaborative transport: Robots 1 and 2 transport object 1 while robot 3 transports object 2. Robot 3 will need to move over to let the other robots pass.

source
TaskGraphs.pctapf_problem_12Method
pctapf_problem_12(;

Robot 1 will plan a path first, but then that path will need to be extended by one time step because robot 2 will get delayed by robot 3, which is on the critical path.

source
TaskGraphs.pctapf_problem_2Method
pctapf_problem_2(;cost_function=SumOfMakeSpans(),verbose=false)

In this problem robot 1 will first do [1-9-17], then [17-21-35] robot 2 will do [4-12-32]. The key thing is that robot 1 will need to wait until robot 2 is finished before robot 1 can do its second task.

Optimal paths: Optimal MakeSpan = 8 Optimal SumOfMakeSpans = 8

source
TaskGraphs.pctapf_problem_3Method
pctapf_problem_3(;cost_function=SumOfMakeSpans(),verbose=false,Δt_op=0,Δt_collect=[0,0,0,0],Δt_deposit=[0,0,0,0])

In this problem robot 2 will need to yield to let robot 1 through. First operation: robot 1 does [2-2-30] Second operation: robot 1 does [30-30-32] robot 2 does [5-7-8] Third operation: robot 2 does [8-12-16]

source
TaskGraphs.pctapf_problem_4Method
pctapf_problem_4(;cost_function=SumOfMakeSpans(),verbose=false)

In this problem the cost of the task assignment problem is lower than the true cost (which requires that one of the robots is delayed by a single time step) First operation: robot 1 does [2-2-8] robot 2 does [4-4-6]

source
TaskGraphs.pctapf_problem_5Method
pctapf_problem_5(;cost_function=SumOfMakeSpans(),verbose=false)

In this problem the robots try to pass through each other in such a way that an edge conflict is generated.

First operation: robot 1 does [3-11] robot 2 does [15-7]

source
TaskGraphs.pctapf_problem_6Method
pctapf_problem_6(;cost_function=SumOfMakeSpans(),verbose=false,Δt_op=1,Δt_collect=[0,0,0],Δt_deposit=[0,0,0])

Identical to pctapf_problem_2, but process time is non-zero. In this problem robot 1 will first do [1-5-9], then [9-13-17] robot 2 will do [4-8-32]. The key thing is that robot 1 will need to wait until robot 2 is finished before robot 1 can do its second task

source
TaskGraphs.pctapf_problem_7Method
pctapf_problem_7(;cost_function=SumOfMakeSpans(),verbose=false,Δt_op=0,Δt_collect=[0,4,0],Δt_deposit=[0,0,0])

Robot 2 will have to sit and wait at the pickup station, meaning that robot 1 will have to go around if robot 2 is on the critical path

source
TaskGraphs.pctapf_problem_8Method
pctapf_problem_8(;cost_function=SumOfMakeSpans(),verbose=false,Δt_op=0,Δt_collect=[0,0,0,0],Δt_deposit=[0,0,0,0])

Two-headed project. Robot 1 does the first half of the first head, and robot 2 handles the first half of the second head, and then they swap. Optimal MakeSpan = 8 Optimal SumOfMakeSpans = 16

source
TaskGraphs.pctapf_problem_9Method
pctapf_problem_9(;cost_function=SumOfMakeSpans(),verbose=false,Δt_op=0,Δt_collect=[0,0],Δt_deposit=[0,0])

Project with station-sharing. Station 5 needs to accessed by both robots for picking up their objects.

source
TaskGraphs.pctapf_problem_multi_backtrackMethod
pctapf_problem_multi_backtrack(;cost_function=MakeSpan(),verbose=false,Δt_op=0,Δt_collect=[0,0,0,0,0,0],Δt_deposit=[0,0,0,0,0,0])

Motivation for backtracking in ISPS The makespan optimal solution is T = 8, and requires that robots 2,3, and 4 allow robot 1 to pass before them. However, the slack-based priority schedme of ISPS will always prioritize robot 2, 3, and 4 over robot 1, causing robot 1 to get stuck waiting for 5, 6, and 7 to pass all in a row. Without backtracking, CBS+ISPS will eventually return a plan with makespan T = 9. With recursive backtracking (not just a single pass)

source
TaskGraphs.plan_path!Method
plan_path!

Computes next path specified by the project schedule and updates the
solution in the ConstraintTreeNode::node accordingly.
source
TaskGraphs.plan_route!Method
plan_route!

Compute a route plan that corresponds to the OperatingSchedule. Arguments:

  • solver
  • schedule
  • search_env

Outputs:

  • A SearchEnv the contains a valid solution
source
TaskGraphs.post_process_problem_typeMethod
post_process_problem_type(solver,prob)

An overridable helper function for potentially modifying prob based on solver. Default behavior is to return prob with no changes.

source
TaskGraphs.preprocess_project_scheduleMethod
preprocess_project_schedule(sched)

Returns information about the eligible and required successors and predecessors of nodes in sched

Arguments:

  • sched::OperatingSchedule

Outputs:

  • missing_successors
  • missing_predecessors
  • neligiblesuccessors
  • neligiblepredecessors
  • nrequiredsuccessors
  • nrequiredpredecessors
  • upstream_vertices
  • nonupstreamvertices

TODO: OBJECTAT nodes should always have the properties that `indegree(G,v) == nrequiredpredecessors(v) == neligiblepredecessors(v)outdegree(G,v) == nrequiredsuccessors(v) == neligible_successors(v)` Not sure if this is currently the case. UPDATE: I believe this has already been addressed by making each object come from an initial operation.

source
TaskGraphs.process_scheduleMethod
process_schedule(schedule::P) where {P<:OperatingSchedule}

Compute the optimistic start and end times, along with the slack associated with each vertex in the schedule. Slack for each vertex is represented as a vector in order to handle multi-headed projects.

Args:

  • schedule::OperatingSchedule
  • [OPTIONAL] t0::Vector{Int}: default = zeros(Int,nv(schedule))
  • [OPTIONAL] tF::Vector{Int}: default = zeros(Int,nv(schedule))
source
TaskGraphs.prune_scheduleMethod
prune_schedule(sched::OperatingSchedule,
    problem_spec::ProblemSpec,t)

remove nodes that don't need to be kept around any longer

source
TaskGraphs.random_pcmapf_defMethod
random_pcmapf_def(env,config;objective=MakeSpan(),solver,kwargs...)

Return a random SimplePCMAPFDef. Same arguments for config as in random_multihead_pctapf_def.

source
TaskGraphs.regenerate_path_specs!Method
regenerate_path_specs!(solver,env)

Recompute all paths specs (to account for changes in the env_graphs that will be propagated to the ProblemSpec's distance function as well.)

source
TaskGraphs.replace_in_schedule!Function
replace_in_schedule!(schedule::OperatingSchedule,path_spec::T,pred,id::ID) where {T<:PathSpec,ID<:AbstractID}

Replace the ScheduleNode associated with id with the new node pred, and the accompanying PathSpec path_spec.

source
TaskGraphs.replanning_problemMethod
replanning_problem

Constructs a replanning problem, consisting of robot initial conditions, an environment, and a sequence of project requests scheduled to arrive in the factory at regular intervals. Args:

  • r0: list of integers specifying the start locations of the robots

  • defs: a list of tuples, where each tuple is of the form

    ([start_1=>goal_1, ...], [([inputs],[outputs]),...])

    where the start=>goal pairs define the start and end points for each object to be delivered, and the ([inputs],[outputs]) pairs define the objects that go in and out of each operation.

  • env_graph: the environment (presumably a GridFactoryEnvironment)

Outputs:

  • requests: a sequence of ProjectRequests
  • problem_spec: a ProblemSpec
  • robotICs: Robot initial conditions `ROBOTAT`
  • env_graph: the environment
source
TaskGraphs.reset_cache!Method
`reset_cache!(cache,sched)`

Resets the cache so that a solution can be repaired (otherwise calling
low_level_search!() will return immediately because the cache says it's
complete)
source
TaskGraphs.resources_reservedMethod
resources_reserved(node)

Identifies the resources reserved by a particular node for its duration. For example, resources_reserved(node::COLLECT) = AbstractID[get_location_id(node)]

source
TaskGraphs.robot_tip_mapFunction
robot_tip_map(sched::OperatingSchedule)

Returns a Dict{RobotID,AbstractID} mapping RobotID to the terminal node of the sched corresponding to the robot's last assigned task.

source
TaskGraphs.select_trim_pointsFunction
select_trim_points(env,inconsistencies)

Choose locations at which to prune agent paths. Each path will be trimmed at the completion time of the latest consistent node in the agent's itinerary.

source
TaskGraphs.solve_assignment_problem!Method
solve_assignment_problem!(solver,model,prob)

Solve the "assignment problem"–i.e., the relaxation of the full PC-TAPF problem wherein we ignore collisions–using the algorithm encoded by solver.

source
TaskGraphs.split_nodeFunction
split_node(node::N,x::LocationID)

Creates two new nodes of type N, where the destination of the first node and the starting location of the second node are both set to x.

source
TaskGraphs.stitch_disjoint_node_sets!Method
stitch_disjoint_node_sets!(sched,incoming,outgoing)

Finds and adds the appropriate edges between two sets of nodes. It is assumed that size(incoming) == size(outgoing), that each node in incoming has exactly one feasible successor in outgoing, and that each node in outgoing has exactly one feasible predecessor in incoming.

source
TaskGraphs.tighten_gaps!Method
tighten_gaps!(solver, pc_mapf, env::SearchEnv, constraint_node::ConstraintTreeNode)

If any path ends before it should (based on times stored in get_cache(env)), recomputes the path segment for the final node in that line.

source
TaskGraphs.update_assignment_problem!Method
update_assignment_problem!(solver, assignment_problem)

A helper method for updating an instance of an assignment problem. In the case of MILP-based models, this method simply excludes all previous solutions by adding new constraints on the assignment/adjacency matrix.

source
TaskGraphs.update_planning_cache!Method
update_planning_cache!(solver,env)

Update cache continually. After a call to this function, the start and end times of all schedule nodes will be updated to reflect the progress of active schedule nodes (i.e., if a robot had not yet completed a GO task, the predicted final time for that task will be updated based on the robot's current state and distance to the goal). All active nodes that don't require planning will be automatically marked as complete.

source
TaskGraphs.update_project_schedule!Function
update_project_schedule!(solver,milp_model::M,sched,problem_spec,
    adj_matrix) where {M<:TaskGraphsMILP}

Args:

  • milp_model <: TaskGraphsMILP
  • sched::OperatingSchedule
  • problem_spec::ProblemSpec
  • adjmatrix : an adjacencymatrix or (in the case where milp_model::AssignmentMILP), an assignment matrix

Adds all required edges to the schedule graph and modifies all nodes to reflect the appropriate valid IDs (e.g., Action nodes are populated with the correct RobotIDs) Returns false if the new edges cause cycles in the project graph.

source
TaskGraphs.update_project_schedule!Method
update_project_schedule!

Args:

  • solver
  • sched
  • adjmatrix - adjacencymatrix encoding the edges that need to be added to the project schedule

Adds all required edges to the project graph and modifies all nodes to reflect the appropriate valid IDs (e.g., Action nodes are populated with the correct RobotIDs) Returns false if the new edges cause cycles in the project graph.

source
TaskGraphs.update_schedule_times!Method
update_schedule_times!(sched::OperatingSchedule,frontier::Set{Int},local_only=true)

Compute start and end times for all nodes in frontier and their descendants. If local_only == true, descendants of nodes with unchanged final time will not be updated.

source
TaskGraphs.update_schedule_times!Method
update_schedule_times!(sched::OperatingSchedule)

Compute start and end times for all nodes based on the end times of their inneighbors and their own durations.

source
TaskGraphs.warmupFunction
warmup(loader::TaskGraphsProblemLoader,solver_config,problem_dir,dummy_path = "dummy_path")

Do a small dry run of run_profiling(loader,solver_config,problem_dir) to ensure that all code is fully compiled before collecting results.

source
TaskGraphs.write_problemFunction
write_problem(loader::TaskGraphsProblemLoader,problem_def,prob_path,env_id="")

Write a problem that can later be loaded and solved.

source