creativity
v1.3.0
Agent-based model of creativity and piracy
|
This class represents a copyright policing agent that (probabilistically) catches readers who obtain books via piracy, fining them and redistributing fines to infringed-upon authors. More...
#include <creativity/CopyrightPolice.hpp>
Public Member Functions | |
CopyrightPolice ()=delete | |
Not default constructible. | |
CopyrightPolice (const Creativity &creativity) | |
Constructor for a new CopyrightPolice agent. More... | |
void | interApply () override |
When the period advances, we take the lump sum tax from all agents. | |
double | interApplyPriority () const override |
Override priority to run after the Reader's interApply has deposited income. | |
void | intraFinish () override |
When the period finishes, we probabilistically detect piracy; readers found pirating and fined, and the fines redistributed to the authors of the pirated works. | |
double | tax () const |
Returns the lump sum per-reader tax collected each period. | |
double | mu () const |
Returns the \(\mu\) parameter; the probability of being caught is the CDF of a \(\mathcal{N}(\mu, \sigma^2)\) distribution. | |
double | sigma () const |
Returns the \(\sigma\) parameter; the probability of being caught is the CDF of a \(\mathcal{N}(\mu, \sigma^2)\) distribution. | |
double | prob (unsigned pirated) const |
Returns the probability of being caught for a given number of pirated books. More... | |
double | cost () const |
Returns the cost of being accused of piracy (whether guilty or not). More... | |
double | fine (unsigned pirated) |
Returns the fine for being caught pirating pirated books this period. More... | |
Protected Attributes | |
const Creativity & | creativity_ |
The Creativity object that owns the simulation this reader belongs to. | |
double | tax_ |
The lump sum tax amount. | |
boost::math::normal | normal_ |
The normal distribution used to generate probabilities. | |
This class represents a copyright policing agent that (probabilistically) catches readers who obtain books via piracy, fining them and redistributing fines to infringed-upon authors.
|
explicit |
Constructor for a new CopyrightPolice agent.
Takes a reference to the creativity object and the lump sum tax amount.
std::domain_error | if catch tax is negative, or if sigma is negative for the level of the catch tax. |
|
inline |
Returns the cost of being accused of piracy (whether guilty or not).
This is simply a shortcut for creativity_.parameters.policy_catch_cost
.
Unlike fine, this isn't a paid amount, but rather represents the opportunity cost to the user of being caught (as such it isn't really a CopyrightPolice property, but is provided here nonetheless for convenience).
double creativity::CopyrightPolice::fine | ( | unsigned | pirated | ) |
Returns the fine for being caught pirating pirated
books this period.
Will always return 0 for 0 pirated books, otherwise evaluates the creativity_.parameters.policy_catch_fine
polynomial to determine the fine. Returns 0 if the polynomial evaluates to a negative number.
|
inline |