4 #include <eris/types.hpp> 5 #include <eris/Position.hpp> 6 #include "creativity/BookCopy.hpp" 7 #include "creativity/belief/Demand.hpp" 8 #include "creativity/belief/Profit.hpp" 9 #include "creativity/belief/ProfitStream.hpp" 38 std::map<eris::eris_id_t, BookCopy>
library;
72 std::set<eris::eris_id_t>
double creation_shape
Creation shape coefficient.
Definition: ReaderState.hpp:84
Records the various variables associated with a reader.
Definition: ReaderState.hpp:18
Primary namespace for all Creativity library code.
Definition: config.hpp:4
This class represents an author's belief about the per-period demand for books.
Definition: Demand.hpp:36
belief::Profit profit_extrap
Profit beliefs using extrapolation for on-market books (will be default-constructed if there is no ex...
Definition: ReaderState.hpp:91
eris::Position position
Position of the reader.
Definition: ReaderState.hpp:33
uint32_t library_public_new
The number of public provider-purchased books in the reader's library that were acquired in the curre...
Definition: ReaderState.hpp:60
uint32_t library_public
The number of public provider-purchased books in the reader's library.
Definition: ReaderState.hpp:54
std::set< eris::eris_id_t > wrote
IDs of books written by this reader.
Definition: ReaderState.hpp:73
A Reader is an agent that both consumes previously unread books and potentially writes new books and ...
Definition: Reader.hpp:141
double u_lifetime
Lifetime cumulative utility up to and including the current period.
Definition: ReaderState.hpp:81
uint32_t library_pirated_new
The number of pirated books in the reader's library that were acquired in the current period...
Definition: ReaderState.hpp:70
std::map< uint32_t, belief::ProfitStream > profit_stream
Profit stream beliefs.
Definition: ReaderState.hpp:93
uint32_t library_pirated
The number of pirated books in the reader's library.
Definition: ReaderState.hpp:65
void updateLibraryCounts(eris::eris_time_t t)
Utility method to recalculate purchased, purchased_new, pirated, and pirated_new from the current lib...
uint32_t library_purchased
The number of market-purchased books in the reader's library.
Definition: ReaderState.hpp:43
This class represents an author's belief about the lifetime profitability of a work.
Definition: Profit.hpp:33
belief::Demand demand
Single-period demand belief.
Definition: ReaderState.hpp:92
eris::eris_id_t id
Unique simulation ID of the reader.
Definition: ReaderState.hpp:30
uint32_t library_purchased_new
The number of market-purchased books in the reader's library that were acquired in the current period...
Definition: ReaderState.hpp:48
std::map< eris::eris_id_t, BookCopy > library
The reader's library: the keys are the book IDs of owned books, the values are the per-reader specifi...
Definition: ReaderState.hpp:38
double u
Utility in the current period.
Definition: ReaderState.hpp:78
const belief::Profit & profitExtrap() const
Returns profit_extrap if it exists (i.e.
std::set< eris::eris_id_t > friends
Friends of the reader.
Definition: ReaderState.hpp:73
belief::Profit profit
Profit beliefs.
Definition: ReaderState.hpp:90
double creation_scale
Creation scale coefficient.
Definition: ReaderState.hpp:87
std::set< eris::eris_id_t > new_books
The set of book IDs that were newly obtained in the period, not including self-authored books...
Definition: ReaderState.hpp:73
ReaderState(const Reader &r)
Constructs a new ReaderState, settings its values using the given Reader.