DISPLACE
1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
|
#include <idtypes.h>
#include "sqlitestorage.h"
#include "storage/sqliteoutputstorage.h"
#include "storage/tables/vesseldeftable.h"
#include "storage/tables/vesselvmslikefpingsonlytable.h"
#include "storage/tables/nodesdeftable.h"
#include "storage/tables/poptable.h"
#include "storage/modelmetadataaccessor.h"
#include <helpers.h>
#include <assert.h>
#include <utils/CrashHandler.h>
#include <getrss.h>
#include <unistd.h>
#include <thread_vessels.h>
#include <dtree/decisiontreemanager.h>
#include <comstructs.h>
#include <simulation.h>
#include <tseries/timeseriesmanager.h>
#include "shortestpath/GeoGraph.h"
#include "shortestpath/GeoGraphLoader.h"
#include <ipc.h>
#include <outputqueuemanager.h>
#include <outputmessage.h>
#include <messages/genericconsolestringoutputmessage.h>
#include <biomodule2.h>
#include <fisheriesmanagmt.h>
#include <iomanip>
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
#include <deque>
#include <map>
#include <list>
#include <set>
#include <cstdlib>
#include <cstdio>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <ctime>
#include <cmath>
#include <cstring>
#include <errno.h>
#include <mkpath.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <values.h>
#include "Node.h"
#include "Benthos.h"
#include "Metier.h"
#include "Vessel.h"
#include "Firm.h"
#include "Ship.h"
#include "Population.h"
#include "Fishfarm.h"
#include "Windmill.h"
#include "Harbour.h"
#include "diffusion.h"
#include <outputexporter.h>
#include "readdata.h"
#include "myutils.h"
#include <memoryinfo.h>
#include <version.h>
#include <mutex>
#include "boost/bind.hpp"
#include "boost/program_options.hpp"
Macros | |
#define | GetCurrentDir getcwd |
#define | CALLGRIND_START_INSTRUMENTATION |
#define | CALLGRIND_STOP_INSTRUMENTATION |
#define | CALLGRIND_DUMP_STATS |
#define | MAXPATH 1024 |
Typedefs | |
typedef bg::model::point< double, 2, bg::cs::cartesian > | point |
typedef bg::model::box< point > | box |
typedef std::pair< box, unsigned > | value |
Functions | |
bool | load_relevant_nodes (string folder_name_parameterization, string inputfolder, string ftype, string a_quarter, set< types::NodeId > &nodes) |
bool | load_relevant_nodes (string folder_name_parameterization, string inputfolder, vector< types::NodeId > &ret) |
bool | test_not_belong_to_firm (const Vessel *v, int id) |
void | parseCommandLine (int argc, char const *argv[]) |
int | app_main (int argc, char const *argv[]) |
int | main (int argc, char const *argv[]) |
#define CALLGRIND_DUMP_STATS |
#define CALLGRIND_START_INSTRUMENTATION |
#define CALLGRIND_STOP_INSTRUMENTATION |
#define GetCurrentDir getcwd |
#define MAXPATH 1024 |
typedef bg::model::point<double, 2, bg::cs::cartesian> point |
int app_main | ( | int | argc, |
char const * | argv[] | ||
) |
---------------------------—/// ---------------------------—/// THE EFFORT CONTROL /// (ON GoFishing dtree) /// ---------------------------—/// ---------------------------—///
---------------------------—/// ---------------------------—/// THE FOR-LOOP OVER VESSELS /// ---------------------------—/// ---------------------------—///
---------------------------—/// ---------------------------—/// THE QUOTA UPTAKES & CHOKING /// ---------------------------—/// ---------------------------—///
---------------------------—/// ---------------------------—/// THE DIFFUSIVE ENVT /// ---------------------------—/// ---------------------------—///
---------------------------—/// ---------------------------—/// THE DIFFUSIVE BENTHOS /// ---------------------------—/// ---------------------------—///
---------------------------—/// ---------------------------—/// SHIPPING DISTURBING BENTHOS /// ---------------------------—/// ---------------------------—///
---------------------------—/// ---------------------------—/// REINIT SOME VALUES ON NODES /// ---------------------------—/// ---------------------------—///
---------------------------—/// ---------------------------—/// EXPORTING TO DB /// ---------------------------—/// ---------------------------—///
bool load_relevant_nodes | ( | string | folder_name_parameterization, |
string | inputfolder, | ||
string | ftype, | ||
string | a_quarter, | ||
set< types::NodeId > & | nodes | ||
) |
bool load_relevant_nodes | ( | string | folder_name_parameterization, |
string | inputfolder, | ||
vector< types::NodeId > & | ret | ||
) |
int main | ( | int | argc, |
char const * | argv[] | ||
) |
void parseCommandLine | ( | int | argc, |
char const * | argv[] | ||
) |
bool test_not_belong_to_firm | ( | const Vessel * | v, |
int | id | ||
) |
int a_graph |
types::NodeId a_port |
adjacency_map_t adjacency_map |
vector<double> arbitary_breaks_for_tariff |
vector<Benthos* > benthoss |
string biolsce |
char buf[MAXPATH] |
vector<double> calib_cpue_multiplier |
vector<double> calib_oth_landings |
vector<double> calib_weight_at_szgroup |
bool check_all_stocks_before_going_fishing |
ClosureOptions closure_opts |
bool crash_handler_enabled = true |
std::string cwd |
double dparam =10.0 |
DynAllocOptions dyn_alloc_sce |
PopSceOptions dyn_pop_sce |
bool enable_sqlite_out = true |
vector<int> explicit_pops |
int export_hugefiles = 1 |
ofstream export_individual_tacs |
int export_vmslike = 1 |
vector<Fishfarm* > fishfarms |
ofstream fishfarmslogs |
string fleetsce |
ofstream freq_cpue |
ofstream freq_distance |
int freq_do_growth |
multimap<types::NodeId, double> freq_possible_metiers |
ofstream freq_profit |
int freq_redispatch_the_pop |
int freq_update_tariff_code |
std::mutex glob_mutex |
vector<double> global_quotas_uptake |
vector<double> graph_res |
vector<int> grouped_tacs |
multimap<types::NodeId, double> gscale_cpue_per_stk_on_nodes |
multimap<types::NodeId, double> gshape_cpue_per_stk_on_nodes |
bool gui_move_vessels = true |
multimap<types::NodeId, string> harbour_names |
vector<int> implicit_pops |
vector<int> implicit_pops_level2 |
string inputfolder ="." |
vector<types::NodeId> int_harbours |
bool is_benthos_in_numbers |
bool is_direct_killing_on_benthos |
bool is_discard_ban |
bool is_fishing_credits |
bool is_grouped_tacs |
bool is_individual_vessel_quotas |
bool is_resuspension_effect_on_benthos |
bool is_tacs |
vector<int> listVesselIdForLogLikeToExport |
vector<int> listVesselIdForTripCatchPopPerSzgroupExport |
vector<int> listVesselIdForVmsLikeFPingsOnlyToExport |
vector<int> listVesselIdForVmsLikeToExport |
std::mutex listVesselMutex |
MemoryInfo memInfo |
vector<Metier*> metiers |
vector<int> name_metiers |
string namefolderinput ="fake" |
string namefolderoutput ="baseline" |
string namesimu ="sim1" |
int nb_displayed_moves_out_of_twenty =1 |
int nbbenthospops |
int nbpops |
int nbsteps =10 |
vector<Node* > nodes |
multimap<int, int> nodes_in_polygons |
int nrow_coord |
int nrow_graph |
int num_threads = 4 |
string outdir |
std::shared_ptr<SQLiteOutputStorage> outSqlite = nullptr |
std::string outSqlitePath |
vector<PathShop> pathshops |
vector<Population* > populations |
multimap<types::NodeId, int> possible_metiers |
vector<types::NodeId> relevant_nodes |
displace::commons::Scenario scenario |
int selected_vessels_only =0 |
vector<Ship*> ships |
ofstream shipslogs |
vector<types::NodeId> spe_fgrounds |
vector<types::NodeId> spe_fgrounds_init |
vector<double> spe_fishing_credits |
vector<double> spe_freq_fgrounds |
vector<double> spe_freq_fgrounds_init |
vector<double> spe_freq_harbours |
vector<types::NodeId> spe_harbours |
vector<double> spe_percent_tac_per_pop |
vector<double> spe_vessel_betas_per_pop |
double tariff_annual_hcr_percent_change |
vector<int> tariff_pop |
double tech_creeping_multiplier =1 |
int total_amount_credited |
int tstep |
string type_of_avai_field_to_read ="" |
int update_tariffs_based_on_lpue_or_dpue_code |
bool use_dtrees |
bool use_gnuplot = false |
bool use_gui = false |
int use_static_paths =0 |
vector<int> ve |
vector<string> vertex_names |
vector<Vessel*> vessels |
ofstream vmslike2 |
ofstream vmslike3 |
vector<Windmill* > windmills |
ofstream windmillslogs |