forked from Marxan-source-code/marxan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
input.hpp
83 lines (75 loc) · 2.72 KB
/
input.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
82
83
#pragma once
#include <map>
#include <sstream>
#include <string>
#include <vector>
#include "connections.hpp"
#include "species.hpp"
#include "spu.hpp"
#include "anneal.hpp"
#include "options.hpp"
namespace marxan {
using namespace std;
typedef struct sfname
{
string inputdir;
string outputdir;
string specname;
string puname;
string puvsprname;
string matrixspordername;
string connectionname;
string blockdefname;
string bestfieldname;
string connectionfilesname;
string rbinarypath;
string penaltyname;
int savebest;
int saverun;
int savesum;
int savesen;
int savespecies;
int savesumsoln;
int savelog;
int savesnapsteps;
int savesnapchanges;
int savesnapfrequency;
int savepenalty;
int savetotalareas;
int savedebugtracefile;
int savesolutionsmatrix;
int solutionsmatrixheaders;
int saveannealingtrace;
int annealingtracerows;
int saveitimptrace;
int itimptracerows;
int saverichness;
int savespec;
int savepu;
int savepuvspr;
int savematrixsporder;
int rexecutescript;
int rimagetype;
int rimagewidth;
int rimageheight;
int rimagefontsize;
int rclustercount;
} sfname;
// input reading
int readConnections(int puno, vector<sconnections>& connections, const vector<spustuff>& pu,
const map<int, int>& PULookup, const sfname& fnames);
void readInputOptions(double& cm, double& prop, sanneal& anneal,
int& iseed,
long int& repeats, string& savename, sfname& fnames, string filename,
srunoptions& runoptions, double& misslevel, int& heurotype, int& clumptype,
int& itimptype, int& verb,
double& costthresh, double& tpf1, double& tpf2);
void readPenalties(vector<sspecies>& spec, int spno, sfname& fnames, map<int, int>& SPLookup);
int readPlanningUnits(int& puno, vector<spustuff>& pu, const sfname& fnames);
void readSparseMatrix(vector<spu>& SM, int puno, int spno, vector<spustuff>& pu,
const map<int, int>& PULookup, const map<int, int>& SPLookup, const sfname& fnames);
void readSparseMatrixSpOrder(vector<spusporder>& SM, int puno, int spno,
const map<int, int>& PULookup, const map<int, int>& SPLookup, vector<sspecies>& spec, const sfname& fnames);
int readSpecies(int& spno, vector<sspecies>& spec, const sfname& fnames);
int readSpeciesBlockDefinition(int& gspno, vector<sgenspec>& gspec, sfname& fnames);
} // namespace marxan