Rhino Conservation: Poachers, Middlemen, Anti-Poaching Units, and
Traders Political-Ecological Model.
influence_diagram
   idname(poachers ph SA)
   idfile(poachers.id)

influence_diagram
   idname(middlemen mm SA)
   idfile(middlemen.id)

influence_diagram
   idname(anti-poach ap SA)
   idfile(anti-poach.id)

influence_diagram
   idname(rhinoeco re SA)
   idfile(rhinoeco.id)

context settings
   parameter_learning(false)
   ecosystem_nodes(1 Rhino_Abundance)
   initial_actions(1 middlemen sponsor_poaching_raid 1 poachers)
   region(1 Mpumalanga)
   optimization_options(true 2000 .001 .1 100 .4)

context files
   EMAT_files(emat.dfn parsedematacts.dat)
   groups_and_regions_files(rhinogroups.dat rhinoregions.dat)
   output_files(rhinopoleco.ps rhinopoleco.html rhinopoleco.est)
   observed_actions_history_file(rhino21-24.ahs)
   ecosystem_data_file(obsrhinos.dat)
   ecosystem_data_file(rhinodesrd.dat)
   node_output_file(le.plt)
   ecosystem_predictions_files(rhino_pred.plt rhino_risks.plt)
   MPEMP_constraints_file(mpempcnstrnts.dat)
   social_network_links_file(rhino_wts.dat)
   actionable_intelligence_report_file(rhino_intel.txt)

report evaluate
   id_interactions(2024. 2030. 1000)

report evaluate
   evaluate_social_network()

report estimate
   estimate_nodes(2021.0 2024.0 1 (poachers 1 SIIWP)
     .5 1000 false false true no_plots_only ecosystem_calculations
     no_jackknifecis)

report prepare_data
   generate_an_actions_history_file(newsapi21-24acts.dat
      rhino21-24.ahs false lowcheck)

report prepare_data
   parse_stories(true false /tscc/nfs/home/haas/polbio/stories/ 2 newsapi22.txt
      newsapi23.txt)

report estimate
   reconstruct_social_network(1 1000)

report estimate
   deduplicate_players()

report prepare_data
   rdbms(polecol sarhinogroups.dat sarhinorgns.dat parseddbex.txt
      select distinct v.storyid, v.senid, v.mwvrb, d.doph, v.action
      /* List all EMAT actions found in the parsed sentences of dbex.txt. */
      from (
         /* mwvrb subquery. */
         select subvs.storyid, subvs.senid, subv.mwvrb, action
         from (select * from mwvrb, ematvrbemat
            join emat on emat.ematid = ematvrbemat.ematid
            join ematvrb on ematvrb.vrbuid = ematvrbemat.vrbuid
            where mwvrb.mwvrb = ematvrb.ematvrb and
               (emat.action = 'sell_few_rhino_horns' or
                emat.action = 'seize_rhino_horn')) subv
         join (select sen.storyid, mwvrbsen.senid, mwvrb from mwvrbsen
            join mwvrb on mwvrb.senvrbid = mwvrbsen.senvrbid
            join sen on sen.senid = mwvrbsen.senid) subvs
         on subv.mwvrb = subvs.mwvrb) v
      join (
         /* doph subquery. */
         select subds.storyid, subds.senid, subd.doph, action
         from (select * from doph, ematdophemat
            join emat on emat.ematid = ematdophemat.ematid
            join ematdoph on ematdoph.dophuid = ematdophemat.dophuid
            where doph.doph = ematdoph.ematdoph) subd
         join (select sen.storyid, dophsen.senid, doph from dophsen
            join doph on doph.sendophid = dophsen.sendophid
            join sen on sen.senid = dophsen.senid) subds
         on subd.doph = subds.doph) d
      on v.storyid = d.storyid and v.senid = d.senid and v.action = d.action
      endquery
      build)

report prepare_data
   rdbms(polecol sarhinogroups.dat sarhinorgns.dat parsedactionsdbex.txt
      select distinct s.senid, v.mwvrb
      /* List all non-EMAT multi-word verbs.  Raw stories: actionsdbex.txt */
      from (select * from mwvrb, ematvrbemat
         join emat on emat.ematid = ematvrbemat.ematid
         join ematvrb on ematvrb.vrbuid = ematvrbemat.vrbuid
         where mwvrb.ematvrbid = 1) v
      join (select mwvrbsen.senid, mwvrb from mwvrbsen
         join mwvrb on mwvrb.senvrbid = mwvrbsen.senvrbid
         join sen on sen.senid = mwvrbsen.senid) s
      on v.mwvrb = s.mwvrb
      endquery
      build true)

report prepare_data
   rdbms(polecol sarhinogroups.dat sarhinorgns.dat parseddbex.txt
         select subds.storyid, subds.senid, subd.doph, action
         from (select * from doph, ematdophemat
            join emat on emat.ematid = ematdophemat.ematid
            join ematdoph on ematdoph.dophuid = ematdophemat.dophuid
            where doph.doph = ematdoph.ematdoph) subd
         join (select sen.storyid, dophsen.senid, doph from dophsen
            join doph on doph.sendophid = dophsen.sendophid
            join sen on sen.senid = dophsen.senid) subds
         on subd.doph = subds.doph
      endquery
      build true)

report display
   plot_actions_history(observations obsacts.ahs obshist.ps 2007.0 2016.0
      100. 16000.)

report prepare_data
   gis_tools(newreg.lgt 1 sdzsp8816.bip sdzsp101016.bip)

report prepare_data
   find_product_themes(ginseng1.dat)

report prepare_data
   gis_tools(newreg.lgt 4
      multired.bip multigreen.bip multiblue.bip multinir1.bip
      multired.bip multigreen.bip multiblue.bip multinir1.bip)

report display
   plot_actions_history(model mpemp.ahs mpemppred.ps 2015.0 2021.0 100. 15000.)

report sensitivity_analysis
   assess_nodes(2014.0 2045.0 1 (rhinoeco 1 RhinoIBM))

report prepare_data
   compute_risks(sqabund.plt risk.plt)

report estimate
   estimate_nodes(1998.0 2012.1 1 (rhinoeco 1 RhinoIBM) .01
      false false true plots_only ecosystem_calculations)

report estimate
   prediction_skill(2007. 2009. 1 (ecosys 1 ChthNS) .01)
