Read the equation
This relation defines c0 assigned to r1 (8); next best requirement is r0 (10); delta in the source section “func TestCounterfactualsKnown(t *testing.T) · c0 assigned to r1 (8); next best requirement is r0 (10); delta”. It specifies the displayed relationship between the named quantities or parameters. Its interpretation depends on the source’s stated variables and conditions; this record does not assign an unprovided physical or cognitive meaning to them.
Terms & definitions
The recovered passage does not supply a separate symbol table. Read the source context for the notation used in this version; familiar letters may carry different meanings in other builds.
How it works
Read c0 assigned to r1 (8); next best requirement is r0 (10); delta as the quantity being defined or updated by this relation.
Substitute the source-defined variables or recorded values and follow the displayed arithmetic and indexing exactly.
Use this version’s variable definitions and update order. The same symbol may be assigned a different meaning in another build.
Assumptions & limits
This source expression was recovered from the pinned code revision. Its presence does not establish that the associated program was built, run, or scientifically validated.
Original context
Read the surrounding source passage
Edges: []AssignEdge{
{0, 0, 10}, {0, 1, 8},
{1, 0, 9}, {1, 1, 1},
},
}
sol := solve(t, in) // c0->r1 (8), c1->r0 (9)
cf := Counterfactuals(in, sol)
// c0 assigned to r1 (8); next best requirement is r0 (10); delta = 8 - 10 = -2 (giving c0 r1 instead of
// its own best protected the portfolio).
if cf[0].CandidateNextReqIdx != 0 || cf[0].CandidateValueDelta != -2 {
t.Fatalf("c0 counterfactual wrong: %+v", cf[0])
}
// requirement r1's next best candidate (other than c0) is c1 at value 1; assigned value 8; delta 7.
if cf[0].RequirementNextCandIdx != 1 || cf[0].RequirementValueDelta != 7 {
t.Fatalf("r1 next best candidate counterfactual wrong: %+v", cf[0])
}
}Exact original notation
c0 assigned to r1 (8); next best requirement is r0 (10); delta = 8 - 10 = -2 (giving c0 r1 instead of