Spaces:
Running on Zero
Running on Zero
Download tower/optimize.py from Crypt0Maniac/control-tower: direct link, hf CLI and curl.
- Browser
- Download file 719 Bytes
-
https://huggingface.co/spaces/Crypt0Maniac/control-tower/resolve/main/tower/optimize.py
- Command line
-
hf download hf://spaces/Crypt0Maniac/control-tower/tower/optimize.py
-
curl -L -o optimize.py https://huggingface.co/spaces/Crypt0Maniac/control-tower/resolve/main/tower/optimize.py
719 Bytes
| """Publish the slot the supply-chain planner already chose. | |
| The planner still picks the day and the plant. This module only states that | |
| choice as one sentence. It does not call a tool or change arguments. | |
| """ | |
| from __future__ import annotations | |
| def recommend(order_id: str, home_plant: str, dest_plant: str, new_date: str, kind: str) -> str: | |
| """One sentence for a chosen slot. | |
| kind is the binding constraint ("delay" or "outage"). The sentence names | |
| the order, the plants, and the day. | |
| """ | |
| if dest_plant == home_plant: | |
| return f"Recommendation: keep {order_id} at {home_plant} on {new_date}." | |
| return f"Recommendation: move {order_id} from {home_plant} to {dest_plant} on {new_date}." | |