2 #include "creativity/Creativity.hpp" 3 #include <eris/Agent.hpp> 4 #include <eris/Optimize.hpp> 5 #include <boost/math/distributions/normal.hpp> 14 class CopyrightPolice :
public eris::Agent,
public virtual eris::interopt::Apply,
public virtual eris::intraopt::Finish {
52 double prob(
unsigned pirated)
const {
return cdf(
normal_, pirated); }
68 double fine(
unsigned pirated);
double interApplyPriority() const override
Override priority to run after the Reader's interApply has deposited income.
Definition: CopyrightPolice.hpp:29
Primary namespace for all Creativity library code.
Definition: config.hpp:4
double tax() const
Returns the lump sum per-reader tax collected each period.
Definition: CopyrightPolice.hpp:37
double policy_catch_cost
The utility cost of being accused of piracy.
Definition: CreativitySettings.hpp:172
void intraFinish() override
When the period finishes, we probabilistically detect piracy; readers found pirating and fined...
double sigma() const
Returns the parameter; the probability of being caught is the CDF of a distribution.
Definition: CopyrightPolice.hpp:47
const CreativitySettings & parameters
Simulation parameters that are used to configure the simulation when calling setup().
Definition: Creativity.hpp:36
double cost() const
Returns the cost of being accused of piracy (whether guilty or not).
Definition: CopyrightPolice.hpp:61
double policy_catch_tax
This is the lump-sum tax extracted from each user to fund the policing policy to catch and fine reade...
Definition: CreativitySettings.hpp:164
boost::math::normal normal_
The normal distribution used to generate probabilities.
Definition: CopyrightPolice.hpp:78
double tax_
The lump sum tax amount.
Definition: CopyrightPolice.hpp:75
Central class for a creativity simulation; this class handles setting up the simulation according to ...
Definition: Creativity.hpp:22
This class represents a copyright policing agent that (probabilistically) catches readers who obtain ...
Definition: CopyrightPolice.hpp:14
double mu() const
Returns the parameter; the probability of being caught is the CDF of a distribution.
Definition: CopyrightPolice.hpp:42
double fine(unsigned pirated)
Returns the fine for being caught pirating pirated books this period.
const Creativity & creativity_
The Creativity object that owns the simulation this reader belongs to.
Definition: CopyrightPolice.hpp:72
CopyrightPolice()=delete
Not default constructible.
double prob(unsigned pirated) const
Returns the probability of being caught for a given number of pirated books.
Definition: CopyrightPolice.hpp:52
void interApply() override
When the period advances, we take the lump sum tax from all agents.