File indexing completed on 2026-11-09 09:29:52
0001 from typing import Any, Dict
0002 import math
0003
0004
0005 def objective_payload(
0006 *,
0007 design_point: Dict[str, Any],
0008 **kwargs,
0009 ) -> Dict[str, float]:
0010 """
0011 Placeholder B0 objective based only on tracker geometry.
0012
0013 The effective lever arm is defined from the spread of the
0014 four disk z positions around their barycenter.
0015 """
0016
0017 z = [
0018 float(design_point["b0_tracker.z1"]),
0019 float(design_point["b0_tracker.z2"]),
0020 float(design_point["b0_tracker.z3"]),
0021 float(design_point["b0_tracker.z4"]),
0022 ]
0023
0024 z_mean = sum(z) / len(z)
0025
0026 lever_arm = math.sqrt(
0027 sum((zi - z_mean) ** 2 for zi in z)
0028 )
0029
0030 return {
0031 "lever_arm": float(lever_arm)
0032 }