|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrand.asset_forfeiture.GCalc
public abstract class GCalc
This class contains lots of the common functionality for KFixed, KVariable, and Benchmark. It is not meant to be implemented.
Constructor Summary | |
---|---|
GCalc()
The only constructor just initializes variableData |
Method Summary | |
---|---|
protected java.lang.Double |
alpha()
Accessor for alpha \returns the calculated alpha based on input values |
protected java.lang.String |
alphaString()
User-readable formula for alpha \returns a string with the formula used to calculate alpha |
protected java.lang.Double |
beta()
Accessor for beta \returns the calculated beta based on input values |
protected java.lang.String |
betaString()
User-readable formula for beta \returns a string with the formula used to calculate beta |
void |
calculateBase(javax.swing.JTextArea forDebuggers)
Does the calculations for the world as described, determining the values of any parameters needed for the excursion to a legals-only framework. |
void |
calculateExcursion(javax.swing.JTextArea forDebuggers)
Does the calculations for the world without illegal immigrants, including what the profits of the firm would be, how many workers of each type would be hired, etc. |
protected java.lang.Double |
delta()
Accessor for delta \returns the calculated value of delta based on input values |
protected java.lang.String |
deltaString()
User-readable formula for delta \returns a string with the formula used to calculate delta |
protected java.lang.Double |
epsilon()
Accessor for epsilon \returns the calculated value of epsilon based on input values |
protected java.lang.Double |
gamma()
Accessor for gamma \returns the calculated value of gamma based on input values |
protected java.lang.String |
gammaString()
User-readable formula for gamma \returns a string with the formula used to calculate gamma |
abstract java.lang.String |
getName()
The name of this particular ProfitCalculator. |
java.util.HashMap<variables,java.lang.Double> |
getOptimal()
While calculateExcursion does the calculations, this method returns the results, so you don't have to do both simultaneously. |
java.lang.String |
getTitle()
A nice header for printing out the results |
protected java.lang.Double |
K()
Accessor for K \returns the calculated K based on input values |
protected abstract java.lang.Double |
KOpt()
Accessor for optimal K \returns the optimized value of K |
protected abstract java.lang.String |
KOptString()
User-readable formula for optimal K \returns a string with the formula used to optimize K |
protected java.lang.String |
KString()
User-readable formula for K \returns a string with the formula used to calculate K |
abstract java.lang.Boolean |
needsVar(variables v)
Determines whether this implementation of ProfitCalculator requires a particular variable for its calculations. |
protected java.lang.Double |
omega()
Accessor for omega \return the calculated value of omega |
protected java.lang.String |
omegaString()
User-readable formula for omega \returns a string with the formula for omega |
protected abstract java.lang.Double |
phi3()
Accessor for optimal phi3 \returns the optimized value of phi3 |
protected abstract java.lang.String |
phi3String()
User-readable formula for optimal phi3 \returns a string with the formula used to optimize phi3 |
protected java.lang.Double |
pi()
Accessor for pi \returns pi |
protected java.lang.Double |
piOpt()
Accessor for the optimal pi \returns the optimal value of pi |
protected java.lang.String |
piOptString()
User-readable formula for the optimal pi \returns a string containing the formula used to optimize pi |
protected java.lang.Double |
PL1()
Accessor for PL1 \returns PL1 |
protected java.lang.Double |
PL2()
Accessor for PL2 \returns PL2 |
protected java.lang.Double |
PL3()
Accessor for PL3 \returns PL3 |
protected java.lang.Double |
PL4()
Accessor for PL4 \returns newPL3 |
protected java.lang.Double |
Pq()
Accessor for Pq \returns the calculated value of Pq based on input values |
protected java.lang.String |
PqString()
User-readable formula for Pq \returns a string with the formula used to calculate Pq |
static java.lang.String |
print(java.lang.Double d)
An alternative to print(Double, Boolean) that assumes d is not a currency. |
static java.lang.String |
print(java.lang.Double d,
java.lang.Boolean currency)
A method to standardize the look and feel of doubles in the DisplayPanel as well as the text outputs. |
protected java.lang.Double |
Q()
Accessor for Q \returns the calculated Q based on input values |
protected java.lang.Double |
QOpt()
Accessor for optimal Q \returns the optimized value of Q |
protected java.lang.String |
QOptString()
User-readable formula for the optimal Q \returns a string containing the formula used to optimize Q |
protected java.lang.String |
QString()
User-readable formula for Q \returns a string with the formula used to calculate Q |
protected java.lang.Double |
R()
Accessor for R \returns R |
protected java.lang.Double |
rho()
Accessor for rho \returns rho |
protected java.lang.Double |
rhoOpt()
Accessor for optimal rho \returns the optimal value of rho |
protected java.lang.String |
rhoOptString()
User-readable formula for rho \returns a string containing the formula used to optimize rho |
protected java.lang.Double |
ROpt()
Accessor for the optimal R \returns the optimized value of R |
void |
setNewPL3(double p)
Mutator to set an alternative value for PL3 based on BLS or domain knowledge. |
java.lang.Boolean |
setVals(java.util.HashMap<variables,java.lang.Double> vals)
This method will provide the inputs to the calculation in the form of a HashMap mapping an available variable to its value. |
java.lang.Boolean |
validate()
This method runs any input validation available for the ProfitCalculator. |
protected java.lang.Boolean |
validRange(java.lang.Boolean displayBox)
Tests for valid ranges of the technology parameters. |
protected java.lang.Double |
X1()
Accessor for X1 \returns L1 + 1 to avoid problems of having no L1 workers |
protected java.lang.Double |
X1Opt()
Accessor for optimal X1 \returns the optimal value of X1, unless that optimum is less than 1, in which case it returns 1 (real labor = X1 - 1) |
protected java.lang.String |
X1OptString()
User-readable formula for optimal X1 \returns a string containing the formula used to optimize X1 |
protected java.lang.Double |
X2()
Accessor for X2 \returns L2 + 1 to avoid problems of having no L2 workers |
protected java.lang.Double |
X3()
Accessor for X3 \returns L3 + 1 to avoid problems of having no L3 workers |
protected abstract java.lang.Double |
X3Opt()
Accessor for optimal X3 \returns the optimized value of X3, unless X3 < 1, in which case it returns one, since real labor = X3-1 |
protected abstract java.lang.String |
X3OptString()
User-readable formula for optimal X3 \returns a string with the formula used to optimize X3 |
protected java.lang.Double |
X4Opt()
Accessor for X4 \returns the optimal value of X4, unless that optimum is less than 1, in which case it returns 1 (real labor = X1 - 1) |
protected java.lang.String |
X4OptString()
User-readable formula for X4 \returns a string containing the formula used to optimize X4 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GCalc()
Method Detail |
---|
public abstract java.lang.Boolean needsVar(variables v)
ProfitCalculator
needsVar
in interface ProfitCalculator
public abstract java.lang.String getName()
ProfitCalculator
getName
in interface ProfitCalculator
public java.lang.String getTitle()
public java.lang.Boolean validate()
ProfitCalculator
validate
in interface ProfitCalculator
protected java.lang.Boolean validRange(java.lang.Boolean displayBox)
public java.lang.Boolean setVals(java.util.HashMap<variables,java.lang.Double> vals)
ProfitCalculator
setVals
in interface ProfitCalculator
public java.util.HashMap<variables,java.lang.Double> getOptimal()
ProfitCalculator
getOptimal
in interface ProfitCalculator
protected java.lang.Double X1()
protected java.lang.Double X2()
protected java.lang.Double X3()
protected java.lang.Double PL1()
protected java.lang.Double PL2()
protected java.lang.Double PL3()
protected java.lang.Double PL4()
protected java.lang.Double pi()
protected java.lang.Double R()
protected java.lang.Double rho()
protected java.lang.Double Q()
protected java.lang.String QString()
protected java.lang.Double K()
protected java.lang.String KString()
protected java.lang.Double alpha()
protected java.lang.String alphaString()
protected java.lang.Double beta()
protected java.lang.String betaString()
protected java.lang.Double gamma()
protected java.lang.String gammaString()
protected java.lang.Double delta()
protected java.lang.String deltaString()
protected java.lang.Double epsilon()
protected java.lang.Double Pq()
protected java.lang.String PqString()
protected abstract java.lang.Double KOpt()
protected abstract java.lang.String KOptString()
protected abstract java.lang.Double phi3()
protected abstract java.lang.String phi3String()
protected abstract java.lang.Double X3Opt()
protected abstract java.lang.String X3OptString()
protected java.lang.Double omega()
protected java.lang.String omegaString()
protected java.lang.Double X1Opt()
protected java.lang.String X1OptString()
protected java.lang.Double X4Opt()
protected java.lang.String X4OptString()
protected java.lang.Double rhoOpt()
protected java.lang.String rhoOptString()
protected java.lang.Double QOpt()
protected java.lang.String QOptString()
protected java.lang.Double piOpt()
protected java.lang.String piOptString()
protected java.lang.Double ROpt()
public void setNewPL3(double p)
setNewPL3
in interface ProfitCalculator
public static java.lang.String print(java.lang.Double d, java.lang.Boolean currency)
public static java.lang.String print(java.lang.Double d)
public void calculateBase(javax.swing.JTextArea forDebuggers)
ProfitCalculator
calculateBase
in interface ProfitCalculator
public void calculateExcursion(javax.swing.JTextArea forDebuggers)
ProfitCalculator
calculateExcursion
in interface ProfitCalculator
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |