1234567891011121314 |
- from sqlalchemy.orm import Session
- from app.controllers.equipment.fcu.early_start import EarlyStartTimeDTRBuilder
- from app.crud.model_path.early_start import model_path_early_start_dtr
- from app.models.domain.devices import ACATVIEarlyStartPredictionRequest
- async def build_acatvi_early_start_prediction(params: ACATVIEarlyStartPredictionRequest, db: Session) -> float:
- model_path = model_path_early_start_dtr.get_path_by_device(db, params.device_id)
- builder = EarlyStartTimeDTRBuilder(model_path, params.season)
- hour = await builder.get_prediction(params.space_realtime_temperature, params.outdoor_realtime_temperature)
- return hour * 60
|