diff --git a/src/Primal.tsx b/src/Primal.tsx index 7e3583f..fe8cf56 100644 --- a/src/Primal.tsx +++ b/src/Primal.tsx @@ -262,8 +262,8 @@ const PrimalCanvas = ({ const b_i = b.at(i) drawSemiplane(g, a1.toNumber(), a2.toNumber(), b_i.toNumber(), { - lineColor: '#040', - lineWidth: 3, + lineColor: '#488', + lineWidth: 6, }) }) @@ -295,7 +295,8 @@ const PrimalCanvas = ({ x1.toNumber() + xi1.toNumber() / xiLen, x2.toNumber() + xi2.toNumber() / xiLen, 0.25, - '#44d' + // '#44d' + '#44f' ) } diff --git a/src/lib-v2/ro/primal-simplex.ts b/src/lib-v2/ro/primal-simplex.ts index fefac07..2f619c5 100644 --- a/src/lib-v2/ro/primal-simplex.ts +++ b/src/lib-v2/ro/primal-simplex.ts @@ -114,7 +114,7 @@ export function computePrimalSimplexSteps(input: ProblemInput): ProblemOutput { type: 'formula', content: [ String.raw`I(\bar{x})`, - String.raw`\{ i \in \{1, \dots, m\} \mid A_i \bar{x}_i = b_i \}`, + String.raw`\{ i \in \{1, \dots, ${A.rows}\} \mid A_i \bar{x}_i = b_i \}`, indexSetToLatex(I_x), ].join(' = '), }) @@ -171,14 +171,18 @@ export function computePrimalSimplexSteps(input: ProblemInput): ProblemOutput { const A_N__xi = A_N.apply(xi) + comments.push({ + type: 'formula', + content: `N = \\{1, \\dots, ${A.rows}\\} \\setminus B = ${indexSetToLatex(N)}`, + }) + comments.push({ type: 'formula', content: [ - [`N = \\{1, \\dots, m\\} \\setminus B = ${indexSetToLatex(N)}`], - [`A_N \\xi`, `${matrixToLatex(A_N)} ${vectorToLatex(xi)}`, `${vectorToLatex(A_N__xi)}`].join( - ' = ' - ), - ].join(' \\qquad '), + `A_N \\xi`, + `${matrixToLatex(A_N)} ${vectorToLatex(xi)}`, + `${vectorToLatex(A_N__xi)}`, + ].join(' = '), }) if (!A_N__xi.getData().every(x => x.leq(RationalField.zero))) {