sisl / TaskGraphs.jl

Precedence constrained multi-agent task assignment and path finding
https://sisl.github.io/TaskGraphs.jl/latest/
MIT License
10 stars 4 forks source link

Running Problem #19

Closed liushuown closed 1 year ago

liushuown commented 1 year ago

When I execute the command "julia>prob=pctapf_problem_1 (solver)" according to readme, the following error is reported. How do I solve it?

julia> prob = pctapf_problem_1(solver) ERROR: MethodError: no method matching add_vertex!(::MetaGraphs.MetaGraph{Int64, Float64}) Closest candidates are: add_vertex!(::LightGraphs.SimpleGraphs.SimpleDiGraph{T}) where T at ~/.julia/packages/LightGraphs/IgJif/src/SimpleGraphs/simpledigraph.jl:449 add_vertex!(::LightGraphs.SimpleGraphs.SimpleGraph{T}) where T at ~/.julia/packages/LightGraphs/IgJif/src/SimpleGraphs/simplegraph.jl:526 add_vertex!(::TaskGraphs.GadgetGraph) at ~/.julia/packages/TaskGraphs/WgfwB/src/milp_formulation.jl:35 ... Stacktrace: [1] initialize_grid_graph_from_vtx_grid(K::VtxGrid{Matrix{Int64}}) @ GraphUtils ~/.julia/packages/GraphUtils/5fQK8/src/construction.jl:176 [2] construct_factory_env_from_vtx_grid(vtx_grid::VtxGrid{Matrix{Int64}}; cell_width::Float64, transition_time::Float64, pickup_zones::Vector{Int64}, dropoff_zones::Vector{Int64}) @ GraphUtils ~/.julia/packages/GraphUtils/5fQK8/src/factory_worlds.jl:772 [3] construct_factory_env_from_vtx_grid(vtx_grid::VtxGrid{Matrix{Int64}}) @ GraphUtils ~/.julia/packages/GraphUtils/5fQK8/src/factory_worlds.jl:764 [4] pctapf_problem_1(; cost_function::SumOfMakeSpans, verbose::Bool, Δt_op::Int64, Δt_collect::Vector{Int64}, Δt_deposit::Vector{Int64}) @ TaskGraphs ~/.julia/packages/TaskGraphs/WgfwB/src/helpers/problem_instances.jl:145 [5] pctapf_problem_1() @ TaskGraphs ~/.julia/packages/TaskGraphs/WgfwB/src/helpers/problem_instances.jl:134 [6] pctapf_problem_1(::NBSSolver{TaskGraphsMILPSolver{SparseAdjacencyMILP, Int64}, CBSSolver{ISPS{AStarSC{NTuple{5, Float64}}, NTuple{5, Float64}}, NTuple{5, Float64}}, Float64}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}) @ TaskGraphs ~/.julia/packages/TaskGraphs/WgfwB/src/helpers/problem_instances.jl:686 [7] pctapf_problem_1(::NBSSolver{TaskGraphsMILPSolver{SparseAdjacencyMILP, Int64}, CBSSolver{ISPS{AStarSC{NTuple{5, Float64}}, NTuple{5, Float64}}, NTuple{5, Float64}}, Float64}) @ TaskGraphs ~/.julia/packages/TaskGraphs/WgfwB/src/helpers/problem_instances.jl:686 [8] top-level scope @ REPL[7]:1

mykelk commented 1 year ago

This could be due to the move from LightGraphs.jl to Graphs.jl. There is a new student who will be looking at updating this package. Sorry for the delay in responding.

liushuown commented 1 year ago

I remove LightGraphs.jl, and then run with the command "using TaskGraphs", the error is as follows :

Info: Precompiling TaskGraphs [6635cb54-791c-11e9-2805-8512ad3937f9] ERROR: LoadError: ArgumentError: Package TaskGraphs does not have LightGraphs in its dependencies:

It seems "LightGraphs.jl" is necessary.

felixmg312 commented 1 year ago

Hi liushown, Would you mind trying to run the code again to see if it works now? Thanks!

liushuown commented 1 year ago

I truly appreciate your help in resolving this problem! I have successfully run the pctapf_demo! Thanks again for all you assistance!