dd.sim
Class CostTable
java.lang.Object
dd.sim.SimObject
dd.sim.CostTable
- All Implemented Interfaces:
- java.io.Serializable
- public class CostTable
- extends SimObject
The CostTable class is an ordinary SimObject with convenience
functions that stores a database of proposal configurations and
their costs. It is implemented as a set of four synched ArrayList
attributes containing the proposal's family, economic cost, social
cost, and configSum (a short String that codes for a particular
configuration of the proposal). The CostTable implements functions
that return the economic or social cost of a proposal
configuration, tell whether any configurations of a proposal are
affordable under a particular budget, and return an exhaustive list
of the configurations of a proposal.
- See Also:
- Serialized Form
Method Summary |
void |
addEntry(java.lang.String configSum,
java.lang.String family,
int econCost,
int socialCost)
|
boolean |
anyAffordable(java.lang.String family,
float econBudget,
float socialBudget)
|
java.util.ArrayList |
getAllConfigs(java.lang.String family)
|
int |
getEconCost(java.lang.String family,
java.lang.String config)
|
int |
getSocialCost(java.lang.String family,
java.lang.String config)
|
static void |
main(java.lang.String[] args)
|
Methods inherited from class dd.sim.SimObject |
addPropertyChangeListener, addPropertyChangeListener, debug, duplicate, error, fatal, filter, filter, firePropertyChange, getAttribute, getAttribute, getAttributes, getGlobalAttribute, getObjectAttribute, getObjectAttribute, incrementAttribute, incrementAttribute, isSet, log, out, readFromXML, readFromXML, removeAttribute, removePropertyChangeListener, setAttribute, setAttribute, setAttribute, setAttributes, setGlobalAttribute, warning, writeText, writeXML, writeXML |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CostTable
public CostTable()
getAllConfigs
public java.util.ArrayList getAllConfigs(java.lang.String family)
getEconCost
public int getEconCost(java.lang.String family,
java.lang.String config)
getSocialCost
public int getSocialCost(java.lang.String family,
java.lang.String config)
anyAffordable
public boolean anyAffordable(java.lang.String family,
float econBudget,
float socialBudget)
addEntry
public void addEntry(java.lang.String configSum,
java.lang.String family,
int econCost,
int socialCost)
main
public static void main(java.lang.String[] args)