edu.gmu.dparker3.sludge
Class SupplyInfo

java.lang.Object
  extended byedu.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
           
 
Constructor Summary
SupplyInfo()
           
 
Method Summary
 void calcExpectedPrice()
           
 void createBreakpoints()
           
static void main(java.lang.String[] args)
           
 double qtyDemanded2ExpectedPrice(double qty)
           
 double resPrice2QtyDemanded(double resPrice)
           
 void sumQuantities()
           
 java.lang.String toString()
           
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

supplyList

protected java.util.LinkedList supplyList
Constructor Detail

SupplyInfo

public SupplyInfo()
Method Detail

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)