Class GenFirm

java.lang.Object
  |
  +--Firm
        |
        +--GenFirm

public class GenFirm
extends Firm

GenFirm.java
* Murat Yildizoglu - Universite Montesquieu Bordeaux IV FRANCE
Copyright (c) Murat Yildizoglu, 2000-2001
Permission to use, copy, modify, and distribute this
software and its documentation for NON-COMMERCIAL purposes
and without fee is hereby granted provided that this
copyright notice appears in all copies.
*************************************************************
An evolutionnary firm inspired by Nelson and Winter (1982) but enriched by genetic algorithm based R&D investment

Version:
2.3 May 2001
Author:
Murat Yildizoglu
See Also:
Firm, genetic

Fields inherited from class Firm
type
 
Constructor Summary
GenFirm(double K0, double prod0, double cost0, double d0, double sigma_in0, double delta0, double rd0, int g0, int c0, double xover0, double mutate0, int nxover0, boolean elitism0, double r0, double rd_min0, int learnrate0)
          Initializes and computes the firm's caracteristics given the caracteristics of the industry to which it belongs.
 
Method Summary
 void clean()
          Frees the Genetic algorithm for garbage collection
 int getChrDecode(int cc)
          Decodes the actual chromosome in order to obtain the corresponding RD ratio.
 double getChrFitness(int cd)
          Provies the fitness of a particular chromosome
 double getDFittness()
          Returns the average fittness difference between last two populations of rules (chromosomes).
 double getProfit()
          Total profit of the firm profit_rate*K
 void learn(int date)
          Abstract methods for compatibility with XCSFirm.
 void setenv(java.lang.String S)
           
 void setrd(int t)
          Compute RD following a GA rule where the fittness is provided by the average profit rate of the learning period
 java.lang.String showFirm()
          Formats the output for one GenFirm.
 
Methods inherited from class Firm
computeprofit, getdprim, getdprin, getinvestRD, getKapital, getprod, getProfitRate, getrd, imitate, innovate, investK, investRD, isactive, saveprofit, supply
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenFirm

public GenFirm(double K0,
               double prod0,
               double cost0,
               double d0,
               double sigma_in0,
               double delta0,
               double rd0,
               int g0,
               int c0,
               double xover0,
               double mutate0,
               int nxover0,
               boolean elitism0,
               double r0,
               double rd_min0,
               int learnrate0)
Initializes and computes the firm's caracteristics given the caracteristics of the industry to which it belongs.
Parameters:
K0 - Initial capital of the firm
prod0 - Initial productivity of the firm
cost0 - Unit using cost of capital
d0 - Calibration parameter for the innovation process
sigma_in0 - Standard deviation of innovative draws
delta0 - Depreciation rate of capital
rd0 - NA
g0 - Number of genes
c0 - Number of chromosomes
xover0 - Crossover rate
mutate0 - Mutations rate
nxover0 - Number of crossover points
elitism0 - Elitist GA (true) or not (false)
r0 - Interest rate in the economy
rd_min0 - Minimal RD invetment rate
Method Detail

setrd

public void setrd(int t)
Compute RD following a GA rule where the fittness is provided by the average profit rate of the learning period
Overrides:
setrd in class Firm
Parameters:
t - : the time period

getProfit

public double getProfit()
Total profit of the firm profit_rate*K
Overrides:
getProfit in class Firm

getChrDecode

public int getChrDecode(int cc)
Decodes the actual chromosome in order to obtain the corresponding RD ratio.
Overrides:
getChrDecode in class Firm
Parameters:
cc - The chromosome to decode

getDFittness

public double getDFittness()
Returns the average fittness difference between last two populations of rules (chromosomes).
Overrides:
getDFittness in class Firm
Following copied from class: Firm
See Also:
GenFirm

getChrFitness

public double getChrFitness(int cd)
Provies the fitness of a particular chromosome
Overrides:
getChrFitness in class Firm
Parameters:
cd - The chromosome for which the fitness is asked

clean

public void clean()
Frees the Genetic algorithm for garbage collection
Overrides:
clean in class Firm
See Also:
genetic

showFirm

public java.lang.String showFirm()
Formats the output for one GenFirm. It is used in LearnInd.
Overrides:
showFirm in class Firm

setenv

public void setenv(java.lang.String S)
Overrides:
setenv in class Firm

learn

public void learn(int date)
Description copied from class: Firm
Abstract methods for compatibility with XCSFirm.
Overrides:
learn in class Firm
Following copied from class: Firm
See Also:
XCSFirm