Class XCSFirm
java.lang.Object
|
+--Firm
|
+--XCSFirm
- public class XCSFirm
- extends Firm
XCSFirm.java
* Murat Yildizoglu - Universite Montesquieu Bordeaux IV France
*
* Copyright (c) Murat Yildizoglu
* 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 Classifier System (XCS) based R&D investment
- Version:
- 1.0 April 2001
- Author:
- Murat Yildizoglu
- See Also:
Firm,
xcseco
|
Constructor Summary |
XCSFirm(double K0,
double prod0,
double cost0,
double d0,
double sigma_in0,
double delta0,
double rd0,
double r0,
double rd_min0,
int nbactionsXCS,
int maxPopSizeXCS,
double alphaXCS,
double betaXCS,
double gammaXCS,
double deltaXCS,
double theta_GAXCS,
int theta_delXCS,
double pXXCS,
double pMXCS,
double P_dontcareXCS,
double theta_subXCS,
double predictionIniXCS,
double fitnessIniXCS,
java.lang.String objectiveXCS)
Initializes and computes the firm's caracteristics given the caracteristics of
the industry to which it belongs. |
|
Method Summary |
void |
clean()
Frees the Classifier system for garbage collection |
void |
computeprivateEnvironment()
Computes the private Environment string.
|
int |
getChrDecode(int cc)
For Compatibility with GenFirm |
double |
getChrFitness(int cc)
|
double |
getDFittness()
Returns the variation of the fittness |
double |
getProfit()
Returns the total gross profit of the firm:
Profit = profit x K |
void |
learn(int date)
Firm communicates to its XCSeco the profit and asks it to learn
as a function of the specified objective. |
void |
setenv(java.lang.String S)
Complete the global environment of the firm
it must be completed by the specific environment
in the setrd() method |
void |
setrd(int t)
Compute RD rate using an XCS |
java.lang.String |
showFirm()
Formats the output for one XCSFirm. |
| 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 |
CS
public XCSeco CS
XCSFirm
public XCSFirm(double K0,
double prod0,
double cost0,
double d0,
double sigma_in0,
double delta0,
double rd0,
double r0,
double rd_min0,
int nbactionsXCS,
int maxPopSizeXCS,
double alphaXCS,
double betaXCS,
double gammaXCS,
double deltaXCS,
double theta_GAXCS,
int theta_delXCS,
double pXXCS,
double pMXCS,
double P_dontcareXCS,
double theta_subXCS,
double predictionIniXCS,
double fitnessIniXCS,
java.lang.String objectiveXCS)
- Initializes and computes the firm's caracteristics given the caracteristics of
the industry to which it belongs.
- Parameters:
K0 - Initial capital of the firmprod0 - Initial productivity of the firmcost0 - Unit using cost of capitald0 - Calibration parameter for the innovation processsigma_in0 - Standard deviation of innovative drawsdelta0 - Depreciation rate of capitalrd0 - NAr0 - Interest rate in the economyrd_min0 - Minimal RD invetment rate
Check the documentation of XCS (XCSConstants) for the signification
of the following parametersnbactionsXCS - maxPopSizeXCS - alphaXCS - betaXCS - gammaXCS - deltaXCS - theta_GAXCS - theta_delXCS - pXXCS - pMXCS - P_dontcareXCS - theta_subXCS - predictionIniXCS - fitnessIniXCS -
computeprivateEnvironment
public void computeprivateEnvironment()
- Computes the private Environment string.
You should define here the varibales that must
be used to observe the environment of the firm
setrd
public void setrd(int t)
- Compute RD rate using an XCS
- Overrides:
setrd in class Firm
- See Also:
XCSeco
setenv
public void setenv(java.lang.String S)
- Complete the global environment of the firm
it must be completed by the specific environment
in the setrd() method
- Overrides:
setenv in class Firm
- Parameters:
S - : global environment
learn
public void learn(int date)
- Firm communicates to its XCSeco the profit and asks it to learn
as a function of the specified objective.
- Overrides:
learn in class Firm
- Parameters:
objective - - See Also:
XCSeco
getProfit
public double getProfit()
- Returns the total gross profit of the firm:
Profit = profit x K
- Overrides:
getProfit in class Firm
clean
public void clean()
- Frees the Classifier system for garbage collection
- Overrides:
clean in class Firm
showFirm
public java.lang.String showFirm()
- Formats the output for one XCSFirm. It is used in LearnInd.
- Overrides:
showFirm in class Firm
getChrDecode
public int getChrDecode(int cc)
- For Compatibility with GenFirm
- Overrides:
getChrDecode in class Firm
- Parameters:
cc -
getChrFitness
public double getChrFitness(int cc)
- Overrides:
getChrFitness in class Firm
getDFittness
public double getDFittness()
- Returns the variation of the fittness
- Overrides:
getDFittness in class Firm
- Following copied from class:
Firm
- See Also:
GenFirm