edu.gmu.dparker3.sludge
Class LandCell
java.lang.Object
edu.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
|
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)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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
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)
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)