# Cannot determine the order of dual tag for Differentiable-trebuchet-Zygote

**URL:** <https://discourse.julialang.org/t/cannot-determine-the-order-of-dual-tag-for-differentiable-trebuchet-zygote/101644>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [July 15, 2023, 3:05am UTC](https://discourse.julialang.org/t/cannot-determine-the-order-of-dual-tag-for-differentiable-trebuchet-zygote/101644 "2023-07-15T03:05:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jslin](https://avatars.discourse-cdn.com/v4/letter/j/22d042/32.png) [@jslin](https://discourse.julialang.org/u/jslin)\
**Post date:** [July 15, 2023, 3:05am UTC](https://discourse.julialang.org/t/cannot-determine-the-order-of-dual-tag-for-differentiable-trebuchet-zygote/101644/1 "2023-07-15T03:05:18Z")

</div>

# I am trying to run the tutorial code from 2019 of Differentiable-trebuchet, but got error in trying to find the gradient with ForwardDiff ([https://github.com/JuliaComputing/ODSC2019/blob/master/03-Differentiable-trebuchet-Zygote](https://github.com/JuliaComputing/ODSC2019/blob/master/03-Differentiable-trebuchet-Zygote))

using Flux, Trebuchet  
using Zygote: gradient, forwarddiff

## t = TrebuchetState() simulate(t) visualise(t) function shoot(wind, angle, weight) Trebuchet.shoot((wind, Trebuchet.deg2rad(angle), weight))[2] end shoot(ps) = forwarddiff(p → shoot(p…), ps) gradient(shoot, [0, 45, 200])

## Error:

Cannot determine ordering of Dual tags ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, ForwardDiff.Dual{Nothing, Float64, 3}} and Nothing

This code, being published in 2019, my have been updated but I could not find it. Any help is much appreciated.

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [July 15, 2023, 12:02pm UTC](https://discourse.julialang.org/t/cannot-determine-the-order-of-dual-tag-for-differentiable-trebuchet-zygote/101644/2 "2023-07-15T12:02:59Z")

</div>

The updated code is here:

> **[GitHub - FluxML/Trebuchet.jl: throw stuff](https://github.com/FluxML/Trebuchet.jl)**
>
> throw stuff. Contribute to FluxML/Trebuchet.jl development by creating an account on GitHub.

I’m unsure if that still runs but it at least got an update.

---

<div class="post-metadata">

**Author:** ![jslin](https://avatars.discourse-cdn.com/v4/letter/j/22d042/32.png) [@jslin](https://discourse.julialang.org/u/jslin)\
**Post date:** [July 16, 2023, 1:25am UTC](https://discourse.julialang.org/t/cannot-determine-the-order-of-dual-tag-for-differentiable-trebuchet-zygote/101644/3 "2023-07-16T01:25:59Z")

</div>

Thanks for the reply. But the example I am looking at is in the differentiable programming, not the forward modeling.
