d1
and d2
metres respectively,
separated by a given time interval, find the
optimal durations of the two dives.bestdoubledive(d1, d2, surface = 30, verbose = FALSE, model = "D", asdive=TRUE)
TRUE
, print lots of extra information,
and return extra information. If FALSE
(the default),
just return the optimal dive.pickmodel
, or
an object of class "hm"
(created by
TRUE
(the default),
the data for the optimal dive are converted into a dive object
(object of class "dive"
). If FALSE
, the data are
returned as a data frame.verbose=FALSE
and asdive=TRUE
)
the result is a dive object (object of class "dive"
).
Otherwise, the result is a data frame with
columns t1
and t2
containing the
dive durations in minutes, phi
containing the value of
$\Phi$, and case
specifying which of the cases
specified in Baddeley and Bassom (2012) provided the optimum.
If verbose=FALSE
this data frame has only one
row, giving the best double dive. If verbose=TRUE
then the
data frame has several rows giving the candidates for optimal dive
in each case of the algorithm. Consider a no-decompression dive to depth $d_1$ metres
for $t_1$ minutes, followed by a surface interval of $s$
minutes, followed by a no-decompression dive to depth $d_2$
for $t_2$ minutes.
The
pickmodel
,
hm
,
ndl
,
haldane
d <- bestdoubledive(40, 12, 15)
plot(d)
# Table 3 in Baddeley and Bassom (2012)
bestdoubledive(40, 12, 15, verbose=TRUE)
# Data for optimal dive
bestdoubledive(40, 12, 15, asdive=FALSE)
Run the code above in your browser using DataLab