Marine systems simulation
VerticalAbioticEnvironment.h
1#ifndef VERTICAL_ABIOTIC_ENVIRONMENT_H
2#define VERTICAL_ABIOTIC_ENVIRONMENT_H
3
4#include <algorithm>
5#include <iostream>
6#include <string>
7#ifdef WIN32
8#include <io.h>
9#define access _access
10#endif
11
12#include <Eigen/Eigen>
13#include <unordered_map>
14#include <CPrintDuringExec.h>
15//#include <SimObject.h>
16#include <CIntegratorOptions.h>
17#include "fish/eigen_matrix_defs.h" //Consider fixing this with includes in cmakelists file
18#include <CFhSimMgr.h>
19#include <string>
20#include "CEnvironment.h"
21#ifdef FH_VISUALIZATION
22 //#include "sfh/ogre/C3DLine.h"
23#endif
24
38 class VerticalAbioticEnvironment : public SimObject
39 {
40 public:
41 VerticalAbioticEnvironment(std::string simObjectName, ISimObjectCreator *creator);
43 std::vector<std::string> SplitString(std::string sData,std::string separator);
44 void GetLightDatasetFromSlagstadModel(double latitude, double attenuationCoeff, double backgroundRadiation, int startDayOfYear,int endDayOfYear, double** dataSet,std::string lightIntFileLocationFolder);
45 virtual void OdeFcn(const double T, const double *const X, double *const XDot, const bool isMajorTimeStep);
46 virtual void getValueAndGradient(std::string dataType,Fish::vec3 position, double* valueAndGradient);
47 //virtual void InitialConditionSetup(const double T, const double *const currentIC, double *const updatedIC, ISimObjectCreator *const creator);
48 //void FinalSetup(const double T, const double *const X, ISimObjectCreator *const creator);
49
50#ifdef FH_VISUALIZATION
52 virtual void RenderInit(Ogre::Root *const ogreRoot, ISimObjectCreator *const creator);
54 virtual void RenderUpdate(const double T, const double *const X);
55#endif
56
57
58 protected:
59 // Functions
60 virtual double ArtificialLightEffect(Fish::vec3 position);
61
62 // Parameters
63 double m_verticalResolution;
64 double m_timeResolution;
65 int m_verticalDimension;
66 int m_timeDimension;
67 double* m_times;
68 double* m_depths;
69 std::unordered_map<std::string,int> m_dataTypes;
70 std::vector<double**> m_fullDatasets;
71 std::vector<double*> m_presentStates;
72 double m_timeOfLastUpdate;
73
74 // Artificial light parameters
80
81 ISimObjectCreator* m_creator;
82
83#ifdef FH_VISUALIZATION
84
85#endif
86
87 };
88#endif
Definition: VerticalAbioticEnvironment.h:39
Fish::vec3 * m_artificialLightPositions
Positions (NED) of artificial lights placed in system (m,m,m)
Definition: VerticalAbioticEnvironment.h:76
double m_artificialLightBaseIntensity
Base light intensity leve of source; considered static at this value within m_lightSourceRadius from ...
Definition: VerticalAbioticEnvironment.h:79
std::vector< double * > m_presentStates
Array containing present environmental state value.
Definition: VerticalAbioticEnvironment.h:71
double m_artificialLightAttenuationFactor
Factor determining attenuation of light intensity when passing through light (should be frequency dep...
Definition: VerticalAbioticEnvironment.h:77
double m_artificialLightSourceRadius
Radius of the light source, i.e. may be represented by the bulb radius (m)
Definition: VerticalAbioticEnvironment.h:78
std::vector< double ** > m_fullDatasets
Dataset spanning depth x time.
Definition: VerticalAbioticEnvironment.h:70
int m_artificialLightNumber
Number of artificial lights placed in system (#)
Definition: VerticalAbioticEnvironment.h:75