GetLive1 + internal->dim_IMVNotGetLive2 + internal->dim_IMVNotGetDie1 + internal->dim_IMVNotGetDie2 + internal->dim_IRec1 + internal->dim_IRec2 + internal->dim_R1 + internal->dim_R2 + internal->dim_D + internal->dim_cum_infs + internal->dim_D_get + internal->dim_D_not_get));
  double * state = REAL(r_state);
  memcpy(state + 0, internal->initial_S, internal->dim_S * sizeof(double));
  memcpy(state + internal->dim_S, internal->initial_E1, internal->dim_E1 * sizeof(double));
  memcpy(state + internal->offset_variable_E2, internal->initial_E2, internal->dim_E2 * sizeof(double));
  memcpy(state + internal->offset_variable_IMild, internal->initial_IMild, internal->dim_IMild * sizeof(double));
  memcpy(state + internal->offset_variable_ICase1, internal->initial_ICase1, internal->dim_ICase1 * sizeof(double));
  memcpy(state + internal->offset_variable_ICase2, internal->initial_ICase2, internal->dim_ICase2 * sizeof(double));
  memcpy(state + internal->offset_variable_cum_hosp_inc, internal->initial_cum_hosp_inc, internal->dim_cum_hosp_inc * sizeof(double));
  memcpy(state + internal->offset_variable_cum_ICU_inc, internal->initial_cum_ICU_inc, internal->dim_cum_ICU_inc * sizeof(double));
  memcpy(state + internal->offset_variable_IOxGetLive1, internal->initial_IOxGetLive1, internal->dim_IOxGetLive1 * sizeof(double));
  memcpy(state + internal->offset_variable_IOxGetLive2, internal->initial_IOxGetLive2, internal->dim_IOxGetLive2 * sizeof(double));
  memcpy(state + internal->offset_variable_IOxGetDie1, internal->initial_IOxGetDie1, internal->dim_IOxGetDie1 * sizeof(double));
  memcpy(state + internal->offset_variable_IOxGetDie2, internal->initial_IOxGetDie2, internal->dim_IOxGetDie2 * sizeof(double));
  memcpy(state + internal->offset_variable_IOxNotGetLive1, internal->initial_IOxNotGetLive1, internal->dim_IOxNotGetLive1 * sizeof(double));
  memcpy(state + internal->offset_variable_IOxNotGetLive2, internal->initial_IOxNotGetLive2, internal->dim_IOxNotGetLive2 * sizeof(double));
  memcpy(state + internal->offset_variable_IOxNotGetDie1, internal->initial_IOxNotGetDie1, internal->dim_IOxNotGetDie1 * sizeof(double));
  memcpy(state + internal->offset_variable_IOxNotGetDie2, internal->initial_IOxNotGetDie2, internal->dim_IOxNotGetDie2 * sizeof(double));
  memcpy(state + internal->offset_variable_IMVGetLive1, internal->initial_IMVGetLive1, internal->dim_IMVGetLive1 * sizeof(double));
  memcpy(state + internal->offset_variable_IMVGetLive2, internal->initial_IMVGetLive2, internal->dim_IMVGetLive2 * sizeof(double));
  memcpy(state + internal->offset_variable_IMVGetDie1, internal->initial_IMVGetDie1, internal->dim_IMVGetDie1 * sizeof(double));
  memcpy(state + internal->offset_variable_IMVGetDie2, internal->initial_IMVGetDie2, internal->dim_IMVGetDie2 * sizeof(double));
  memcpy(state + internal->offset_variable_IMVNotGetLive1, internal->initial_IMVNotGetLive1, internal->dim_IMVNotGetLive1 * sizeof(double));
  memcpy(state + internal->offset_variable_IMVNotGetLive2, internal->initial_IMVNotGetLive2, internal->dim_IMVNotGetLive2 * sizeof(double));
  memcpy(state + internal->offset_variable_IMVNotGetDie1, internal->initial_IMVNotGetDie1, internal->dim_IMVNotGetDie1 * sizeof(double));
  memcpy(state + internal->offset_variable_IMVNotGetDie2, internal->initial_IMVNotGetDie2, internal->dim_IMVNotGetDie2 * sizeof(double));
  memcpy(state + internal->offset_variable_IRec1, internal->initial_IRec1, internal->dim_IRec1 * sizeof(double));
  memcpy(state + internal->offset_variable_IRec2, internal->initial_IRec2, internal->dim_IRec2 * sizeof(double));
  memcpy(state + internal->offset_variable_R1, internal->initial_R1, internal->dim_R1 * sizeof(double));
  memcpy(state + internal->offset_variable_R2, internal->initial_R2, internal->dim_R2 * sizeof(double));
  memcpy(state + internal->offset_variable_D, internal->initial_D, internal->dim_D * sizeof(double));
  memcpy(state + internal->offset_variable_cum_infs, internal->initial_cum_infs, internal->dim_cum_infs * sizeof(double));
  memcpy(state + internal->offset_variable_D_get, internal->initial_D_get, internal->dim_D_get * sizeof(double));
  memcpy(state + internal->offset_variable_D_not_get, internal->initial_D_not_get, internal->dim_D_not_get * sizeof(double));
  UNPROTECT(1);
  return r_state;
}
void explicit_SEIR_deterministic_rhs(explicit_SEIR_deterministic_internal* internal, double t, double * state, double * dstatedt, double * output) {
  double * S = state + 0;
  double * E1 = state + internal->dim_S;
  double * E2 = state + internal->offset_variable_E2;
  double * IMild = state + internal->offset_variable_IMild;
  double * ICase1 = state + internal->offset_variable_ICase1;
  double * ICase2 = state + internal->offset_variable_ICase2;
  double * IMVGetLive1 = state + internal->offset_variable_IMVGetLive1;
  double * IMVGetLive2 = state + internal->offset_variable_IMVGetLive2;
  double * IMVGetDie1 = state + internal->offset_variable_IMVGetDie1;
  double * IMVGetDie2 = state + internal->offset_variable_IMVGetDie2;
  double * IMVNotGetLive1 = state + internal->offset_variable_IMVNotGetLive1;
  double * IMVNotGetLive2 = state + internal->offset_variable_IMVNotGetLive2;
  double * IMVNotGetDie1 = state + internal->offset_variable_IMVNotGetDie1;
  double * IMVNotGetDie2 = state + internal->offset_variable_IMVNotGetDie2;
  double * IRec1 = state + internal->offset_variable_IRec1;
  double * IRec2 = state + internal->offset_variable_IRec2;
  double * IOxGetLive1 = state + internal->offset_variable_IOxGetLive1;
  double * IOxGetLive2 = state + internal->offset_variable_IOxGetLive2;
  double * IOxGetDie1 = state + internal->offset_variable_IOxGetDie1;
  double * IOxGetDie2 = state + internal->offset_variable_IOxGetDie2;
  double * IOxNotGetLive1 = state + internal->offset_variable_IOxNotGetLive1;
  double * IOxNotGetLive2 = state + internal->offset_variable_IOxNotGetLive2;
  double * IOxNotGetDie1 = state + internal->offset_variable_IOxNotGetDie1;
  double * IOxNotGetDie2 = state + internal->offset_variable_IOxNotGetDie2;
  double * R1 = state + internal->offset_variable_R1;
  double * R2 = state + internal->offset_variable_R2;
  double hosp_occ = odin_sum1(IOxGetLive1, 0, internal->dim_IOxGetLive1) + odin_sum1