21 #ifndef DISPLACEMODEL_H 22 #define DISPLACEMODEL_H 60 #include <ogrsf_frmts.h> 94 bool edit(QString modelname);
96 int index()
const {
return mIndex; }
105 std::shared_ptr<Calendar>
calendar()
const {
return mCalendar; }
112 QString
outDir()
const {
return mOutDir; }
144 const QList<std::shared_ptr<HarbourData> > &
getHarboursList()
const {
return mHarbours; }
148 const QList<std::shared_ptr<NodeData> > &
getNodesList()
const {
return mNodes; }
151 QList<std::shared_ptr<NodeData> >
getAllNodesWithin (
const QPointF ¢erpoint,
double dist_km)
const;
161 const QList<std::shared_ptr<VesselData> > &
getVesselList()
const {
return mVessels; }
164 void updateVessel (
int tstep,
int idx,
float x,
float y,
float course,
float fuel,
int state );
166 const QList<std::shared_ptr<FishfarmData> > &
getFishfarmList()
const {
return mFishfarms; }
172 const QList<std::shared_ptr<FirmData> > &
getFirmList()
const {
return mFirms; }
178 const QList<std::shared_ptr<WindmillData> > &
getWindmillList()
const {
return mWindmills; }
183 const QList<std::shared_ptr<ShipData> > &
getShipList()
const {
return mShips; }
188 const QList<std::shared_ptr<Benthos> > &
getBenthosList()
const {
return mBenthos; }
191 const QList<std::shared_ptr<objecttree::MetiersInterest> > &
getMetiersList()
const {
return mMetiers; }
193 return mMetiers.size();
205 const QList<std::shared_ptr<NationData> > &
getNationsList()
const {
return mNations; }
210 const QList<std::shared_ptr<VesselData> > &
getVesselsList()
const {
return mVessels; }
215 const QList<std::shared_ptr<HarbourData> > &
getHarbourList()
const {
return mHarbours; }
241 void setStockNames (
const QMap<QString,int> &names) { mStockNames = names; }
312 std::shared_ptr<InterestingListWithSpecialValues<int>>
getShipsTypesList()
const {
return mShipsTypes; }
337 if (!mInterestingNations.contains(n))
338 mInterestingNations.append(n);
339 qSort(mInterestingNations);
344 mInterestingNations.removeAll(n);
347 return mInterestingNations.contains(n);
355 if (!mInterestingVessels.contains(n))
356 mInterestingVessels.append(n);
357 qSort(mInterestingVessels);
362 mInterestingVessels.removeAll(n);
365 return mInterestingVessels.contains(n);
395 void collectWind(
int step,
int node_idx,
double wind);
396 void collectSST(
int step,
int node_idx,
double sst);
444 bool removeNode(std::shared_ptr<NodeData> node);
449 void addPenaltyToNodesByAddWeight(
const QList<QPointF> &poly,
double weight,
double nbOfDaysClosedPerMonth,
bool onQ1,
bool onQ2,
bool onQ3,
bool onQ4, vector<bool> checkedMonths,
const vector<int> &checkedVesSizes, vector<int> bannedMetiers);
450 void addPenaltyToNodesByAddWeight(OGRGeometry *geometry,
double weight,
double nbOfDaysClosedPerMonth,
bool onQ1,
bool onQ2,
bool onQ3,
bool onQ4, vector<bool> checkedMonths,
const vector<int> &checkedVesSizes, vector<int> bannedMetiers);
493 bool parse(
const QString &path, QString *
basepath, QString *inputname, QString *outputname);
494 void setCodeFromFeature(OGRGeometry *geometry,
int code, std::function<
void (std::shared_ptr<NodeData>,
int)> func);
495 void setWdFromFeature(OGRGeometry *geometry,
double wd, std::function<
void (std::shared_ptr<NodeData>,
int)> func);
496 void setTFromFeature(OGRGeometry *geometry,
double t, std::function<
void (std::shared_ptr<NodeData>,
int)> func);
497 void setSalFromFeature(OGRGeometry *geometry,
double sal, std::function<
void (std::shared_ptr<NodeData>,
int)> func);
498 void setNitroFromFeature(OGRGeometry *geometry,
double sal, std::function<
void (std::shared_ptr<NodeData>,
int)> func);
499 void setPhosFromFeature(OGRGeometry *geometry,
double sal, std::function<
void (std::shared_ptr<NodeData>,
int)> func);
500 void setOxyFromFeature(OGRGeometry *geometry,
double sal, std::function<
void (std::shared_ptr<NodeData>,
int)> func);
501 void setDissoFromFeature(OGRGeometry *geometry,
double sal, std::function<
void (std::shared_ptr<NodeData>,
int)> func);
502 void setBenthosBioFromFeature(OGRGeometry *geometry,
double bio, std::function<
void (std::shared_ptr<NodeData>,
double)> func);
503 void setBenthosNbFromFeature(OGRGeometry *geometry,
double bio, std::function<
void (std::shared_ptr<NodeData>,
double)> func);
511 mutable QMutex mMutex;
515 std::shared_ptr<MapsDataProvider> mMapsDataProvider;
516 std::shared_ptr<SQLiteOutputStorage> mOutSqlite;
517 std::shared_ptr<Calendar> mCalendar;
524 QString mLinkedDbName;
529 int mCurrentStep, mLastStep;
531 bool mNodesStatsDirty;
532 bool mVesselsStatsDirty;
533 int m_vessel_last_step;
534 bool mFirmsStatsDirty;
535 bool mShipsStatsDirty;
540 QList<int> mInterestingPop;
541 QList<int> mInterestingPop2;
542 bool mInterestingSizeTotal, mInterestingSizeAvg, mInterestingSizeMin, mInterestingSizeMax;
543 QList<int> mInterestingSizes;
544 QList<types::NodeId> mInterestingHarb;
545 QList<int> mInterestingNations;
546 QList<int> mInterestingVessels;
551 std::shared_ptr<InterestingListWithSpecialValues<int>> mFuncGroups;
552 std::shared_ptr<InterestingListWithSpecialValues<int>> mFishfarmsTypes;
553 std::shared_ptr<InterestingListWithSpecialValues<int>> mWindfarmsTypes;
555 std::shared_ptr<InterestingListWithSpecialValues<int>> mShipsTypes;
557 QList<displace::NodePenalty> mPenaltyNodes;
558 QList<std::shared_ptr<HarbourData>> mHarbours;
559 QList<std::shared_ptr<NodeData> > mNodes;
560 QList<std::shared_ptr<VesselData> > mVessels;
561 QList<std::shared_ptr<PopulationData> > mPops;
562 QList<std::shared_ptr<FishfarmData> > mFishfarms;
563 QList<std::shared_ptr<FirmData> > mFirms;
564 QList<std::shared_ptr<WindmillData> > mWindmills;
565 QList<std::shared_ptr<ShipData> > mShips;
566 QList<std::shared_ptr<Benthos> > mBenthos;
567 QList<std::shared_ptr<objecttree::MetiersInterest>> mMetiers;
569 QList<std::shared_ptr<NationData> > mNations;
577 QMap<int, std::shared_ptr<Benthos> > mBenthosInfo;
578 QMap<int, std::shared_ptr<Fishfarm> > mFishfarmInfo;
580 QMap<QString, int> mStockNames;
585 QThread *mParserThread;
589 enum OgrType { OgrTypeNode = 0, OgrTypeEdge = 1 };
590 GDALDataset *mDataSource;
591 OGRLayer *mNodesLayer;
593 int mNodesLayerIndex;
595 OGRSpatialReference *mSpatialRef;
596 QString mShortestPathFolder;
598 QString mGraphFolder;
601 #endif // DISPLACEMODEL_H void collectShipGHGemission(int step, int node_idx, int shipid, int shiptype, double GHG_emission)
Definition: displacemodel.cpp:949
void collectFishfarmCumulNetDischargeN(int step, int node_idx, int farmid, int farmtype, double fishfarm_cumulnetdischargeN)
Definition: displacemodel.cpp:848
void Q_DECL_DEPRECATED simulationEnded()
Signals the simulation has ended. Flush all buffers.
Definition: displacemodel.cpp:335
bool loadDatabase(QString path)
Definition: displacemodel.cpp:251
int getVesselCount() const
Definition: displacemodel.cpp:1601
const FishfarmsStatsContainer & getFishfarmsStatistics()
Definition: displacemodel.h:225
void setIndex(int idx)
Definition: displacemodel.h:95
void collectWind(int step, int node_idx, double wind)
Definition: displacemodel.cpp:652
void setInterestingFishfarms(int n)
Definition: displacemodel.h:273
void setInterestingSizeMin(bool b)
Definition: displacemodel.h:296
void collectFishfarmNetDischargeP(int step, int node_idx, int farmid, int farmtype, double fishfarm_netdischargeP)
Definition: displacemodel.cpp:836
Definition: outputfileparser.h:53
void clear()
Definition: interestinglist.h:29
Definition: displacemodel.h:80
HistoricalDataCollector< FishfarmsStats > FishfarmsStatsContainer
Definition: displacemodel.h:76
void setCurrentStep(int step)
Definition: displacemodel.cpp:1762
HistoricalDataCollector< BenthosStats > BenthosStatsContainer
Definition: displacemodel.h:75
QList< int > getInterestingWindfarms() const
Definition: displacemodel.h:278
void addMetier(int id)
Definition: displacemodel.cpp:1715
int getFishfarmsCount() const
Definition: displacemodel.cpp:1642
Definition: benthosstats.h:7
void collectShipSOxEmissionPercentPerTotalFuelmass(int step, int node_idx, int shipid, int shiptype, double SOx_emission_percentpertotalfuelmass)
Definition: displacemodel.cpp:899
Definition: nationdata.h:27
Definition: displacemodel.h:85
const QList< std::shared_ptr< WindmillData > > & getWindmillList() const
Definition: displacemodel.h:178
const QList< std::shared_ptr< FirmData > > & getFirmList() const
Definition: displacemodel.h:172
int getShipsCount() const
Definition: displacemodel.cpp:1622
int getHarboursCount() const
Definition: displacemodel.cpp:361
Scenario scenario() const
Definition: displacemodel.cpp:1741
void collectSST(int step, int node_idx, double sst)
Definition: displacemodel.cpp:666
bool saveConfig()
Definition: displacemodel.cpp:324
void parseOutput(QString, int)
Definition: moc_displacemodel.cpp:146
bool clearStats()
Definition: displacemodel.cpp:287
const QList< std::shared_ptr< objecttree::MetiersInterest > > & getMetiersList() const
Definition: displacemodel.h:191
bool loadNodesFromDb()
Definition: displacemodel.cpp:3442
void collectPopCumdiscards(int step, int node_idx, double cumdiscards)
Definition: displacemodel.cpp:587
int getWindmillCount() const
Definition: displacemodel.cpp:1653
int getNumShipsTypes() const
Definition: displacemodel.cpp:1836
void setConfig(const Config &config)
Definition: displacemodel.cpp:1756
void setOutDir(const QString &name)
Definition: displacemodel.h:116
void startCollectingStats()
Definition: displacemodel.cpp:535
QString inputName() const
Definition: displacemodel.h:113
void setTFromFeature(OGRGeometry *geometry, double t, std::function< void(std::shared_ptr< NodeData >, int)> func)
Definition: displacemodel.cpp:1378
void collectPopCumftime(int step, int node_idx, double cumftime)
Definition: displacemodel.cpp:552
void collectPopTariffs(int step, int node_idx, vector< double > tariffs)
Definition: displacemodel.cpp:608
bool isInterestingNations(int n)
Definition: displacemodel.h:346
void collectSalinity(int step, int node_idx, double salinity)
Definition: displacemodel.cpp:659
Config config() const
Definition: displacemodel.cpp:1751
int getNumWindfarmsTypes() const
Definition: displacemodel.cpp:1830
QList< int > getInterestingShips() const
Definition: displacemodel.h:284
void collectSiltfraction(int step, int node_idx, double siltfraction)
Definition: displacemodel.cpp:644
int index() const
Definition: displacemodel.h:96
void commitPopBenthosStats(int tstep)
Definition: displacemodel.cpp:757
std::shared_ptr< InterestingListWithSpecialValues< int > > getWindfarmsTypesList() const
Definition: displacemodel.h:309
void collectShipNOxEmission(int step, int node_idx, int shipid, int shiptype, double NOx_emission)
Definition: displacemodel.cpp:933
bool loadVesselsFromDb()
Definition: displacemodel.cpp:3450
int getNBPops() const
Definition: displacemodel.h:125
void collectVesselStats(int step, const VesselStats &stats)
Definition: displacemodel.cpp:965
void collectPopBenthosMeanWeight(int step, int node_idx, int funcid, double meanweight)
Definition: displacemodel.cpp:723
void collectNodePopStats(int tstep, int node_idx, const QList< double > &stats, const QList< double > &stats_w, double tot, double wtot)
Definition: displacemodel.cpp:543
void setInterestingPop2(int n)
Definition: displacemodel.cpp:1782
int getUseStaticPaths() const
Definition: displacemodel.cpp:437
Definition: harbourdata.h:29
void collectFishfarmFishMeanWeight(int step, int node_idx, int farmid, int farmtype, double meanw_kg)
Definition: displacemodel.cpp:772
void set(T n)
Definition: interestinglist.h:15
bool importHarbours(QList< std::shared_ptr< HarbourData > > &list)
Definition: displacemodel.cpp:1230
bool isInterestingPop(int n)
Definition: displacemodel.cpp:1799
void errorParsingStatsFile(QString)
Definition: moc_displacemodel.cpp:159
int getSimulationSteps() const
Definition: displacemodel.cpp:421
bool initWindmill()
Definition: displacemodel.cpp:3273
int getNBBenthosPops() const
Definition: displacemodel.h:128
void addPenaltyToNodesByAddWeight(const QList< QPointF > &poly, double weight, double nbOfDaysClosedPerMonth, bool onQ1, bool onQ2, bool onQ3, bool onQ4, vector< bool > checkedMonths, const vector< int > &checkedVesSizes, vector< int > bannedMetiers)
Definition: displacemodel.cpp:1247
void setDissolvedCarbonFromFeature(OGRGeometry *geometry, double dissc)
Definition: displacemodel.cpp:1316
void setInterestingShips(int n)
Definition: displacemodel.h:285
const QList< types::NodeId > & getInterestingHarbours() const
Definition: displacemodel.h:322
void updateShip(int tstep, int idx, float x, float y, float course)
Definition: displacemodel.cpp:1632
void collectPhosphorus(int step, int node_idx, double phosphorus)
Definition: displacemodel.cpp:680
const QList< std::shared_ptr< HarbourData > > & getHarbourList() const
Definition: displacemodel.h:215
void clrInterestingShips()
Definition: displacemodel.h:288
void collectFishfarmEggsHarvestedKg(int step, int node_idx, int farmid, int farmtype, double eggs_harvested_kg)
Definition: displacemodel.cpp:798
void commitShipsStats(int tstep)
Definition: displacemodel.cpp:515
void setBenthosBiomassFromFeature(OGRGeometry *geometry, double bio)
Definition: displacemodel.cpp:1325
std::shared_ptr< Calendar > calendar() const
Definition: displacemodel.h:105
const QList< int > & getInterestingVessels() const
Definition: displacemodel.h:352
void collectPopCumcatchesWithThreshold(int step, int node_idx, double cumcatches_with_threshold)
Definition: displacemodel.cpp:580
bool isInterestingVessels(int n)
Definition: displacemodel.h:364
QString getHarbourId(int idx) const
Definition: displacemodel.cpp:366
HarbourStats retrieveHarbourIdxStatAtStep(int idx, int step)
Definition: displacemodel.cpp:1732
void collectShipNbTransportedUnits(int step, int node_idx, int shipid, int shiptype, double nb_transported_units)
Definition: displacemodel.cpp:874
void setCodeFromFeature(OGRGeometry *geometry, int code, std::function< void(std::shared_ptr< NodeData >, int)> func)
Definition: displacemodel.cpp:1346
int getNodesCount() const
Definition: displacemodel.cpp:371
QString outputName() const
Definition: displacemodel.h:115
bool isInterestingPop2(int n)
Definition: displacemodel.cpp:1804
void collectShipGHGemissiongPerkW(int step, int node_idx, int shipid, int shiptype, double GHG_emission_gperkW)
Definition: displacemodel.cpp:908
QList< std::shared_ptr< NodeData > > getAllNodesWithin(const QPointF ¢erpoint, double dist_km) const
Definition: displacemodel.cpp:382
void setInterestingSize(int n)
insert the pop into the list of interest for pops
Definition: displacemodel.cpp:1842
void collectPopCumsweptarea(int step, int node_idx, double cumsweptarea)
Definition: displacemodel.cpp:559
QString outDir() const
Definition: displacemodel.h:112
int tstep
Definition: main.cpp:205
const QList< std::shared_ptr< FishfarmData > > & getFishfarmList() const
Definition: displacemodel.h:166
bool loadFishfarmsFromDb()
Definition: displacemodel.cpp:3460
int getNbpops() const
Definition: config.cpp:108
void setSimulationSteps(int value)
Definition: displacemodel.cpp:432
Definition: displacemodel.h:80
void setInterestingPop(int n)
insert the pop into the list of interest for pops
Definition: displacemodel.cpp:1775
void setInterestingSizeMax(bool b)
Definition: displacemodel.h:298
void remInterestingWindfarms(int n)
Definition: displacemodel.h:280
void collectDissolvedCarbon(int step, int node_idx, double dissolvedcarbon)
Definition: displacemodel.cpp:694
bool initNations()
Definition: displacemodel.cpp:3414
void collectPopBenthosNumber(int step, int node_idx, int funcid, double benthosnumber)
Definition: displacemodel.cpp:712
void setSalinityFromFeature(OGRGeometry *geometry, double psu)
Definition: displacemodel.cpp:1288
void collectFishfarmFishHarvestedKg(int step, int node_idx, int farmid, int farmtype, double fish_harvested_kg)
Definition: displacemodel.cpp:786
Definition: vesseldata.h:152
const QList< std::shared_ptr< VesselData > > & getVesselsList() const
Definition: displacemodel.h:210
void remInterestingShips(int n)
Definition: displacemodel.h:286
const QList< std::shared_ptr< VesselData > > & getVesselList() const
Definition: displacemodel.h:161
~DisplaceModel()
Definition: displacemodel.cpp:133
void remInterestingPop(int n)
remove the pop from the list of interest for pops
Definition: displacemodel.cpp:1789
bool isModelLoaded() const
Definition: displacemodel.h:123
Definition: calendar.h:51
QString getFirmId(int idx) const
Definition: displacemodel.cpp:1664
Definition: mapsdataprovider.h:9
void commitNodesStatsFromSimu(int tstep, bool force=false)
Definition: displacemodel.cpp:524
Definition: shipsstats.h:8
bool initPopulations()
Definition: displacemodel.cpp:3369
void collectPopBenthosBiomassOverK(int step, int node_idx, int funcid, double benthosbiomassoverK)
Definition: displacemodel.cpp:735
const NationData & getNation(int idx) const
Definition: displacemodel.h:206
int getSzGrupsCount() const
Definition: displacemodel.h:131
void setNitrogenFromFeature(OGRGeometry *geometry, double nit)
Definition: displacemodel.cpp:1295
void clearAllNodes()
Definition: displacemodel.cpp:1044
Definition: displacemodel.h:84
bool loadVessels()
Definition: displacemodel.cpp:2441
void setSimulationName(const QString &name)
Definition: displacemodel.h:119
int getBenthosPopulationsCount() const
Definition: displacemodel.cpp:1727
void setInterestingHarb(types::NodeId n)
insert the pop into the list of interest for pops
Definition: displacemodel.cpp:1859
bool loadGraphs()
Definition: displacemodel.cpp:2995
void outputParsed()
Definition: moc_displacemodel.cpp:153
bool isInterestingFishfarms(int n) const
Definition: displacemodel.h:275
void setWdFromFeature(OGRGeometry *geometry, double wd, std::function< void(std::shared_ptr< NodeData >, int)> func)
Definition: displacemodel.cpp:1362
void updateFishfarm(int idx, float x, float y)
Definition: displacemodel.cpp:1674
const BenthosStatsContainer & getBenthosStatistics()
Definition: displacemodel.h:222
MapsDataProvider & getMapDataProvider()
Definition: displacemodel.cpp:141
const PopulationData & getPop(int idx) const
Definition: displacemodel.h:201
int getNumFishfarmsTypes() const
Definition: displacemodel.cpp:1824
const QList< std::shared_ptr< HarbourData > > & getHarboursList() const
Definition: displacemodel.h:144
QString getVesselId(int idx) const
Definition: displacemodel.cpp:1606
void setBenthosNbFromFeature(OGRGeometry *geometry, double bio, std::function< void(std::shared_ptr< NodeData >, double)> func)
Definition: displacemodel.cpp:1490
int getSzGroups() const
Definition: config.cpp:129
bool exportGraph(const QString &path)
Definition: displacemodel.cpp:1212
bool initBenthos()
Definition: displacemodel.cpp:3334
const QList< std::shared_ptr< ShipData > > & getShipList() const
Definition: displacemodel.h:183
Definition: harbourdata.h:46
ModelType modelType() const
Definition: displacemodel.h:90
int getNbbenthospops() const
Definition: config.cpp:118
std::shared_ptr< InterestingListWithSpecialValues< int > > getFunctionalGroupsList() const
Definition: displacemodel.h:303
void setLandscapeCodesFromFeature(OGRGeometry *geometry, int code)
Definition: displacemodel.cpp:1267
const QList< std::shared_ptr< PopulationData > > & getPopulationsList() const
Definition: displacemodel.h:200
void setScenario(const Scenario &scenario)
Definition: displacemodel.cpp:1746
void remInterestingNations(int n)
remove the pop from the list of interest for pops
Definition: displacemodel.h:343
void createFeaturesLayer()
Definition: displacemodel.cpp:146
void setStockNames(const QMap< QString, int > &names)
Definition: displacemodel.h:241
std::shared_ptr< InterestingListWithSpecialValues< int > > getShipsTypesList() const
Definition: displacemodel.h:312
void collectFishfarmCumulNetDischargeP(int step, int node_idx, int farmid, int farmtype, double fishfarm_cumulnetdischargeP)
Definition: displacemodel.cpp:861
Definition: displacemodel.h:71
const QList< T > & list() const
Definition: interestinglist.h:37
void setWindFromFeature(OGRGeometry *geometry, double wind)
Definition: displacemodel.cpp:1274
QString basepath() const
Definition: displacemodel.h:114
int getMetiersCount() const
Definition: displacemodel.h:192
QString linkedGraphFolder() const
Definition: displacemodel.h:460
DisplaceModel()
Definition: displacemodel.cpp:47
void collectShipfuelUseLitre(int step, int node_idx, int shipid, int shiptype, double fuel_use_litre)
Definition: displacemodel.cpp:925
bool removeNode(std::shared_ptr< NodeData > node)
Definition: displacemodel.cpp:1140
const QList< std::shared_ptr< NationData > > & getNationsList() const
Definition: displacemodel.h:205
void collectPopImpact(int step, int node_idx, int popid, double impact)
Definition: displacemodel.cpp:616
void setSalFromFeature(OGRGeometry *geometry, double sal, std::function< void(std::shared_ptr< NodeData >, int)> func)
Definition: displacemodel.cpp:1394
void collectShipPMEemissiongPerkW(int step, int node_idx, int shipid, int shiptype, double PME_emission_gperkW)
Definition: displacemodel.cpp:916
void checkStatsCollection(int tstep)
Definition: displacemodel.cpp:413
void collectFishfarmAnnualProfit(int step, int node_idx, int farmid, int farmtype, double fishfarm_annualprofit)
Definition: displacemodel.cpp:811
void setInterestingNations(int n)
insert the pop into the list of interest for pops
Definition: displacemodel.h:336
std::shared_ptr< SQLiteOutputStorage > getOutputStorage() const
Definition: displacemodel.h:474
bool isInterestingShips(int n) const
Definition: displacemodel.h:287
std::pair< box, unsigned > value
Definition: diffusion.cpp:30
bool saveScenario()
Definition: displacemodel.cpp:313
void setOutputName(const QString &name)
Definition: displacemodel.h:117
QString getFishfarmId(int idx) const
Definition: displacemodel.cpp:1659
std::shared_ptr< InterestingListWithSpecialValues< int > > getFishfarmsTypesList() const
Definition: displacemodel.h:306
void clrInterestingFishfarms()
Definition: displacemodel.h:276
bool initFirm()
Definition: displacemodel.cpp:3291
bool isShortestPathFolderLinked() const
Definition: displacemodel.h:454
void remInterestingFishfarms(int n)
Definition: displacemodel.h:274
bool loadNodes()
Definition: displacemodel.cpp:1884
void collectShipPMEemission(int step, int node_idx, int shipid, int shiptype, double PME_emission)
Definition: displacemodel.cpp:957
QString getWindmillId(int idx) const
Definition: displacemodel.cpp:1669
bool isInterestingBenthos(int n) const
Definition: displacemodel.h:269
int getBenthosCount() const
Definition: displacemodel.cpp:1708
void parseOutputStatsFile(QString file, int tstep)
Definition: displacemodel.cpp:1876
void clearInterestingPop()
Definition: displacemodel.cpp:1809
const QList< int > & getInterestingNations() const
Definition: displacemodel.h:332
void updateVessel(int tstep, int idx, float x, float y, float course, float fuel, int state)
Definition: displacemodel.cpp:1611
HistoricalDataCollector< ShipsStats > ShipsStatsContainer
Definition: displacemodel.h:77
void remInterestingSize(int n)
remove the pop from the list of interest for pops
Definition: displacemodel.cpp:1849
Definition: fishfarmsstats.h:8
const QList< std::shared_ptr< NodeData > > & getNodesList() const
Definition: displacemodel.h:148
QString linkedDatabase() const
Definition: displacemodel.h:122
void setSimulationSqlStorage(const QString &path)
Definition: displacemodel.cpp:339
void setInterestingSizeAvg(bool b)
Definition: displacemodel.h:294
Definition: mapobjectscontroller.h:91
void endCollectingStats()
Definition: displacemodel.cpp:539
int getBenthosIdx(int benthosId) const
Definition: displacemodel.cpp:349
void collectNitrogen(int step, int node_idx, double nitrogen)
Definition: displacemodel.cpp:673
QString getLastError() const
Definition: displacemodel.h:372
Definition: statsutils.h:4
void setPhosphorusFromFeature(OGRGeometry *geometry, double phos)
Definition: displacemodel.cpp:1302
bool isInterestingHarb(types::NodeId n)
Definition: displacemodel.cpp:1871
void setDissoFromFeature(OGRGeometry *geometry, double sal, std::function< void(std::shared_ptr< NodeData >, int)> func)
Definition: displacemodel.cpp:1458
const QList< int > & getInterestingPops() const
Definition: displacemodel.h:251
void updateWindmill(int idx, float x, float y)
Definition: displacemodel.cpp:1696
QString getShipId(int idx) const
Definition: displacemodel.cpp:1627
void setNitroFromFeature(OGRGeometry *geometry, double sal, std::function< void(std::shared_ptr< NodeData >, int)> func)
Definition: displacemodel.cpp:1410
void collectPopBenthosBiomass(int step, int node_idx, int funcid, double benthosbiomass)
Definition: displacemodel.cpp:701
Definition: displacemodel.h:84
bool parse(const QString &path, QString *basepath, QString *inputname, QString *outputname)
Definition: displacemodel.cpp:234
void clrInterestingBenthos()
Definition: displacemodel.h:270
const QList< int > & getInterestingPops2() const
Definition: displacemodel.h:252
const HarbourData & getHarbourData(int idx) const
Definition: displacemodel.h:216
void setAreaCodesFromFeature(OGRGeometry *geometry, int code)
Definition: displacemodel.cpp:1339
bool isInterestingSizeTotal() const
Definition: displacemodel.h:291
const VesselData & getVessel(int idx) const
Definition: displacemodel.h:211
bool addGraph(const QList< GraphBuilder::Node > &points, MapObjectsController *controller)
Definition: displacemodel.cpp:1053
const QList< displace::NodePenalty > getPenaltyCollection() const
Definition: displacemodel.h:452
bool isInterestingSizeMax() const
Definition: displacemodel.h:297
int getCurrentStep() const
Definition: displacemodel.h:246
bool isInterestingWindfarms(int n) const
Definition: displacemodel.h:281
QList< int > getInterestingFishfarms() const
Definition: displacemodel.h:272
void remInterestingHarb(types::NodeId n)
remove the pop from the list of interest for pops
Definition: displacemodel.cpp:1866
void updateNodesStatFromSimu(QString)
receive a Stats update for nodes from the Simulator
Definition: displacemodel.cpp:448
int getFirmCount() const
Definition: displacemodel.cpp:1648
void collectPopCumcatches(int step, int node_idx, double cumcatches)
Definition: displacemodel.cpp:573
Definition: populationdata.h:26
void remInterestingBenthos(int n)
Definition: displacemodel.h:268
void setUseStaticPaths(int value)
Definition: displacemodel.cpp:442
void collectFishfarmNetDischargeN(int step, int node_idx, int farmid, int farmtype, double fishfarm_netdischargeN)
Definition: displacemodel.cpp:823
void setBenthosNumberFromFeature(OGRGeometry *geometry, double nb)
Definition: displacemodel.cpp:1332
Definition: vesseldata.h:31
void commitVesselsStats(int tstep)
Definition: displacemodel.cpp:1037
bool initShips()
Definition: displacemodel.cpp:3052
const QList< std::shared_ptr< Benthos > > & getBenthosList() const
Definition: displacemodel.h:188
void clrInterestingWindfarms()
Definition: displacemodel.h:282
Definition: sqliteoutputstorage.h:37
void collectPopNbchoked(int step, int node_idx, double nbchoked)
Definition: displacemodel.cpp:601
const QList< int > & getInterestingSizes() const
Definition: displacemodel.h:300
bool isInterestingSize(int n)
Definition: displacemodel.cpp:1854
bool isInterestingSizeMin() const
Definition: displacemodel.h:295
bool isInterestingSizeAvg() const
Definition: displacemodel.h:293
Definition: displacemodel.h:84
void linkGraphFolder(QString path)
Definition: displacemodel.h:459
bool saveScenarioAs(const QString &path)
Definition: displacemodel.cpp:304
SpecialGroups
Definition: displacemodel.h:84
void collectPopCumsubsurfacesweptarea(int step, int node_idx, double cumsubsurfacesweptarea)
Definition: displacemodel.cpp:566
QString linkedShortestPathFolder() const
Definition: displacemodel.h:456
int getNumFuncGroups() const
Definition: displacemodel.cpp:1819
void collectPopBenthosNumberOverK(int step, int node_idx, int funcid, double benthosnumberoverK)
Definition: displacemodel.cpp:746
void rem(T n)
Definition: interestinglist.h:21
bool edit(QString modelname)
Definition: displacemodel.cpp:162
Definition: dbhelper.h:66
int addEdge(std::shared_ptr< NodeData > nodedata, types::NodeId targetidx, double weight)
DisplaceModel::addEdge.
Definition: displacemodel.cpp:1179
void setOxyFromFeature(OGRGeometry *geometry, double sal, std::function< void(std::shared_ptr< NodeData >, int)> func)
Definition: displacemodel.cpp:1442
QString simulationName() const
Definition: displacemodel.h:118
void remInterestingPop2(int n)
Definition: displacemodel.cpp:1794
bool initFishfarm()
Definition: displacemodel.cpp:3123
ModelType
Definition: displacemodel.h:79
void clearInterestingPop2()
Definition: displacemodel.cpp:1814
const ShipsStatsContainer & getShipsStatistics()
Definition: displacemodel.h:228
int getLastStep() const
Definition: displacemodel.h:247
bool has(T n) const
Definition: interestinglist.h:25
void updateFirm(int idx, float x, float y)
Definition: displacemodel.cpp:1685
QString fullpath() const
Definition: displacemodel.h:111
void collectShipSOxEmission(int step, int node_idx, int shipid, int shiptype, double SOx_emission)
Definition: displacemodel.cpp:941
void setPhosFromFeature(OGRGeometry *geometry, double sal, std::function< void(std::shared_ptr< NodeData >, int)> func)
Definition: displacemodel.cpp:1426
void setOxygenFromFeature(OGRGeometry *geometry, double oxygen)
Definition: displacemodel.cpp:1309
void collectOxygen(int step, int node_idx, double oxygen)
Definition: displacemodel.cpp:687
Definition: displacemodel.h:84
void collectShippingdensity(int step, int node_idx, double shippingdensity)
Definition: displacemodel.cpp:637
void collectPopCumcatchesPerPop(int step, int node_idx, int popid, double cumcatchesperpop)
Definition: displacemodel.cpp:623
QList< int > getInterestingBenthos() const
Definition: displacemodel.h:266
bool isGraphFolderLinked() const
Definition: displacemodel.h:458
void remInterestingVessels(int n)
remove the pop from the list of interest for pops
Definition: displacemodel.h:361
QString getOutDir() const
Definition: displacemodel.cpp:426
void setBenthosBioFromFeature(OGRGeometry *geometry, double bio, std::function< void(std::shared_ptr< NodeData >, double)> func)
Definition: displacemodel.cpp:1474
void setInterestingWindfarms(int n)
Definition: displacemodel.h:279
Definition: displacemodel.h:80
void linkShortestPathFolder(QString path)
Definition: displacemodel.h:455
void collectShipNOxEmissiongPerkW(int step, int node_idx, int shipid, int shiptype, double NOx_emission_gperkW)
Definition: displacemodel.cpp:891
void setInterestingSizeTotal(bool b)
Definition: displacemodel.h:292
void collectBathymetry(int step, int node_idx, double bathymetry)
Definition: displacemodel.cpp:630
void collectPopCumdiscardsratio(int step, int node_idx, double cumdiscardsratio)
Definition: displacemodel.cpp:594
void setSSTFromFeature(OGRGeometry *geometry, double sst)
Definition: displacemodel.cpp:1281
Definition: scenario.h:51
void collectShipFuelUseHour(int step, int node_idx, int shipid, int shiptype, double fuel_use_h)
Definition: displacemodel.cpp:883
void setInterestingBenthos(int n)
Definition: displacemodel.h:267
const QMap< QString, int > getStockNames() const
Definition: displacemodel.h:240
void commitFishfarmsStats(int tstep)
Definition: displacemodel.cpp:506
bool load(QString path, ModelType type)
Definition: displacemodel.cpp:175
QString getNodeId(int idx) const
Definition: displacemodel.cpp:376
void setInterestingVessels(int n)
Definition: displacemodel.h:354
Definition: displacemodel.h:81
int getPopulationsCount() const
Definition: displacemodel.cpp:1722