DISPLACE  1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
thread_vessels.cpp File Reference
#include <helpers.h>
#include <map>
#include <string>
#include <vector>
#include <queue>
#include <ostream>
#include <iostream>
#include <values.h>
#include <Vessel.h>
#include <Ship.h>
#include <Node.h>
#include <Benthos.h>
#include <Metier.h>
#include <outputqueuemanager.h>
#include <messages/movevesseloutputmessage.h>
#include <messages/moveshipoutputmessage.h>
#include <messages/vessellogbookoutputmessage.h>
#include <outputexporter.h>
#include <thread>
#include <condition_variable>
#include <errno.h>
#include <unistd.h>

Functions

void guiSendVesselLogbook (const std::string &line)
 
void thread_vessel_init (int n)
 
void thread_vessel_prepare ()
 
void thread_vessel_insert_job (int idx)
 
void thread_vessel_signal_exit ()
 
void thread_vessel_wait_completed ()
 
void thread_vessel_deinit ()
 

Variables

OutputQueueManager mOutQueue
 
std::mutex glob_mutex
 
bool use_gui
 
bool use_dtrees
 
bool use_gnuplot
 
bool gui_move_vessels
 
int nb_displayed_moves_out_of_twenty
 
vector< int > ve
 
vector< Vessel * > vessels
 
vector< Ship * > ships
 
vector< Population * > populations
 
vector< Benthos * > benthoss
 
int tstep
 
int nbsteps
 
int nbpops
 
int export_vmslike
 
int export_hugefiles
 
vector< double > graph_res
 
bool is_individual_vessel_quotas
 
bool check_all_stocks_before_going_fishing
 
vector< int > tariff_pop
 
int freq_update_tariff_code
 
int update_tariffs_based_on_lpue_or_dpue_code
 
int freq_do_growth
 
int freq_redispatch_pop
 
vector< double > arbitary_breaks_for_tariff
 
int total_amount_credited
 
double tariff_annual_hcr_percent_change
 
bool is_tacs
 
bool is_fishing_credits
 
bool is_direct_killing_on_benthos
 
bool is_resuspension_effect_on_benthos
 
bool is_discard_ban
 
bool is_grouped_tacs
 
double tech_creeping_multiplier
 
bool is_benthos_in_numbers
 
vector< int > implicit_pops
 
vector< int > grouped_tacs
 
displace::commons::Scenario scenario
 
DynAllocOptions dyn_alloc_sce
 
PopSceOptions dyn_pop_sce
 
string biolsce
 
string fleetsce
 
int use_static_paths
 
adjacency_map_t adjacency_map
 
vector< string > vertex_names
 
vector< types::NodeIdrelevant_nodes
 
multimap< int, int > nodes_in_polygons
 
multimap< int, int > possible_metiers
 
multimap< int, double > freq_possible_metiers
 
multimap< int, double > gshape_cpue_per_stk_on_nodes
 
multimap< int, double > gscale_cpue_per_stk_on_nodes
 
vector< int > spe_fgrounds
 
vector< int > spe_fgrounds_init
 
vector< int > spe_harbours
 
vector< double > spe_freq_fgrounds
 
vector< double > spe_freq_fgrounds_init
 
vector< double > spe_freq_harbours
 
vector< double > spe_vessel_betas_per_pop
 
vector< double > spe_percent_tac_per_pop
 
vector< Node * > nodes
 
multimap< int, string > harbour_names
 
vector< int > name_metiers
 
ofstream freq_cpue
 
ofstream freq_profit
 
ofstream freq_distance
 
ofstream vmslike2
 
ofstream vmslike3
 
vector< Metier * > metiers
 
ofstream export_individual_tacs
 
vector< PathShoppathshops
 
ofstream fishfarmslogs
 
ofstream windfarmslogs
 
ofstream shipslogs
 
std::mutex listVesselMutex
 
vector< int > listVesselIdForVmsLikeFPingsOnlyToExport
 
vector< int > listVesselIdForVmsLikeToExport
 
vector< int > listVesselIdForLogLikeToExport
 
vector< int > listVesselIdForTripCatchPopPerSzgroupExport
 

Function Documentation

◆ guiSendVesselLogbook()

void guiSendVesselLogbook ( const std::string &  line)

◆ thread_vessel_deinit()

void thread_vessel_deinit ( )

◆ thread_vessel_init()

void thread_vessel_init ( int  n)

◆ thread_vessel_insert_job()

void thread_vessel_insert_job ( int  idx)

◆ thread_vessel_prepare()

void thread_vessel_prepare ( )

◆ thread_vessel_signal_exit()

void thread_vessel_signal_exit ( )

◆ thread_vessel_wait_completed()

void thread_vessel_wait_completed ( )

Variable Documentation

◆ adjacency_map

adjacency_map_t adjacency_map

◆ arbitary_breaks_for_tariff

vector<double> arbitary_breaks_for_tariff

◆ benthoss

vector<Benthos* > benthoss

