creativity  v1.3.0
Agent-based model of creativity and piracy
Results.hpp
1 #pragma once
2 #include "creativity/cmdargs/CmdArgs.hpp"
3 #include "creativity/data/tabulate.hpp"
4 #include "creativity/Policy.hpp"
5 #include <eris/types.hpp>
6 #include <limits>
7 #include <string>
8 #include <vector>
9 
10 namespace boost { namespace program_options { class variables_map; } }
11 
12 namespace creativity { namespace cmdargs {
13 
15 class Results : public CmdArgs {
16  public:
18  struct {
20  data::TableFormat type = data::TableFormat::Text;
21 
23  bool text = false;
25  bool html = false;
27  bool latex = false;
28 
30  unsigned int precision = 5;
31  } format;
32 
34  struct {
36  bool summary = false;
38  bool write_or_not = false;
40  bool write_or_not_corrcov = false;
42  bool average = false;
44  bool marginal = false;
49  bool all = false;
51  bool none = false;
52 
56  bool initial = false;
57 
59  bool pre = false;
60 
62  bool shortrun = false;
63 
65  bool policy_filter = false;
70  } analysis;
71 
76  bool condensed = false;
77 
79  std::string latex_variables = "";
80 
82  bool no_headings = false;
83 
85  struct {
86  std::string filename;
87 
88  //std::string dump_writing; ///< CSV output of "writing" data
89  //std::string dump_nowriting; ///< CSV output of "nowriting" data
90 
91  bool overwrite = false;
92 
93  bool no_preamble = false;
94 
95  bool list_filtered_write = false;
96  bool list_filtered_nowrite = false;
97  } output;
98 
99 
101  std::string input;
102 
104  virtual std::string usage() const override;
105 
107  virtual std::string help() const override;
108 
110  virtual std::string versionSuffix() const override;
111 
112  protected:
114  virtual void addOptions() override;
115 
117  virtual void postParse(boost::program_options::variables_map &vars) override;
118 
119 
121  std::string policy_str_ = "any";
122 };
123 
124 }}
TableFormat
Enum for supported table output formats.
Definition: tabulate.hpp:10
This class handles command line argument parsing.
Definition: CmdArgs.hpp:31
CmdArgs subclass for creativity-results script to run models on generated data.
Definition: Results.hpp:15
std::string filename
Result analysis output; empty means output to stdout.
Definition: Results.hpp:86
Definition: CLI.hpp:5
Primary namespace for all Creativity library code.
Definition: config.hpp:4
Class for interpreting and/or constructing encoded policy values.
Definition: Policy.hpp:12
std::string input
The input file to load data from.
Definition: Results.hpp:101
Policy policy
The policy implied by the given –policy value.
Definition: Results.hpp:69