Here my object is purely pedagogical. When I was a student I hated linear programming because of the numerous operation we have to solve the simplest linear program. So now that I teach linear programming I refuse to let my student put off by calculation. I have found some free products that do what I want. But they are under Windows and some of my student use a mac.
So I have the following idea : why not construct a cdf with an initialy empty modifiable table that would be completed by the student according to the posed problem. When clicking on a cell the full table will be pivoted according to this choosen pivot --- that is the student must know the theory to choose the pivot not to concentrate on calculations. Then with a button he could ask to re-pivot.
But perhaps it is not possible to do such a cdf since one must enter some new information
With the help of an old post I have been able to construct the table
headers = {"x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9",
"x10", "x11", "b"};
rowLbls = {" ", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9",
"c10", "obj"};
valTbl = ConstantArray[0, {11, 12}];
MapThread[
Prepend, {Prepend[
Array[InputField[Dynamic@valTbl[[#1, #2]], Number,
FieldSize -> 3] &, {11, 12}], headers], rowLbls}] // TableForm
and to save the result in
A = Dynamic@valTbl
I hope to be able from A to pivot --- I have seen a LEpivot command and even without it I can manage it. But I wonder
1) how to save which is the pivot cell
2) to add a two buttons a) to pivot again b) to undo the pivot
In what concerns the cdf is this approach manageable ?
SubscriptBox
es for clarity, they formed more than half the code. $\endgroup$PopupMenus
and thenButton
to apply the row operations. $\endgroup$