Debug this simulation in Julia:
@with_kw mutable struct BikeTrip
    origin::Int
    destination::Int
    trip_time::Int
end


@with_kw mutable struct BikeSimulation
    bike_stations::Array{Int, 1}
    station_capacity::Int
    trip_distributions::Array{Array{Int, 2}, 1}
    event_queue::PriorityQueue{Function, Tuple{Int, Int}} = PriorityQueue{Function, Tuple{Int, Int}}()
    log::DataFrame = DataFrame()
end


event_id = 1

function start_trip!(sim::BikeSimulation, time_origin::Tuple{Int, Int})
    global event_id
    time, origin = time_origin
    trip_distribution = sim.trip_distributions[origin]
    destination = sample(trip_distribution[:, 2], Weights(trip_distribution[:, 1]))
    trip_time = sample(trip_distribution[:, 3], Weights(trip_distribution[:, 1]))
    sim.bike_stations[origin] -= 1
    enqueue!(sim.event_queue, time + trip_time, (end_trip!, time + trip_time, destination))
    event_id += 1
end

function end_trip!(sim::BikeSimulation, time_destination::Tuple{Int, Int})
    time, destination = time_destination
    sim.bike_stations[destination] += 1
    if sim.bike_stations[destination] < sim.station_capacity
        start_trip!(sim, (time, destination))
    end
end


function run_simulation!(sim::BikeSimulation, num_bikes::Int)
    for station in 1:length(sim.bike_stations)
        for _ in 1:min(num_bikes, sim.station_capacity)
            start_trip!(sim, (0, station))
        end
    end

    while !isempty(sim.event_queue)
        time, event = dequeue!(sim.event_queue)
        event(sim, (time, event[2]))
        append!(sim.log, DataFrame(time=time, station=event[2], event=string(event[1]), bike_status=sim.bike_stations))
    end
end


trip_distributions = [
    [1 2 10; 2 3 1; 3 4 2; 4 5 4; 5 1 3],
    [1 3 5; 2 4 6; 3 5 9; 4 1 2; 5 2 3],
    [1 4 4; 2 5 7; 3 1 8; 4 2 12; 5 3 9],
    [1 5 9; 2 1 3; 3 2 4; 4 3 8; 5 4 6],
    [1 1 6; 2 2 4; 3 3 6; 4 4 7; 5 5 7]
]

bike_simulation = BikeSimulation(bike_stations=[20, 20, 20, 20, 20], station_capacity=10, trip_distributions=trip_distributions)


run_simulation!(bike_simulation, 10)


println(bike_simulation.log)

Current issue is:
MethodError: Cannot `convert` an object of type Int64 to an object of type Function
Closest candidates are:
  convert(::Type{T}, ::T) where T at Base.jl:61

Stacktrace:
 [1] Pair
   @ .\Base.jl:107 [inlined]
 [2] enqueue!(pq::PriorityQueue{Function, Tuple{Int64, Int64}, Base.Order.ForwardOrdering}, kv::Pair{Int64, Tuple{typeof(end_trip!), Int64, Int64}})
   @ DataStructures C:\Users\Michał\.julia\packages\DataStructures\59MD0\src\priorityqueue.jl:247
 [3] enqueue!(pq::PriorityQueue{Function, Tuple{Int64, Int64}, Base.Order.ForwardOrdering}, key::Int64, value::Tuple{typeof(end_trip!), Int64, Int64})
   @ DataStructures C:\Users\Michał\.julia\packages\DataStructures\59MD0\src\priorityqueue.jl:246
 [4] start_trip!(sim::BikeSimulation, time_origin::Tuple{Int64, Int64})
   @ Main .\In[2]:27
 [5] run_simulation!(sim::BikeSimulation, num_bikes::Int64)
   @ Main .\In[2]:43
 [6] top-level scope
   @ In[2]:66
 [7] eval
   @ .\boot.jl:368 [inlined]
 [8] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
   @ Base .\loading.jl:1428


Please think about any other potential issues.