◆ biolsce

string biolsce

◆ check_all_stocks_before_going_fishing

bool check_all_stocks_before_going_fishing

◆ dyn_alloc_sce

DynAllocOptions dyn_alloc_sce

◆ dyn_pop_sce

PopSceOptions dyn_pop_sce

◆ export_hugefiles

int export_hugefiles

◆ export_individual_tacs

ofstream export_individual_tacs

◆ export_vmslike

int export_vmslike

◆ fishfarmslogs

ofstream fishfarmslogs

◆ fleetsce

string fleetsce

◆ freq_cpue

ofstream freq_cpue

◆ freq_distance

ofstream freq_distance

◆ freq_do_growth

int freq_do_growth

◆ freq_possible_metiers

multimap<int, double> freq_possible_metiers

◆ freq_profit

ofstream freq_profit

◆ freq_redispatch_pop

int freq_redispatch_pop

◆ freq_update_tariff_code

int freq_update_tariff_code

◆ glob_mutex

std::mutex glob_mutex

◆ graph_res

vector<double> graph_res

◆ grouped_tacs

vector<int> grouped_tacs

◆ gscale_cpue_per_stk_on_nodes

multimap<int, double> gscale_cpue_per_stk_on_nodes

◆ gshape_cpue_per_stk_on_nodes

multimap<int, double> gshape_cpue_per_stk_on_nodes

◆ gui_move_vessels

bool gui_move_vessels

◆ harbour_names

multimap<int, string> harbour_names

◆ implicit_pops

vector<int> implicit_pops

◆ is_benthos_in_numbers

bool is_benthos_in_numbers

◆ is_direct_killing_on_benthos

bool is_direct_killing_on_benthos

◆ is_discard_ban

bool is_discard_ban

◆ is_fishing_credits

bool is_fishing_credits

◆ is_grouped_tacs

bool is_grouped_tacs

◆ is_individual_vessel_quotas

bool is_individual_vessel_quotas

◆ is_resuspension_effect_on_benthos

bool is_resuspension_effect_on_benthos

◆ is_tacs

bool is_tacs

◆ listVesselIdForLogLikeToExport

vector<int> listVesselIdForLogLikeToExport

◆ listVesselIdForTripCatchPopPerSzgroupExport

vector<int> listVesselIdForTripCatchPopPerSzgroupExport

◆ listVesselIdForVmsLikeFPingsOnlyToExport

vector<int> listVesselIdForVmsLikeFPingsOnlyToExport

◆ listVesselIdForVmsLikeToExport

vector<int> listVesselIdForVmsLikeToExport

◆ listVesselMutex

std::mutex listVesselMutex

◆ metiers

vector<Metier*> metiers

◆ mOutQueue

OutputQueueManager mOutQueue

◆ name_metiers

vector<int> name_metiers

◆ nb_displayed_moves_out_of_twenty

int nb_displayed_moves_out_of_twenty

◆ nbpops

int nbpops

◆ nbsteps

int nbsteps

◆ nodes

vector<Node* > nodes

◆ nodes_in_polygons

multimap<int, int> nodes_in_polygons

◆ pathshops

vector<PathShop> pathshops

◆ populations

vector<Population* > populations

◆ possible_metiers

multimap<int, int> possible_metiers

◆ relevant_nodes

vector<types::NodeId> relevant_nodes

◆ scenario

◆ ships

vector<Ship*> ships

◆ shipslogs

ofstream shipslogs

◆ spe_fgrounds

vector<int> spe_fgrounds

◆ spe_fgrounds_init

vector<int> spe_fgrounds_init

◆ spe_freq_fgrounds

vector<double> spe_freq_fgrounds

◆ spe_freq_fgrounds_init

vector<double> spe_freq_fgrounds_init

◆ spe_freq_harbours

vector<double> spe_freq_harbours

◆ spe_harbours

vector<int> spe_harbours

◆ spe_percent_tac_per_pop

vector<double> spe_percent_tac_per_pop

◆ spe_vessel_betas_per_pop

vector<double> spe_vessel_betas_per_pop

◆ tariff_annual_hcr_percent_change

double tariff_annual_hcr_percent_change

◆ tariff_pop

vector<int> tariff_pop

◆ tech_creeping_multiplier

double tech_creeping_multiplier

◆ total_amount_credited

int total_amount_credited

◆ tstep

int tstep

◆ update_tariffs_based_on_lpue_or_dpue_code

int update_tariffs_based_on_lpue_or_dpue_code

◆ use_dtrees

bool use_dtrees

◆ use_gnuplot

bool use_gnuplot

◆ use_gui

bool use_gui

◆ use_static_paths

int use_static_paths

◆ ve

vector<int> ve

◆ vertex_names

vector<string> vertex_names

◆ vessels

vector<Vessel*> vessels

◆ vmslike2

ofstream vmslike2

◆ vmslike3

ofstream vmslike3

◆ windfarmslogs

ofstream windfarmslogs