Checkpoint 1
This commit is contained in:
@@ -0,0 +1,30 @@
|
|||||||
|
"""Backwards-compat shim — flocking logic now lives in ``herding.flocking_sim``.
|
||||||
|
|
||||||
|
Kept so any external reference still resolves.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
_HERE = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
_PROJECT_ROOT = os.path.normpath(os.path.join(_HERE, "..", ".."))
|
||||||
|
if _PROJECT_ROOT not in sys.path:
|
||||||
|
sys.path.insert(0, _PROJECT_ROOT)
|
||||||
|
|
||||||
|
from herding.flocking_sim import ( # noqa: F401
|
||||||
|
MAX_SPEED, FLEE_SPEED, WANDER_SPEED,
|
||||||
|
WALL_MARGIN, WALL_HARD_MARGIN, WALL_HARD_GAIN,
|
||||||
|
FLEE_DIST, SEPARATION_DIST, COHESION_DIST,
|
||||||
|
PEN_MARGIN,
|
||||||
|
compute_heading_speed,
|
||||||
|
)
|
||||||
|
from herding.geometry import ( # noqa: F401
|
||||||
|
FIELD_X, FIELD_Y, PEN_X, PEN_Y,
|
||||||
|
in_pen,
|
||||||
|
)
|
||||||
|
|
||||||
|
# Original module-level names retained for any code still importing them.
|
||||||
|
X_MIN, X_MAX = FIELD_X
|
||||||
|
Y_MIN, Y_MAX = FIELD_Y
|
||||||
|
PEN_X_MIN, PEN_X_MAX = PEN_X
|
||||||
|
PEN_Y_MIN, PEN_Y_MAX = PEN_Y
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
"""Backwards-compat shim — Strömbom logic now lives in ``herding.strombom``."""
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
_HERE = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
_PROJECT_ROOT = os.path.normpath(os.path.join(_HERE, "..", ".."))
|
||||||
|
if _PROJECT_ROOT not in sys.path:
|
||||||
|
sys.path.insert(0, _PROJECT_ROOT)
|
||||||
|
|
||||||
|
from herding.strombom import ( # noqa: F401
|
||||||
|
F_FACTOR, DELTA_COLLECT, DELTA_DRIVE,
|
||||||
|
compute_action, compute_action_debug,
|
||||||
|
)
|
||||||
|
from herding.geometry import ( # noqa: F401
|
||||||
|
PEN_X, PEN_Y, PEN_CENTER, PEN_ENTRY,
|
||||||
|
in_pen,
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user