minor adjustments

main
parent 7c61615a1f
commit e593ee43d8

@ -262,8 +262,8 @@ const PrimalCanvas = ({
const b_i = b.at(i) const b_i = b.at(i)
drawSemiplane(g, a1.toNumber(), a2.toNumber(), b_i.toNumber(), { drawSemiplane(g, a1.toNumber(), a2.toNumber(), b_i.toNumber(), {
lineColor: '#040', lineColor: '#488',
lineWidth: 3, lineWidth: 6,
}) })
}) })
@ -295,7 +295,8 @@ const PrimalCanvas = ({
x1.toNumber() + xi1.toNumber() / xiLen, x1.toNumber() + xi1.toNumber() / xiLen,
x2.toNumber() + xi2.toNumber() / xiLen, x2.toNumber() + xi2.toNumber() / xiLen,
0.25, 0.25,
'#44d' // '#44d'
'#44f'
) )
} }

@ -114,7 +114,7 @@ export function computePrimalSimplexSteps(input: ProblemInput): ProblemOutput {
type: 'formula', type: 'formula',
content: [ content: [
String.raw`I(\bar{x})`, 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), indexSetToLatex(I_x),
].join(' = '), ].join(' = '),
}) })
@ -171,14 +171,18 @@ export function computePrimalSimplexSteps(input: ProblemInput): ProblemOutput {
const A_N__xi = A_N.apply(xi) const A_N__xi = A_N.apply(xi)
comments.push({
type: 'formula',
content: `N = \\{1, \\dots, ${A.rows}\\} \\setminus B = ${indexSetToLatex(N)}`,
})
comments.push({ comments.push({
type: 'formula', type: 'formula',
content: [ content: [
[`N = \\{1, \\dots, m\\} \\setminus B = ${indexSetToLatex(N)}`], `A_N \\xi`,
[`A_N \\xi`, `${matrixToLatex(A_N)} ${vectorToLatex(xi)}`, `${vectorToLatex(A_N__xi)}`].join( `${matrixToLatex(A_N)} ${vectorToLatex(xi)}`,
' = ' `${vectorToLatex(A_N__xi)}`,
), ].join(' = '),
].join(' \\qquad '),
}) })
if (!A_N__xi.getData().every(x => x.leq(RationalField.zero))) { if (!A_N__xi.getData().every(x => x.leq(RationalField.zero))) {

Loading…
Cancel
Save