Inout
|
02-06-2023, 02:26 PM
(This post was last modified: 02-06-2023 02:54 PM by Gil.)
Post: #10
|
|||
|
|||
RE: Inout
Yes, my "..." is character number 30.
I use it also quite a lot in my verbal explanations as in Simplex when saying, for instance from "a1, a2..., an", instead of repeated character "single dot". It enables to show more characters in a line. With your program, it's now easy to replace the bold characters to avoid the three rectangles relative to 19 CHR 1 CHR 19 CHR. I use also a lot the small square (larger than a do), character number 14, to start different paragraphs in my explanations inside a program. The same applies to "right triangle/large right arrow", character 134, relative to paragraphs in verbal explanation inside a program. That is easy to change, for instance replace it by a minus sign with SRPL, so that INOUT could make it the appropriate conversion. But a lot of work when the outlook of the original version, with character 14, is the want to keep in the program. Perhaps I should just use your program to replace the bold characters by <B> and, after execution, replace at the end "<B>" by an empty string "". Example, without INOUT, for prog —>GO of Directory program SIMPLEX, at line 12 starting with « (line 4 of the Matrix). { "« \"1 Arg: MATRIX [m+1 × n+2] m Row (In)Equalities n Var xi (0/<0/Free) & Z-Max/Min obj.funct at last Row m+1: [[1 0 0 0 0 'F' 0] [0 1 0 0 0 'F' 0] [0 1 0 0 0 'L' 9] [] [0 0 0 1 0 'E' 6] [] [Al1 Aln 'E' Cl] [Am1 Amn 'G' Cm] [ z1 zn C 0]] Letters F L E G (& possible number C): in Matrix Col n+1 'F' Free var xi0, <0 'L' Less 'E' Equal = 'G' Greater Numbers Ci (Cl,Cm) are free: 0 or 0 & in Col n+2 Input example & explanations: [[1 0 0 0 0 0 'F' 0] Free var x1:-<x1< Sign of xi unknown: x1 may be 0 or 0 [0 1 0 0 0 0 'F' 0] [0 1 0 0 0 0 'L' 9] 'x2 is Free but (L)9' 2 rows for -<x29! [0 0 1 0 0 0 'L' 8] var x3: 0! x3 8 & not -! x3 8, as by rule/default x3 (xi) alw. 0; for - x3 8 see above with F [0 0 0 1 0 0 'E' 6] var x4 = 6 [0 0 0 0 1 0 'L' 0] var x5:-< x5 0 [0 0 0 0 0 1 'L'-8] var x6:-< x6 -8 [0 0 0 0 0 0 1 'G'-9] var x7: -9 x7< & not: -9 x70! Contrarily to: [0 0 0 0 0 0 1 'L' 9] var x7: 0! x7 < 9 & not: -! x7 < 9 for - x7 9 see above with F [] [Ak1 Ako 'L' Ck] -< row k Ck [Al1Aln 'E' Cl] row l = Cl [Am1Amn 'G' Cm] Cm row m< [ z1 zn C 0 ]] or [ z1 zn C 'Max']] or [ z1 zn C 'Min']] for Z=z1x1+znxn+C Z-row in last row C(often 0) of Z in Col n+1 (not n+2!) 0 'Max' or 'Min': not important but in Col n+2 Rows order of the (In)Equalit. is free Only Z-coef must alw. be in last MatRow m+1 At 1st question further, reply: 1 for MAX or 0 for MIN & press ENTER For the other 5 less important questions: General sol (slow)1 * Only SIMPLEX sol 0 Lin comb:all xi0 1 Lin comb:allow x<00 Auto/direct exec 1 Step-by-step 0 Fractions/exact 1 * Fast (no fract.) 0 Full steps saved 1 * If lack of memory 0 choose 1/0 & ENTER (1 is default sett.) 0 to above * Quest. to speed up ( less details & no fract.) Save all your Matrixes in DATA Dir (last menu page) If lack of memory: choose option 0 for * above Still lack of memory delete some MATrix in DATA Dir delete this huge string & following DROP command delete NOTE & VERS Review data/results after output? Press (at 1st Page) INPUT.last SOL (details) S.1N (all vectors) S.LIN (exact solut) d.LIN (partial sol) Press (at 2nd Page) SLACK.ß (transform) RESULT¦Ci.rows OK? STEPS (details) About program Max: OK Min: should be OK \" DROP 'INPUT.last' STO 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 { } DUP 0 0 0 0 0 RCLF 0 0 0 0 0 0 { } 0 1 0 0 0 0 { } DUP Rnd STACK.full Auto MiMa.s m l.xi l.xi.s time m0 m00 minCi Zrow I J VECTßi step0 STEPS.xß l.check INP.cut Ci.sol I.INP F.l2 Jor l.xi.or fraction INPUTmod SOL fg SOL1 jj SLACK1.ß STEPS1 RESULT1.ROW xab row.prob.l Z xr1 table Ci ineq INPUTmod.OR xsF F.l « OPTION TICKS 'time' STO -100 CF RAD GO.NEXT » »" [b]Original program With only INOUT and your program "« \"1 Arg: <B>MATRIX [<B>m+1 × n+2<B>]<B> <B>m<B> <B>Row<B> (In)Equalities <B>n<B> Var xi (0<B>/<B><0<B>/<B>Free) & Z-Max/Min obj.funct at <B>last Row m<B>+<B>1<B>: [[1 0 0 0 0 '<B>F<B>' 0] [0 1 0 0 0 '<B>F<B>' 0] [0 1 0 0 0 '<B>L<B>' 9] [] [0 0 0 1 0 '<B>E<B>' 6] [] [Al1 Aln '<B>E<B>' Cl] [Am1 Amn '<B>G<B>' Cm] [ <B>z1<B><B> zn C<B> 0]] Letters <B>F L E G<B> (& possible number <B>C<B>): in Matrix Col <B>n+1<B> '<B>F<B>'<B> F<B>ree var <B>xi<B>0, <0 '<B>L<B>' <B>L<B>ess '<B>E<B>' <B>E<B>qual = '<B>G<B>'<B> G<B>reater Numbers <B>Ci<B> (Cl,Cm) are free: 0 or 0 & in Col <B>n+2<B> Input example & explanations: [[<B>1<B> 0 0 0 0 0 '<B>F<B>' 0] <B><I>F<B>ree var x1:<I>-<B><<B><I>x1<B><I><<B><I> Sign of xi unknown: x1<I> <I>may be <B><I>0<B><I> or <B><I>0<B> [0 <B>1<B> 0 0 0 0 '<B>F<B>' <B>0<B>] [0 <B>1<B> 0 0 0 0 '<B>L<B>' <B>9<B>] '<I>x2 is <B>F<B>ree but<I> <B><B>(<B>L<B>)<B>9<B>' <B><I>2 rows<B> for <I>-<B><<B><I>x2<B><I>9!<B> [0 0 <B>1<B> 0 0 0 '<B>L<B>' <B>8<B>] <I>var x3:<I> <I> <B><I>0! <B><I>x3 <B><I> 8<B><I> <I> & <B>not<B> -<B>! <B><I>x3 <B><I> 8<B>,<I> as by rule/default x3 (xi) alw. <B><I> 0<B>;<I> <I> <B>for<B> - <B> <B><I>x3 <B><I> 8<B><I> see above with <B><I>F <B> [0 0 0 <B>1<B> 0 0 '<B>E<B>' <B>6<B>] <I> var x4 <I>=<I> <B><I>6<B><I> <I> [0 0 0 0 <B>1<B> 0 '<B>L<B>' <B>0<B>] <I>var x5:<I>-<B>< <B><I>x5 <B><I> 0<B> <B> <B> [0 0 0 0 0 <B>1<B> '<B>L<B>'-<B>8<B>] <I>var x6:<I>-<B>< <B><I>x6 <B><I> <B><I>-<B><I>8<B> [0 0 0 0 0 0 <B>1 <B>'<B>G<B>'-<B>9<B>] <I> var x7: -<B><I>9 <B><I>x7<B><I><<B><B> <B>&<B> not<B>:<B> <B><I>-<B><I>9 <B><I>x7<B><I>0! <B> <B> Contrarily <B>to:<B> <B>[0 0 0 0 0 0 <B>1 <B>'<B>L<B>' <B>9<B>] <I>var x7:<B><I> 0! <B><I>x7 <B><I>< 9 <B>& <B>not<B>:<B> <B><I>-<I><B>! <B><I>x7 <B><I>< 9 <B><I> <I> <B>for<B> - <B> <B><I>x7 <B><I> 9<B><I> see above with <B><I>F <B> [] [Ak1 Ako '<B>L<B>' Ck] -<B>< <B><I>row k <B><I> <B><I>Ck <I> [Al1Aln '<B>E<B>' Cl] <I> row l <I>= <I>Cl <I> [Am1Amn '<B>G<B>' Cm] <I>Cm <B><I> <B><I>row m<B><I><<B><I> <I> [ z1 zn <B>C <B><U>0<B><U> <B>]] or [ z1 zn <B>C <B>'<U>Max<U>']] or [ z1 zn <B>C <B>'<U>Min<U>']] <I> for Z=z1x1+znxn+<B>C<B><I> <B>Z-row<B> in <B>last<B> <B>row <B> <B>C<B>(often 0) of Z in Col <B>n+1<B> (not n+2!) <U>0<U> '<U>Max<U>' or '<U>Min<U>': not important but in Col <B>n+2 <B> Rows order of the (In)Equalit. is free Only <B>Z-<B>coef must alw. be in <B>last<B> Mat<B>Row m+1 <B> At 1st question further, reply: <B>1<B> for <B>MAX<B> or <B>0<B> for <B>MIN<B> & press <B>ENTER <B> For the other 5 less important questions: General sol (slow)1 * <U>Only SIMPLEX sol 0<U> Lin comb:all xi0 1 <U>Lin comb:allow x<00<U> Auto/direct exec 1 <U>Step-by-step 0<U> Fractions/exact 1 * <U>Fast (no fract.) 0<U> Full steps saved 1 <B>*<B> If lack of memory 0 choose <B>1<B>/<B>0<B> & <B>ENTER<B> (1 is default sett.) <B>0<B> to above * Quest<B>.<B> to <B>speed up<B> ( less details & no fract.) <B> <B> <B>Save<B> all your Matrixes in <B>DATA<B> Dir (last menu page) If <B>lack<B> of <B>memory<B>: choose option <B>0<B> for <B>*<B> above Still <B>lack<B> of <B>memory<B> delete some MATrix in <B>DATA<B> Dir <B> <B><B> <B>delete this huge string & following <B>DROP<B> command delete <B>NOTE <B>&<B> VERS <B> <B>Review data/results<B> after output? Press (at 1st Page) <B>INPUT<B>.last <B>SOL <B>(details) <B>S.1N <B>(all vectors)<B> <B> <B>S.LIN <B>(exact solut)<B> <B> <B>d.LIN <B>(partial sol) Press (at 2nd Page) <B>SLACK<B>.ß (transform) <B>RESUL<B>T¦Ci.rows OK? <B>STEPS <B>(details)<B> <B> <B>About program<B> Max: OK Min: <B>should<B> be OK \" DROP 'INPUT.last' STO 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 { } DUP 0 0 0 0 0 RCLF 0 0 0 0 0 0 { } 0 1 0 0 0 0 { } DUP Rnd STACK.full Auto MiMa.s m l.xi l.xi.s time m0 m00 minCi Zrow I J VECTßi step0 STEPS.xß l.check INP.cut Ci.sol I.INP F.l2 Jor l.xi.or fraction INPUTmod SOL fg SOL1 jj SLACK1.ß STEPS1 RESULT1.ROW xab row.prob.l Z xr1 table Ci ineq INPUTmod.OR xsF F.l « OPTION TICKS 'time' STO -100 CF RAD GO.NEXT » »" And, at the end, deleting the "<B>“ "« \"1 Arg: MATRIX [m+1 × n+2] m Row (In)Equalities n Var xi (0/<0/Free) & Z-Max/Min obj.funct at last Row m+1: [[1 0 0 0 0 'F' 0] [0 1 0 0 0 'F' 0] [0 1 0 0 0 'L' 9] [] [0 0 0 1 0 'E' 6] [] [Al1 Aln 'E' Cl] [Am1 Amn 'G' Cm] [ z1 zn C 0]] Letters F L E G (& possible number C): in Matrix Col n+1 'F' Free var xi0, <0 'L' Less 'E' Equal = 'G' Greater Numbers Ci (Cl,Cm) are free: 0 or 0 & in Col n+2 Input example & explanations: [[1 0 0 0 0 0 'F' 0] <I>Free var x1:<I>-<<I>x1<I><<I> Sign of xi unknown: x1<I> <I>may be <I>0<I> or <I>0 [0 1 0 0 0 0 'F' 0] [0 1 0 0 0 0 'L' 9] '<I>x2 is Free but<I> (L)9' <I>2 rows for <I>-<<I>x2<I>9! [0 0 1 0 0 0 'L' 8] <I>var x3:<I> <I> <I>0! <I>x3 <I> 8<I> <I> & not -! <I>x3 <I> 8,<I> as by rule/default x3 (xi) alw. <I> 0;<I> <I> for - <I>x3 <I> 8<I> see above with <I>F [0 0 0 1 0 0 'E' 6] <I> var x4 <I>=<I> <I>6<I> <I> [0 0 0 0 1 0 'L' 0] <I>var x5:<I>-< <I>x5 <I> 0 [0 0 0 0 0 1 'L'-8] <I>var x6:<I>-< <I>x6 <I> <I>-<I>8 [0 0 0 0 0 0 1 'G'-9] <I> var x7: -<I>9 <I>x7<I>< & not: <I>-<I>9 <I>x7<I>0! Contrarily to: [0 0 0 0 0 0 1 'L' 9] <I>var x7:<I> 0! <I>x7 <I>< 9 & not: <I>-<I>! <I>x7 <I>< 9 <I> <I> for - <I>x7 <I> 9<I> see above with <I>F [] [Ak1 Ako 'L' Ck] -< <I>row k <I> <I>Ck <I> [Al1Aln 'E' Cl] <I> row l <I>= <I>Cl <I> [Am1Amn 'G' Cm] <I>Cm <I> <I>row m<I><<I> <I> [ z1 zn C <U>0<U> ]] or [ z1 zn C '<U>Max<U>']] or [ z1 zn C '<U>Min<U>']] <I> for Z=z1x1+znxn+C<I> Z-row in last row C(often 0) of Z in Col n+1 (not n+2!) <U>0<U> '<U>Max<U>' or '<U>Min<U>': not important but in Col n+2 Rows order of the (In)Equalit. is free Only Z-coef must alw. be in last MatRow m+1 At 1st question further, reply: 1 for MAX or 0 for MIN & press ENTER For the other 5 less important questions: General sol (slow)1 * <U>Only SIMPLEX sol 0<U> Lin comb:all xi0 1 <U>Lin comb:allow x<00<U> Auto/direct exec 1 <U>Step-by-step 0<U> Fractions/exact 1 * <U>Fast (no fract.) 0<U> Full steps saved 1 * If lack of memory 0 choose 1/0 & ENTER (1 is default sett.) 0 to above * Quest. to speed up ( less details & no fract.) Save all your Matrixes in DATA Dir (last menu page) If lack of memory: choose option 0 for * above Still lack of memory delete some MATrix in DATA Dir delete this huge string & following DROP command delete NOTE & VERS Review data/results after output? Press (at 1st Page) INPUT.last SOL (details) S.1N (all vectors) S.LIN (exact solut) d.LIN (partial sol) Press (at 2nd Page) SLACK.ß (transform) RESULT¦Ci.rows OK? STEPS (details) About program Max: OK Min: should be OK \" DROP 'INPUT.last' STO 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 { } DUP 0 0 0 0 0 RCLF 0 0 0 0 0 0 { } 0 1 0 0 0 0 { } DUP Rnd STACK.full Auto MiMa.s m l.xi l.xi.s time m0 m00 minCi Zrow I J VECTßi step0 STEPS.xß l.check INP.cut Ci.sol I.INP F.l2 Jor l.xi.or fraction INPUTmod SOL fg SOL1 jj SLACK1.ß STEPS1 RESULT1.ROW xab row.prob.l Z xr1 table Ci ineq INPUTmod.OR xsF F.l « OPTION TICKS 'time' STO -100 CF RAD GO.NEXT » »" "\\<< \"1 Arg: MATRIX [m+1 \\.x n+2] m Row (In)Equalities n Var xi (\\>=0/<0/Free) & Z-Max/Min obj.funct at last Row m+1: [[1 0 0 0 0 'F' 0] [0 1 0 0 0 'F' 0] [0 1 0 0 0 'L' 9] [] [0 0 0 1 0 'E' 6] [] [Al1 Aln 'E' Cl] [Am1 Amn 'G' Cm] [ z1 zn C 0]] \\|> Letters F L E G (& possible number C): in Matrix Col n+1 'F' Free var xi\\>=0, <0 'L' Less \\-> \\<= 'E' Equal \\-> = 'G' Greater \\-> \\>= \\|> Numbers Ci (Cl,Cm) \\[] are free: \\>=0 or \\<=0 \\[] & in Col n+2 \\|> Input example & explanations: [[1 0 0 0 0 0 'F' 0] <I>Free var x1:<I>-\\oo<<I>x1<I><\\oo<I> Sign of xi unknown: x1<I> <I>may be <I>\\>=0<I> or <I>\\<=0 [0 1 0 0 0 0 'F' 0] [0 1 0 0 0 0 'L' 9] '<I>x2 is Free but<I> \\<=(L)9' \\-><I>2 rows for <I>-\\oo<<I>x2\\<=<I>9! [0 0 1 0 0 0 'L' 8] <I>var x3:<I> <I> <I>0!\\<= <I>x3 <I>\\<= 8<I> <I> & not -\\oo!\\<= <I>x3 <I>\\<= 8,<I> as by rule/default x3 (xi) alw. <I>\\>= 0;<I> <I> for -\\oo \\<= <I>x3 <I>\\<= 8<I> see above with <I>F [0 0 0 1 0 0 'E' 6] <I> var x4 <I>=<I> <I>6<I> <I> [0 0 0 0 1 0 'L' 0] <I>var x5:<I>-\\oo< <I>x5 <I>\\<= 0 [0 0 0 0 0 1 'L'-8] <I>var x6:<I>-\\oo< <I>x6 <I>\\<= <I>-<I>8 [0 0 0 0 0 0 1 'G'-9] <I> var x7: -<I>9 \\<=<I>x7<I><\\oo & not: <I>-<I>9 \\<=<I>x7<I>\\<=0! Contrarily to: [0 0 0 0 0 0 1 'L' 9] <I>var x7:<I> 0! \\<= <I>x7 <I>< 9 & not: <I>-<I>\\oo! \\<= <I>x7 <I>< 9 <I> <I> for -\\oo \\<= <I>x7 <I>\\<= 9<I> see above with <I>F [] [Ak1 Ako 'L' Ck] -\\oo< <I>row k \\<=<I> <I>Ck <I> [Al1Aln 'E' Cl] <I> row l <I>= <I>Cl <I> [Am1Amn 'G' Cm] <I>Cm <I>\\<= <I>row m<I><\\oo<I> <I> [ z1 zn C <U>0<U> ]] or [ z1 zn C '<U>Max<U>']] or [ z1 zn C '<U>Min<U>']] <I> for Z=z1x1+znxn+C<I> \\[] Z-row in last row \\[] C(often 0) of Z in Col n+1 (not n+2!) \\[] <U>0<U> '<U>Max<U>' or '<U>Min<U>': not important but in Col n+2 \\|>Rows order of the (In)Equalit. is free \\|>Only Z-coef must alw. be in last MatRow m+1 \\|>At 1st question further, reply: 1 for MAX or 0 for MIN & press ENTER \\|> For the other 5 less important questions: \\[]General sol (slow)\\->1 * <U>Only SIMPLEX sol \\->0<U> \\[]Lin comb:all xi\\>=0 \\->1 <U>Lin comb:allow x<0\\->0<U> \\[]Auto/direct exec \\->1 <U>Step-by-step \\->0<U> \\[]Fractions/exact \\->1 * <U>Fast (no fract.) \\->0<U> \\[]Full steps saved \\->1 * If lack of memory \\->0 choose 1/0 & ENTER (1 is default sett.) 0 to above * Quest. to speed up (\\-> less details & no fract.) \\|> Save all your Matrixes in DATA Dir (last menu page) \\|> If lack of memory: choose option 0 for * above \\|> Still lack of memory delete some MATrix in DATA Dir \\[] delete this huge string & following DROP command \\[] delete NOTE & VERS \\|> Review data/results after output? \\->Press (at 1st Page) \\[]INPUT.last \\[]SOL (details) \\[]S.1\\173N (all vectors) S.LIN (exact solut) d.LIN (partial sol) \\->Press (at 2nd Page) \\[]SLACK.\\Gb (transform) \\[]RESULT\\166Ci.rows OK? \\[]STEPS (details) \\|> About program Max: OK Min: should be OK \" DROP 'INPUT.last' STO 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 { } DUP 0 0 0 0 0 RCLF 0 0 0 0 0 0 { } 0 1 0 0 0 0 { } DUP \\-> \\<-Rnd \\<-STACK.full \\<-Auto \\<-MiMa.s \\<-m \\<-l.xi \\<-l.xi.s \\<-time \\<-m0 \\<-m00 \\<-minCi \\<-Zrow \\<-I \\<-J \\<-VECT\\Gbi \\<-step0 \\<-STEPS.x\\Gb \\<-l.check \\<-INP.cut \\<-Ci.sol \\<-I.INP \\<-F.l2 \\<-Jor \\<-l.xi.or \\<-fraction \\<-INPUTmod \\<-\\ooSOL \\<-fg \\<-SOL1 \\<-jj \\<-SLACK1.\\Gb \\<-STEPS1 \\<-RESULT1.ROW \\<-xab \\<-row.prob.l \\<-Z \\<-xr1 \\<-table \\<-Ci \\<-ineq \\<-INPUTmod.OR \\<-xsF \\<-F.l \\<< OPTION TICKS '\\<-time' STO -100 CF RAD GO.NEXT \\>> \\>>" readable than my initial, original version. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
RE: Inout - Gil - 02-06-2023 02:26 PM
|
User(s) browsing this thread: 2 Guest(s)