Readme

This applet is designed as GUI for RAM Shop optimization: it collects optimization parameters and forms required charts as output. For more information about optimization, refer to "Optimal Ordering of Supplies" chapter in "A Set of Examples of Global and Discrete Optimization 2" book by J. Mockus.

All 3 optimization stages are implemented: uncertain demand, uncertain wholesale price and market elsaticity. First optimization is allways performed, other two can be switched on and off by corrensponding check boxes. In case of uncertain wholesale price, wholesale price as uncertain demand optimization parameter doesn' t make sense and is disabled. Respectively, if market elasticity is enabled, retail price and expected demand parameters in uncertain demand are disbaled.

If wholesale price is uncertain, discrete approximation must be used to integerate wholesale price (see "Discrete Approximation" chaper in above-mentioned J.Mockus book). That adds 2 parameters for uncertain wholesale price optimization: integration step and interval range rule. Integration step speaks for itself. Interval range rule can be set to 2 of 3, meaning that wholesale price will be integrated in interval from -2σ to or from -3σ to .

When desirable parameters are set, optimization tables must be built. This action must be performed at least once. If later you change some parameters, tables must be build again, before those changes will be reflected in charts.

X axis value source for charts can be set as number of unsold units, time stage or wholesale price, so other 2 must have discrete values (chart series). Y axis value source can be set as supply, utility or retail price. If uncertain wholesale price optimization is disabled, wholesale price can't be selected as X value, since it is constant. The same goes with market elasticity and retail price as Y value. Charts can have arbitrary number or series. When all series are defined (series list is populated), charts from data of optimization tables can be built according to X, Y and series options.

Be aware, that optimization requires considerable ammounts of cumputing resouses, inclding CPU cycles and RAM (though this applet won't help you optimize RAM purchase ;) - it is meant for reselling). Estimated memory size is reported before each build of optimization tables. CPU is heavily loaded because of 6 nested cycles, that are core of this optimization. All 6 cycles are used only if all 3 optimization stages are used, so disabling 1 or 2 stages ( uncertain wholesale price and/or market elasticity ) will speed up optimization.

Some additional derivative parameters ( minimal demand, maximal demand, minimal wholesale price, maximal wholesale price and wholesale price integration step count) are available in Java console after each build of optimization tables. Also note, that if all your Y values are equal, chart won't be created. This is a bug of JOpenChart library and can be overcome if other charting library is used. The same bug takes effect if chart has only 1 X value.

Applet