distr.optim {stratifyR} | R Documentation |
To implement the Dynamic Programming (DP) solution procedure on the stratification problem presented in the form of a Mathematical Programming Problem (MPP)
Description
This function uses the Dynamic Programming (DP) solution procedure in solving the objective function for the univariate stratification problem. It calculates the objective function values using the brute-force algorithm and stores those values in the matrices and keeps a copy in my_env so that a global minimum could be obtained.
Usage
distr.optim(k, n, incf, minYk, maxYk, isFirstRun = TRUE, my_env)
Arguments
k |
A numeric: number of strata |
n |
A numeric: is the distance*1000 |
incf |
A numeric: 10e-3 when k=1 and 10e-5 for k>=2 |
minYk |
A numeric: index to access minimum elements in the matrix |
maxYk |
A numeric: index to access maximum elements in the matrix |
isFirstRun |
A boolean: TRUE/FALSE parameter |
my_env |
My environment my_env has various constants and calculations stored from earlier opeartions through various other functions |
Value
returns the array filled with calculations of objective function values
Author(s)
Karuna Reddy <karuna.reddy@usp.ac.fj>
MGM Khan <khan_mg@usp.ac.fj>