fix(landscape): func_zoning ranks the original P suitability rasters, not C
The reference notebook ("Three scenarios" cells) and zoning_core.py feed E plus
the five P_* WEIGHTED_CLASS rasters into functional zoning; the diagram folder
300-…-Equals_102_202 pointing at the C layers was a drawing error. C_k =
min(P_k, E) stay diagnostic conflict layers. Node 30 keeps its code/stage;
its changed inputs change every fingerprint, so V1–V3 recompute on the next run.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -132,3 +132,22 @@ func TestNodeForOutput(t *testing.T) {
|
||||
t.Fatal("NodeForOutput(nope) should not be found")
|
||||
}
|
||||
}
|
||||
|
||||
// Functional zoning ranks the ORIGINAL suitability rasters P1..P5 against E
|
||||
// (reference notebook cells "Three scenarios" and zoning_core.py); the
|
||||
// conflict layers C_k are diagnostics and must not replace P_k here.
|
||||
func TestFuncZoningTakesEAndOriginalP(t *testing.T) {
|
||||
n, ok := NodeByCode("30")
|
||||
if !ok {
|
||||
t.Fatal("node 30 missing")
|
||||
}
|
||||
want := []string{OutE, SlotPIrrigation, SlotPSnow, SlotPCrop, SlotPPasture, SlotPTourism}
|
||||
if len(n.Inputs) != len(want) {
|
||||
t.Fatalf("node 30 inputs = %v, want %v", n.Inputs, want)
|
||||
}
|
||||
for i := range want {
|
||||
if n.Inputs[i] != want[i] {
|
||||
t.Fatalf("node 30 input[%d] = %s, want %s (order is E, then sectors 1..5)", i, n.Inputs[i], want[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user