#include "loop.h"
#include "../xerr/xerr.ih"

#include <fstream>
#include <cmath>

#include <bobcat/exception>
#include <bobcat/csvtable>
#include <bobcat/datetime>

#include "../random/random.h"
#include "../options/options.h"
#include "../modbase/modbase.h"
#include "../log/log.h"

namespace Icmake
{
    extern char version[];
}

inline void Loop::selfDetected()
{
    characteristics(LEFT_PRE, TUMOR_PRE);
}

inline void Loop::treatmentDeath()
{
    characteristics(LEFT_POST, TUMOR_POST);
}

inline double Loop::treatmentCosts(double screeningAge) const
{
                                        // diameter unused with lung cancer
                                        // otherwise metastasis unused
    return d_costs.treatment(screeningAge,
                             d_tumor.diameter(), d_tumor.metastasis());
}

#ifndef SPCH_
using namespace std;
using namespace FBB;
#endif
