Ejemplo n.º 1
0
    m->outputs = g_ptr_array_sized_new (6);
    m->model_data = local_data;
    m->run = run;
    m->reset = reset;
    m->is_listening_for = is_listening_for;
    m->has_pending_actions = has_pending_actions;
    m->has_pending_infections = has_pending_infections;
    m->to_string = to_string;
    m->printf = local_printf;
    m->fprintf = local_fprintf;
    m->free = local_free;

    /* Make sure the right XML subtree was sent. */
    g_assert (strcmp (scew_element_name (params), MODEL_NAME) == 0);

    local_data->detections = RPT_new_reporting ("detections", NULL, RPT_text, RPT_never, FALSE);
    local_data->day_1st_detection =
        RPT_new_reporting ("time-to-first-detection", NULL, RPT_integer, RPT_never, TRUE);
    local_data->nherds_detected =
        RPT_new_reporting ("num-units-detected", NULL, RPT_integer, RPT_never, FALSE);
    local_data->nherds_detected_by_prodtype =
        RPT_new_reporting ("num-units-detected-by-production-type", NULL, RPT_group, RPT_never, FALSE);
    local_data->cumul_nherds_detected =
        RPT_new_reporting ("cumulative-num-units-detected", NULL, RPT_integer, RPT_never, TRUE);
    local_data->cumul_nherds_detected_by_prodtype =
        RPT_new_reporting ("cumulative-num-units-detected-by-production-type", NULL, RPT_group,
                           RPT_never, TRUE);
    g_ptr_array_add (m->outputs, local_data->detections);
    g_ptr_array_add (m->outputs, local_data->day_1st_detection);
    g_ptr_array_add (m->outputs, local_data->nherds_detected);
    g_ptr_array_add (m->outputs, local_data->nherds_detected_by_prodtype);
Ejemplo n.º 2
0
    self->outputs = g_ptr_array_sized_new (5);
    self->model_data = local_data;
    self->run = run;
    self->reset = reset;
    self->is_listening_for = is_listening_for;
    self->has_pending_actions = has_pending_actions;
    self->has_pending_infections = has_pending_infections;
    self->to_string = to_string;
    self->printf = local_printf;
    self->fprintf = local_fprintf;
    self->free = local_free;

    /* Make sure the right XML subtree was sent. */
    g_assert (strcmp (scew_element_name (params), MODEL_NAME) == 0);

    local_data->shape = RPT_new_reporting ("zone-shape", NULL, RPT_group, RPT_never, TRUE);
    local_data->area = RPT_new_reporting ("zone-area", NULL, RPT_group, RPT_never, TRUE);
    local_data->num_separate_areas =
        RPT_new_reporting ("num-separate-areas", NULL, RPT_group, RPT_never, TRUE);
    local_data->num_units = RPT_new_reporting ("num-units-in-zone", NULL, RPT_group, RPT_never, TRUE);
    local_data->num_animal_days_by_prodtype =
        RPT_new_reporting ("num-animal-days-in-zone-by-production-type", NULL, RPT_group, RPT_never,
                           TRUE);
    g_ptr_array_add (self->outputs, local_data->shape);
    g_ptr_array_add (self->outputs, local_data->area);
    g_ptr_array_add (self->outputs, local_data->num_separate_areas);
    g_ptr_array_add (self->outputs, local_data->num_units);
    g_ptr_array_add (self->outputs, local_data->num_animal_days_by_prodtype);

    /* Set the reporting frequency for the output variables. */
    ee = scew_element_list (params, "output", &noutputs);
Ejemplo n.º 3
0
  m->model_data = local_data;
  m->run = run;
  m->reset = reset;
  m->is_listening_for = is_listening_for;
  m->has_pending_actions = has_pending_actions;
  m->has_pending_infections = has_pending_infections;
  m->to_string = to_string;
  m->printf = local_printf;
  m->fprintf = local_fprintf;
  m->free = local_free;

  /* Make sure the right XML subtree was sent. */
  g_assert (strcmp (scew_element_name (params), MODEL_NAME) == 0);

  local_data->nherds_awaiting_vaccination =
    RPT_new_reporting ("num-units-awaiting-vaccination", NULL, RPT_integer, RPT_never, TRUE);
  local_data->nherds_awaiting_vaccination_by_prodtype =
    RPT_new_reporting ("num-units-awaiting-vaccination-by-production-type", NULL, RPT_group,
                       RPT_never, TRUE);
  local_data->nanimals_awaiting_vaccination =
    RPT_new_reporting ("num-animals-awaiting-vaccination", NULL, RPT_integer, RPT_never, TRUE);
  local_data->nanimals_awaiting_vaccination_by_prodtype =
    RPT_new_reporting ("num-animals-awaiting-vaccination-by-production-type", NULL, RPT_group,
                       RPT_never, TRUE);
  local_data->peak_nherds_awaiting_vaccination =
    RPT_new_reporting ("peak-num-units-awaiting-vaccination", NULL, RPT_integer, RPT_never, TRUE);
  local_data->peak_nanimals_awaiting_vaccination =
    RPT_new_reporting ("peak-num-animals-awaiting-vaccination", NULL, RPT_integer, RPT_never, TRUE);
  /* The name of these variables changed from "peak-wait-time" and "average-
   * wait-time" to "peak-vaccination-wait-time" and "average-vaccination-wait-
   * time", so that they're distinguishable from the similarly-named outputs in
Ejemplo n.º 4
0
  m->outputs = g_ptr_array_new ();
  m->model_data = local_data;
  m->run = run;
  m->reset = reset;
  m->is_listening_for = is_listening_for;
  m->has_pending_actions = has_pending_actions;
  m->has_pending_infections = has_pending_infections;
  m->to_string = to_string;
  m->printf = local_printf;
  m->fprintf = local_fprintf;
  m->free = local_free;

  /* Make sure the right XML subtree was sent. */
  g_assert (strcmp (scew_element_name (params), MODEL_NAME) == 0);

  local_data->exposures = RPT_new_reporting ("exposures", RPT_group, RPT_never);
  local_data->num_units_exposed =
    RPT_new_reporting ("expnUAll", RPT_integer, RPT_never);
  local_data->num_units_exposed_by_cause =
    RPT_new_reporting ("expnU", RPT_group, RPT_never);
  local_data->num_units_exposed_by_prodtype =
    RPT_new_reporting ("expnU", RPT_group, RPT_never);
  local_data->num_units_exposed_by_cause_and_prodtype =
    RPT_new_reporting ("expnU", RPT_group, RPT_never);
  local_data->cumul_num_units_exposed =
    RPT_new_reporting ("expcUAll", RPT_integer, RPT_never);
  local_data->cumul_num_units_exposed_by_cause =
    RPT_new_reporting ("expcU", RPT_group, RPT_never);
  local_data->cumul_num_units_exposed_by_prodtype =
    RPT_new_reporting ("expcU", RPT_group, RPT_never);
  local_data->cumul_num_units_exposed_by_cause_and_prodtype =