9 |
extern Ecosystem** EcoSystems; |
extern Ecosystem** EcoSystems; |
10 |
//extern StochasticData* data; |
//extern StochasticData* data; |
11 |
#endif |
#endif |
12 |
|
extern volatile int interrupted_print; |
13 |
|
|
14 |
Ecosystem::Ecosystem(const MainInfo& main) : printinfo(main.getPI()) { |
Ecosystem::Ecosystem(const MainInfo& main) : printinfo(main.getPI()) { |
15 |
|
|
16 |
funceval = 0; |
funceval = 0; |
17 |
interrupted = 0; |
//interrupted = 0; |
18 |
likelihood = 0.0; |
likelihood = 0.0; |
19 |
keeper = new Keeper; |
keeper = new Keeper; |
20 |
|
|
195 |
} |
} |
196 |
|
|
197 |
void Ecosystem::writeParams(const char* const filename, int prec) const { |
void Ecosystem::writeParams(const char* const filename, int prec) const { |
198 |
if ((funceval > 0) && (interrupted == 0)) { |
if ((funceval > 0) && (interrupted_print == 0)) { |
199 |
//JMB - print the final values to any output files specified |
//JMB - print the final values to any output files specified |
200 |
//in case they have been missed by the -print value |
//in case they have been missed by the -print value |
201 |
if (printinfo.getPrint()) |
if (printinfo.getPrint()) |
202 |
keeper->writeValues(likevec, printinfo.getPrecision()); |
keeper->writeValues(likevec, printinfo.getPrecision()); |
203 |
} |
} |
204 |
keeper->writeParams(optvec, filename, prec, interrupted); |
keeper->writeParams(optvec, filename, prec, interrupted_print); |
205 |
} |
} |