Skip to content

Dead model variants and functions #11

Open

Description

@rishigraham

Twelve alternate C++ simulators and the R files that call only them are compiled and installed but unreachable from calibration, projection or the ResilientSims wrapper.

C++ variants and their only callers

  • basic_tb_model.cpp, tb_model_eRblnc.cpp, tb_model_flow.cpp: no callers
  • demo_ag.cpp, demo_agna.cpp: R/calib_demo.R, R/IMIS_demo.R, R/calib_demo_agna.R
  • demographic_model.cpp, tb_model_aging.cpp: R/func_IMIS_noTB.R, R/func_IMIS_noTB_rblnc.R
  • tb_model_rblnc.cpp: R/calib_rblnc.R, R/func_IMIS_rblnc.R
  • national_cSim.cpp: R/national_process_sims.R
  • new_cSim.cpp: R/graph_TB_trends.R
  • new2_cSim.cpp: R/process_simulations_temp.R, R/process_simulations_temp2.R, R/param_initial_temp2.R
  • f1, f2, dist_orig_func, reshaping, temp_intv: nothing exported or fully commented out

R functions that call cSim with its removed nYrs/nRes arguments and have no live caller

  • R/adj2020.R llikelihood2020
  • R/calib.R calib_2020, called only from R/data_formatoptims.R calib_plots_locs_2020
  • R/calib_graphs_state_summary.R calib_graphs_st_summary
  • R/calib_imisprocessing.R pred_al_res
  • R/calib_noRB.R, R/IMIS_noRB.R
  • R/model_run.R run_model
  • R/process_simulations_basic.R simp_OutputsZint

Likelihood functions llikelihoodZ_st never calls

  • notif_fb_lLik_st, notif_fb_5yr_lLik_st, tbdeaths_decline_lLik_st, tot_pop_yr_us_lLik_st_00_10, tot_pop19_ag_fb_lLik_st, mort_dist_lLik_norm_st, ltbi_us_11_dp_lLik_st, ltbi_fb_11_dp_lLik_st
  • three are still called from R/IMIS_noRB.R and R/func_IMIS_noTB*.R

Costs

  • about 3 minutes of every source install compiles code nothing runs
  • R CMD byte-compile reports "possible error" notes for the stale cSim calls

The tabby2 branch already deletes these C++ files.

Fix on branch model-fixes.

Line numbers refer to branch rsims-wrapper at 209120a, as of 2026-11-03.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions