RingModulator.h revision 10447:a465576671d4
1#ifndef __DSENT_MODEL_OPTICAL_RINGMODULATOR_H__
2#define __DSENT_MODEL_OPTICAL_RINGMODULATOR_H__
3
4#include "util/CommonType.h"
5#include "model/OpticalModel.h"
6#include "model/optical_graph/OpticalTransmitter.h"
7
8namespace DSENT
9{
10    class RingModulator : public OpticalModel, public OpticalTransmitter
11    {
12        public:
13            RingModulator(const String& instance_name_, const TechModel* tech_model_);
14            virtual ~RingModulator();
15
16        public:
17            // Set a list of properties' name needed to construct model
18            void initParameters();
19            // Set a list of properties' name needed to construct model
20            void initProperties();
21            // Set the transmitter specifications, returns whether it is possible
22            // to build a modulator that met those specs
23            bool setTransmitterSpec(double IL_dB_, double ER_dB_);
24            // Returns power of the transmitter at a given utilization
25            double getPower(double util_) const;
26
27        private:
28            // Precompute values based on tech parameters
29            void precomputeTech();
30            // Design ring modulator driver
31            bool designModulator(double IL_dB_, double ER_dB_);
32            // Calculate modulator energy
33            double calcModulatorEnergy() const;
34
35        protected:
36            // Build the model
37            virtual void constructModel();
38            virtual void updateModel();
39            virtual void useModel();
40            virtual void propagateTransitionInfo();
41
42        private:
43            // Some precomputed tech values
44            double m_precompute_V_bi_;
45            double m_precompute_x_d0_;
46            double m_precompute_C_j0_;
47            double m_precompute_Q_0_;
48
49
50    }; // class RingModulator
51} // namespace DSENT
52
53#endif // __DSENT_MODEL_OPTICAL_RINGMODULATOR_H__
54
55