-
Notifications
You must be signed in to change notification settings - Fork 1
/
marzone.hpp
81 lines (62 loc) · 3.55 KB
/
marzone.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#pragma once
// headers for Marxan with Zones
#define DebugFree(x)
#include "common.hpp"
#include "util.hpp"
#include "costs.hpp"
#include "pu.hpp"
#include "reserve.hpp"
#include "species.hpp"
#include "zones.hpp"
#include <random>
namespace marzone
{
using namespace std;
double delta;
/* Protytpe function Headers */
void SetRunOptions(srunoptions &runoptions);
int CalcPenalties(Pu &pu, Species &spec, Zones &zones, Reserve &r, int clumptype);
void CalcTotalAreas(Pu& pu, Species& spec, string filename = "MarZoneTotalAreas.csv", bool save = true);
double ReturnPuZoneCost(int ipu,int iZone, Pu& pu, Zones& zones);
void ApplySpecProp(Species& spec, Pu& pu);
void PrintResVal(Reserve& reserve, Species& spec, Zones& zones, double misslevel,stringstream& buffer);
void SetOptions(string &sInputFileName, srunoptions &runoptions, sanneal &anneal, sfname &fnames);
/* ************************************************************************** */
/* FILEOUT.H START */
void SaveSeed(int iseed);
void DumpFileNames(sfname& fnames, Logger& logger);
string OutputSummaryString(Pu& pu, Species& spec, Zones& zones, Reserve& r, double misslevel, int imode, double blm);
void OutputSummary(Pu& pu, Zones& zones, vector<string>& summaries, string filename, int imode);
void OutputScenario(int puno,int spno, int zoneCount, int costCount, Logger& logger,
sanneal& anneal, srunoptions& runoptions,
string filename);
void OutputFeatures(std::string filename, marzone::Zones &zones, marzone::Reserve &reserve, marzone::Species &spec, int imode, double misslevel);
/* FILEOUT.H END */
/* ************************************************************************** */
/* ************************************************************************** */
/* SCREENOUT.H START */
/* Prototype Headers */
void ShowStartupScreen(void); /* Displays splash screen info */
void ShowShutdownScreen(void); /* displays program termination info */
void ShowPauseExit(void); /* Press any key to terminate */
/* Re-enable when separation is reimplemented.
double SepPenalty(int ival);
double SepPenalty2(int ival, int itarget);
int ValidPU(int ipu, int isp, struct sclumps *newno, struct sspecies spec[], struct spustuff pu[],
struct spu SM[], int imode);
int CheckDistance(int i, int j, struct spustuff pu[], double squaretarget);
int CountSeparation(int isp, struct sclumps *newno,
struct spustuff pu[], struct spu SM[], sspecies spec[], int imode);
struct slink *makelist(int isp, int inpu, int puno, int R[], struct sclumps *newno, struct sspecies spec[],
struct spustuff pu[], struct spu SM[], int imode);
int SepDealList(struct slink *head, typeseplist *Dist, struct spustuff *pu,
struct sspecies spec[], int first, int sepnum, double targetdist, int isp);
int CountSeparation2(int isp, int ipu, struct sclumps *newno, int puno, int R[],
struct spustuff pu[], struct spu SM[], sspecies spec[], int imode);
void CheckDist(struct sseplist *Dist, int sepnum);
*/
double rtnMaxNonAvailableCost(int ipu, Pu& pu, Zones& zones);
void StartDebugFile(string sFileName,string sHeader, sfname& fnames);
void AppendDebugFile(string sFileName,string& sLine, sfname& fnames);
void WriteSecondarySyncFileRun(int iSyncRun);
} // namespace marzone