Resource.hpp

Implement resource-based selection.

Todo:

Ultimately, we probably want a much more full-featured resource system. This one works for Eco-EA and could be the basis for something Avida-like but lacks a lot of features for Artificial Life systems.

Functions

template<typename ORG>
void ResourceSelect(World<ORG> &world, vector<std::function<double(ORG&)>> &extra_funs, vector<Resource> &pools, size_t t_size, size_t tourny_count = 1, double frac = .0025, double max_bonus = 5, double cost = 0, bool use_base = true, double min_score = 0)
class Resource
#include <Resource.hpp>

Public Functions

inline Resource()
inline Resource(double amt, double in, double out)
inline double GetAmount()
inline double GetInflow()
inline double GetOutflow()
inline void SetAmount(double amt)
inline void SetInflow(double in)
inline void SetOutflow(double out)
inline double Inc()
inline double Inc(double amt)
inline double Dec()
inline double Dec(double amt)
inline double Update()

Private Members

double amount = 0
double inflow = 0
double outflow = 0