0
$\begingroup$

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 ?

$\endgroup$
3
  • $\begingroup$ I've removed SubscriptBoxes for clarity, they formed more than half the code. $\endgroup$
    – Feyre
    Commented Aug 30, 2016 at 8:53
  • $\begingroup$ I've done something similar on a smaller scale, and for the pivot I just had the student input the row and column, then press a button that applies the row operations accordingly. For inputting the pivot, I just used two PopupMenus and then Button to apply the row operations. $\endgroup$
    – J_Nat
    Commented Aug 30, 2016 at 14:29
  • $\begingroup$ You could check out the first part of my answer for some inspiration as well ;) $\endgroup$
    – J_Nat
    Commented Aug 30, 2016 at 15:19

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.