|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Panel
|
+--java.applet.Applet
|
+--javax.swing.JApplet
|
+--LearnInd
LearnInd.java
A java Applet-Application for simulating industries composed of NWFirms, GenFirms and XCSFirms.
NWFirms use a fixed R&D rule as in Nelson & Winter (1982).
GenFirms use a Genetic Algorithm to adjust their RD/Profit ratio to industry
conditions.
XCSFirms use a XCS for learning.
When used as an application, LearnInd can save data on files xxx.*
where xxx is the radical fixed in the initialisation panel.
Firm,
NWFirm,
GenFirm,
XCSFirm, Serialized Form| Inner classes inherited from class javax.swing.JApplet |
javax.swing.JApplet.AccessibleJApplet |
| Inner classes inherited from class java.applet.Applet |
java.applet.Applet.AccessibleApplet |
| Inner classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
| Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| Field Summary | |
boolean |
autoFlush
|
Cadre |
learnindCadre
The user interface |
int |
LearnRate
Learning rate of GenFirms |
ResultsWindow |
results
The output Window |
| Fields inherited from class javax.swing.JApplet |
accessibleContext, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
LearnInd()
|
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
The main part of the application. Following the push of the Compute Button it reads the provided values of the parameters and starts the simulation. If the button Stop is pushed, it closes all open streams and closes the application. |
void |
close_file(java.io.PrintWriter s)
An utility to close opened files. |
void |
closeAllFiles()
|
void |
closeSimFiles()
|
void |
computeEnv()
Computes the Environment string to pass to XCSFirms' R&D rates. |
java.io.PrintWriter |
create_file(java.lang.String s)
A utility to create new files for recording. |
void |
DataGen(int i0)
Computes the shares of each type of firm in Total Capital and in Total cumulated profits and other relative or average performance measures. |
double |
demand(double s)
Computes the market price for the short term equilibrium. |
void |
IndProd()
Computes the average and maximal productivities in the industry. The average productivity is used in the measure of the tecnological performance of industries. The maximal productivity conditions the imitation of firms |
double |
IndSupply()
Computes the total supply of the industry and the shares of each type of firms in this supply |
void |
init()
Initializes the interface. |
void |
InitDataGen()
Initializes the variables that will be used to record the performance of the industry and the firms. |
void |
initEnv()
Initializes the ENV table for computing the global environment that will be used by the XCSFirms |
void |
isChampion(int i0)
Determines the champion of the industry (imax) |
void |
LearnInd()
An empty constructor. |
void |
printLog()
Prints the log file that contains the description of the parameter values and the output files |
void |
report()
Saves all the output of the model in the corresponding panels and files (if fileoutput is chosen) and generates the data for the ResultsWindow. |
| Methods inherited from class javax.swing.JApplet |
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, remove, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
| Methods inherited from class java.applet.Applet |
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop |
| Methods inherited from class java.awt.Panel |
addNotify |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setFont, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public Cadre learnindCadre
public ResultsWindow results
public int LearnRate
public boolean autoFlush
| Constructor Detail |
public LearnInd()
| Method Detail |
public void LearnInd()
public void init()
init in class java.applet.Appletpublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenere - Determines the button used in CadreCadrepublic void initEnv()
public void computeEnv()
public double IndSupply()
public void IndProd()
Firmpublic void InitDataGen()
public void DataGen(int i0)
i0 - The index of the firm under scrunitypublic void isChampion(int i0)
i0 - The index of the firm to testpublic double demand(double s)
s - Total supplypublic void report()
ResultsWindowpublic void printLog()
public void closeAllFiles()
public void closeSimFiles()
public void close_file(java.io.PrintWriter s)
s - The file to closepublic java.io.PrintWriter create_file(java.lang.String s)
s - The name of the file to create
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||