Public Methods |
| | RAMShop (float cw, float cr, int N, float L, int D, int W, int lambda, JProgressBar progress) throws BadParamException |
| | Constructor. More...
|
| float | getCw () |
| | Returns wholesale price. More...
|
| void | setCw (float cw) throws BadParamException |
| | Sets wholesale price. More...
|
| float | getCr () |
| | Returns retail price. More...
|
| void | setCr (float cr) throws BadParamException |
| | Sets retail price. More...
|
| int | getN () |
| | Returns number of time stages. More...
|
| void | setN (int N) throws BadParamException |
| | Sets number of time stages. More...
|
| float | getL () |
| | Returns loss due to short supply. More...
|
| void | setL (float L) throws BadParamException |
| | Sets loss due to short supply. More...
|
| int | getD () |
| | Returns shop warehouse size. More...
|
| void | setD (int D) throws BadParamException |
| | Sets shop warehouse size. More...
|
| int | getW () |
| | Returns maximal RAM demand. More...
|
| void | setW (int W) throws BadParamException |
| | Sets maximal RAM demand. More...
|
| int | getLambda () |
| | Returns expected RAM demand. More...
|
| void | setLambda (int lambda) throws BadParamException |
| | Setss expected RAM demand. More...
|
| void | refreshTables () |
| | (Re)calculates optimal decisions. More...
|
| Solution | optimalDecision (int q) |
| | Returns optimal decision. More...
|
| Solution | optimalDecision (int q, int i) |
| | Returns optimal decision in given stage. More...
|
Private Methods |
| void | maximalUtility (float[][] u, int stage) |
| | Calculates maximal utility in given stage. More...
|
| void | sumUtility (float[][] u, int stage) |
| | Summarizes utilities of current and next stages. More...
|
| double | poissonDistribution (int w) |
| | Returns Poisson distribution for given value. More...
|
Private Attributes |
|
float | cw |
| | wholesale price of one RAM unit.
|
|
float | cr |
| | retail price of one RAM unit.
|
|
int | N |
| | number of time stages.
|
|
float | L |
| | loss due to short supply of one RAM unit.
|
|
int | D |
| | shop warehouse size in RAM units.
|
|
int | W |
| | maximal RAM demand.
|
|
int | lambda |
| | expected RAM demand.
|
|
int [][] | optimald |
| | optimal supply decision ([stage][number of unsold units]).
|
|
float [][] | optimalu |
| | maximal utility ([stage][number of unsold units]).
|
|
int | lastW |
| | last demand used for probability calculation.
|
|
double | probabilityW |
| | last probability.
|
|
JProgressBar | progress |
| | progress bar to indicate that calculations are being performed.
|