A general simplex problem is given by a set of linear ineqalities, i.e. lw[i] <= sum{j=0..maxCol} m[i,j] * x[j] <= up[i] for i=0..maxRows. The initial linear equations are used to define "basic variables" y[i] in terms of the nonbasic variables x[j]. Since the role of basic and nonbasic variables is changed during the simplex algorithm, we use maps basic and nonbasic to map indices to the current variable, hence, e.g., basic[i]=j means that variable j is currently the i-th basic variable. Variables are generally identified with integers that are mapped via idx to their names. The arrays lower and upper denote lower and upper bounds, if these exists for the variables, and eval denotes their current value in the solution process.