9 typedef std::map<std::string, std::vector<double> > Report;
17 SimplePerson() : id(-1) {};
20 void reporting(
string name,
double value);
26 void SimplePerson::init() {
29 double tm = R::rweibull(8.0,85.0);
31 scheduleAt(R::rweibull(3.0,90.0),
toCancer);
34 void SimplePerson::reporting(std::string name,
double value) {
35 report[name].push_back(value);
43 reporting(
"id",
double(
id));
44 reporting(
"startTime", previousEventTime);
46 reporting(
"state",
double(state));
47 reporting(
"event",
double(msg->
kind));
58 if (R::runif(0.0,1.0) < 0.5)
63 REprintf(
"No valid kind of event\n");
68 if (
id % 10000 == 0) Rcpp::checkUserInterrupt();
75 Rcpp::List parmsl(parms);
76 int n = Rcpp::as<int>(parmsl[
"n"]);
77 for (
int i = 0; i < n; i++) {