edu.gmu.dparker3.sludge
Class SupplyInfo
java.lang.Object
edu.gmu.dparker3.sludge.SupplyInfo
- public class SupplyInfo
- extends java.lang.Object
holds all supply records for one time step, organizes them so they are in correct order
sums qty so far (breakpoints) for all records. Also gets expecterd prices
- Version:
- 1.0
- Author:
- Robert Najlis
|
Field Summary |
protected java.util.LinkedList |
supplyList
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
supplyList
protected java.util.LinkedList supplyList
SupplyInfo
public SupplyInfo()
calcExpectedPrice
public void calcExpectedPrice()
resPrice2QtyDemanded
public double resPrice2QtyDemanded(double resPrice)
qtyDemanded2ExpectedPrice
public double qtyDemanded2ExpectedPrice(double qty)
update
public void update(double resPrice,
double qty)
- add a supply record
if that res price already exists, then update the existing re price with the added production
if not, add this supply record in the appropriate place
createBreakpoints
public void createBreakpoints()
sumQuantities
public void sumQuantities()
toString
public java.lang.String toString()
main
public static void main(java.lang.String[] args)