edu.gmu.dparker3.sludge
Class LandCell

java.lang.Object
  extended byedu.gmu.dparker3.sludge.LandCell
All Implemented Interfaces:
ProfitabilityDrawable, TypeDrawable

public class LandCell
extends java.lang.Object
implements TypeDrawable, ProfitabilityDrawable

Version:
1.0
Author:
Robert Najlis

Field Summary
protected  int agent
           
protected  java.util.ArrayList expectedPriceHistory
           
protected  uchicago.src.sim.space.Object2DGrid landscape
           
protected  Mediator m
           
protected  java.util.ArrayList neighbors
           
protected  java.util.ArrayList productionHistory0
           
protected  java.util.ArrayList productionHistory1
           
protected  java.util.ArrayList profits0History
           
protected  java.util.ArrayList profits1History
           
protected  java.util.ArrayList reservationPriceHistory
           
protected  java.util.ArrayList transportCosts0
           
protected  java.util.ArrayList transportCosts1
           
protected  int type
           
protected  java.util.ArrayList typeHistory
           
protected  int x
           
protected  int y
           
 
Constructor Summary
LandCell()
           
LandCell(int x, int y, int type)
           
LandCell(int x, int y, int type, int agent)
           
LandCell(int x, int y, int type, int agent, uchicago.src.sim.space.Object2DGrid landscape, Mediator m)
           
 
Method Summary
 void calcProfits1()
           
 void calcSupplyInfo()
           
 void drawProfitability(uchicago.src.sim.gui.SimGraphics g)
          Invoked when the object should draw itself
 void drawType(uchicago.src.sim.gui.SimGraphics g)
          Invoked when the object should draw itself
 void findNeighbors()
           
 int getAgent()
           
 double getExpectedPrice()
           
 double getExpectedPrice(int index)
           
 int getLastType()
           
 java.util.ArrayList getNeighbors()
           
 double getProduction0()
           
 double getProduction0(int index)
           
 double getProduction1()
           
 double getProduction1(int index)
           
 double getProfits0()
           
 double getProfits0(int index)
           
 double getProfits1()
           
 double getProfits1(int index)
           
 double getReservationPrice()
           
 double getReservationPrice(int index)
           
 java.util.ArrayList getReservationPriceHistory()
           
 double getTransportCost0()
           
 double getTransportCost0(int index)
           
 double getTransportCost1()
           
 double getTransportCost1(int index)
           
 int getType()
           
 java.util.ArrayList getTypeHistory()
           
 int getX()
          Gets the x coordinate of this drawable.
 int getY()
          Gets the y coordinate of the this drawable.
static void main(java.lang.String[] args)
           
 void setAgent(int agent)
           
 void setExpectedPrice(double expPrice)
           
 void setProduction0(double qty)
           
 void setProduction1(double qty)
           
 void setProfits0(double p)
           
 void setProfits1(double p)
           
 void setReservationPrice(double resPrice)
           
 void setTransportCost0(double cost)
           
 void setTransportCost1(double cost)
           
 void setType(int type)
           
 void step()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x

protected int x

y

protected int y

agent

protected int agent

type

protected int type

landscape

protected uchicago.src.sim.space.Object2DGrid landscape

typeHistory

protected java.util.ArrayList typeHistory

productionHistory0

protected java.util.ArrayList productionHistory0

productionHistory1

protected java.util.ArrayList productionHistory1

reservationPriceHistory

protected java.util.ArrayList reservationPriceHistory

expectedPriceHistory

protected java.util.ArrayList expectedPriceHistory

profits0History

protected java.util.ArrayList profits0History

profits1History

protected java.util.ArrayList profits1History

neighbors

protected java.util.ArrayList neighbors

transportCosts0

protected java.util.ArrayList transportCosts0

transportCosts1

protected java.util.ArrayList transportCosts1

m

protected Mediator m
Constructor Detail

LandCell

public LandCell()

LandCell

public LandCell(int x,
                int y,
                int type)

LandCell

public LandCell(int x,
                int y,
                int type,
                int agent)

LandCell

public LandCell(int x,
                int y,
                int type,
                int agent,
                uchicago.src.sim.space.Object2DGrid landscape,
                Mediator m)
Method Detail

calcSupplyInfo

public void calcSupplyInfo()

calcProfits1

public void calcProfits1()

findNeighbors

public void findNeighbors()

getNeighbors

public java.util.ArrayList getNeighbors()

step

public void step()

getLastType

public int getLastType()

getType

public int getType()

setType

public void setType(int type)

getTypeHistory

public java.util.ArrayList getTypeHistory()

setReservationPrice

public void setReservationPrice(double resPrice)

getReservationPrice

public double getReservationPrice(int index)

getReservationPrice

public double getReservationPrice()

setExpectedPrice

public void setExpectedPrice(double expPrice)

getExpectedPrice

public double getExpectedPrice(int index)

getExpectedPrice

public double getExpectedPrice()

setProfits0

public void setProfits0(double p)

getProfits0

public double getProfits0(int index)

getProfits0

public double getProfits0()

setProfits1

public void setProfits1(double p)

getProfits1

public double getProfits1(int index)

getProfits1

public double getProfits1()

setProduction1

public void setProduction1(double qty)

getProduction1

public double getProduction1(int index)

getProduction1

public double getProduction1()

setProduction0

public void setProduction0(double qty)

getProduction0

public double getProduction0(int index)

getProduction0

public double getProduction0()

setTransportCost0

public void setTransportCost0(double cost)

getTransportCost0

public double getTransportCost0(int index)

getTransportCost0

public double getTransportCost0()

setTransportCost1

public void setTransportCost1(double cost)

getTransportCost1

public double getTransportCost1(int index)

getTransportCost1

public double getTransportCost1()

getReservationPriceHistory

public java.util.ArrayList getReservationPriceHistory()

getAgent

public int getAgent()

setAgent

public void setAgent(int agent)

getX

public int getX()
Description copied from interface: TypeDrawable
Gets the x coordinate of this drawable. Note that this should return the x coordinate in some space, not necessarily a screen coordinate.

Specified by:
getX in interface TypeDrawable

getY

public int getY()
Description copied from interface: TypeDrawable
Gets the y coordinate of the this drawable. Note that this should return the y coordinate in some space, not necessarily a screen coordinate.

Specified by:
getY in interface TypeDrawable

drawType

public void drawType(uchicago.src.sim.gui.SimGraphics g)
Description copied from interface: TypeDrawable
Invoked when the object should draw itself

Specified by:
drawType in interface TypeDrawable

drawProfitability

public void drawProfitability(uchicago.src.sim.gui.SimGraphics g)
Description copied from interface: ProfitabilityDrawable
Invoked when the object should draw itself

Specified by:
drawProfitability in interface ProfitabilityDrawable

toString

public java.lang.String toString()

main

public static void main(java.lang.String[] args)