Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

AgentLandOwner.h

Go to the documentation of this file.
00001 //------------------------------------------------------------------------------
00002 //
00003 //  Thomas Berger (main author), Pepijn Schreinemachers, and Thorsten Arnold
00004 //
00005 //
00006 //  Hohenheim University (490d)
00007 //  Professorship for Land Use Economics in the Tropics and Subtropics
00008 //
00009 //  May not be distributed without permission by main author
00010 //
00011 //  File:       AgentLandOwner.h (formerly agentL.h)
00012 //
00013 //  Contents:   Header of non-agricultural landowner class that is derived
00014 //              from the basic class "agent"
00015 //
00016 //
00017 //------------------------------------------------------------------------------
00018 
00019 
00020 #ifndef _AgentLandOwner_h
00021 #define _AgentLandOwner_h
00022 
00023 
00024 #include "Agent.h"
00025 #include "AgentParcelList.h"
00026 
00027 
00028 class agentL : public agent
00029 {  protected:
00030 
00031         int farbe;               //color of plots in maps (max. 56 colors)
00032 
00033         int fl_anzahl;        //total number of parcels
00034    int* parzellen;      //pointer to parcels of different soil types
00035 
00036         p_liste bflaech;     //list of own parcels
00037    MatrixDouble wr;           //water rights
00038 
00039         double* erw_N_i;     // expected net water delivery
00040         double* N_i;         // real net water delivery
00041         double* erw_Ext_i;   // expected additional water delivery
00042         double* Ext_i;       // real additional water delivery
00043    double* WPa_i;       // monthly net water rented
00044 
00045    double pacht;        //rental payment
00046 
00047    public:
00048 
00049    //Constructor
00050    agentL(int agid, int scid, int skid, int numP);
00051 
00052    //Destructor
00053         virtual ~agentL()
00054         {  delete [] parzellen;
00055       wr.deallokieren();
00056 
00057       /* TODO 1 -oBerger -cNote : switch for hydrology module */
00058       if(typeHydroNull != HYDRO_MDL() )
00059       {  delete [] erw_N_i;
00060          delete [] N_i;
00061          delete [] erw_Ext_i;
00062          delete [] Ext_i;
00063          delete [] WPa_i;
00064       }
00065         }
00066 
00067    //Member functions
00068    virtual int get_farbe();
00069    virtual void set_farbe(int clr56);
00070 
00071    virtual int getNumberOfParcels();
00072    virtual void setNumberOfParcels(int numP);
00073    virtual int checkNumPlots();
00074    virtual int get_parzellen(int sType);
00075    virtual void set_parzellen(int sType, int numP);
00076 
00077    virtual void set_bflaech_verpachtet(int r, int c);
00078    virtual void make_bflaech(int c, int r, int typ, int fst, double dst);
00079    virtual int get_bflaech_anzahl();
00080    virtual void bflaechen_printOnScreen();
00081    virtual void bflaech_einfuegen(parzelle*);
00082    virtual int getNumPlotsInClass(int sClass);
00083 
00084    virtual double get_N_i(int month);
00085    virtual double get_WPa_i(int month);
00086    virtual void set_WPa_i(int month, double vol);
00087         virtual void waterrights_eintragen(int srcID, double share);
00088    virtual void hole_durchs_waterrights(w_rechte*);
00089         virtual void waterrights_austragen(w_rechte*);
00090         virtual void printOnScreenWaterRights();
00091 
00092         virtual double receiveNetInflows(int month, int = true);//Flag (save sector values yes/no) //renamed from <N_berechnen>
00093    virtual double receivePlantWaterDemandsSatisfied(int month);
00094 
00095    virtual void makeVirtualWaterExpectation();
00096    virtual void ausserldw_angebote();
00097 
00098    virtual void writeAgtIdEntry(FILE* stream);
00099    virtual void writeAgtWaterData(int month);
00100 };
00101 
00102 
00103 #endif

Generated on Thu Aug 28 12:38:44 2008 for MPMAS by  doxygen 1.3.9.1