[OCaml] High Intensity Training Online
1
(** Interprets recorded training against Heavy Duty rules. *)
2
3
type assessment = Progressing | Stalled
4
type error = Insufficient_data
5
6
exception Invalid of error
7
8
val pp_assessment : Format.formatter -> assessment -> unit
9
val pp_error : Format.formatter -> error -> unit
10
11
val stall_window : Recovery.duration
12
(** 14 days. *)
13
14
val assess : Evidence.Log.observation list -> assessment
15
(** Raises [Invalid Insufficient_data] when the record cannot support a
16
judgment. *)
17
18
type remedy =
19
| Lay_off_then_reduce of {
20
lay_off : Recovery.duration;
21
drop_stimuli_per_workout : int;
22
extra_rest : Recovery.duration;
23
}
24
25
val remedy : assessment -> remedy option
26
(** [Some] only for [Stalled]; it never adds work. *)
27
28
val pp_remedy : Format.formatter -> remedy -> unit
29
30
val load_increase_trigger : int
31
(** 12 reps, regardless of the prescribed range. *)
32
33
val load_increase : current:float -> float * float
34
(** 10-20% increase window. *)
35
36
type load_verdict = Hold | Increase of float * float | Too_heavy
37
38
val judge_load :
39
rep_range:Prescription.Rep_range.t ->
40
Evidence.Stimulus.Effort.t ->
41
load_verdict
42
(** Only the range floor matters: below it is [Too_heavy]; at twelve reps the
43
verdict is [Increase]. *)
44
45
val pp_load_verdict : Format.formatter -> load_verdict -> unit
46
47
(** Counts recorded workouts that show each overtraining risk. *)
48
type diagnostic =
49
| Excess_volume of int
50
| Extensions_on_every_stimulus of int
51
| Trained_under_recovered of int
52
53
val diagnose : Evidence.Log.t -> diagnostic list
54
val pp_diagnostic : Format.formatter -> diagnostic -> unit
55