A mathematical model specifically for diabetes may be generated which may
be continuous in time, in that there are no discrete time steps, and any
event can occur at any times. The model may be generated using
differential equations, object oriented programming, and features. The
model may be used to simulate patients who have contracted or may
contract type 1 or type 2 diabetes, which greatly improves the efficiency
of treating patients and designing clinical trials.