Skip to content

Commit

Permalink
Use OrderedDict
Browse files Browse the repository at this point in the history
  • Loading branch information
bkraske committed Oct 25, 2023
1 parent 712b03e commit b2bf430
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ version = "0.3.6"
BasicPOMCP = "d721219e-3fc6-5570-a8ef-e5402f47c49e"
CPUTime = "a9c8d775-2e2e-55fc-8582-045d282d599e"
D3Trees = "e3df1716-f71e-5df9-9e2d-98e193103c45"
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
POMDPTools = "7588e00f-9cae-40de-98dc-e0c70c48cdd7"
POMDPs = "a93abf59-7444-517b-a68a-c42f96afdd7d"
Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a"
Expand All @@ -18,10 +19,10 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
BasicPOMCP = "0.3"
CPUTime = "1"
D3Trees = "0.3"
POMDPTools = "0.1"
POMDPs = "0.9"
Parameters = "0.12"
ParticleFilters = "0.4, 0.5"
POMDPTools = "0.1"
julia = "1"

[extras]
Expand Down
1 change: 1 addition & 0 deletions src/ARDESPOT.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ using D3Trees
using Random
using Printf
using POMDPTools
using OrderedCollections

using BasicPOMCP # for ExceptionRethrow and NoDecision
import BasicPOMCP.default_action
Expand Down
2 changes: 1 addition & 1 deletion src/default_policy_sim.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function branching_sim(pomdp::POMDP, policy::Policy, b::ScenarioBelief, steps::Integer, fval)
S = statetype(pomdp)
O = obstype(pomdp)
odict = Dict{O, Vector{Pair{Int, S}}}()
odict = OrderedDict{O, Vector{Pair{Int, S}}}()

if steps <= 0
return length(b.scenarios)*fval(pomdp, b)
Expand Down
2 changes: 1 addition & 1 deletion src/tree.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function expand!(D::DESPOT, b::Int, p::DESPOTPlanner)
S = statetype(p.pomdp)
A = actiontype(p.pomdp)
O = obstype(p.pomdp)
odict = Dict{O, Int}()
odict = OrderedDict{O, Int}()

belief = get_belief(D, b, p.rs)
for a in actions(p.pomdp, belief)
Expand Down
1 change: 0 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ using Test

using POMDPs
using POMDPModels
using POMDPSimulators
using Random
using POMDPTools
using ParticleFilters
Expand Down

0 comments on commit b2bf430

Please sign in to comment.