{"message":"🚀 SCDT Optimization API v3.30.1 - HIGH-PERFORMANCE (CBC solver)","documentation":"/docs","version":"3.30.1","endpoints":{"/api/optimize/supabase/v2":"Main optimization endpoint with caching & compression","/api/optimize/mrp":"MRP optimization for RMPM (Plan Purch Tambah/Kurang based on DOI)","/api/health":"Health check endpoint"},"workflow":{"description":"High-performance 4-step optimization workflow","steps":["1. PRE-SPLIT: Split national data per location using split factors BEFORE optimization","2. LOCK: Lock user input from API - these values stay FIXED for that week/location","3. OPTIMIZE: Calculate nationally, but locked values remain FIXED (included in calculation but NOT changed)","4. POST-SPLIT: After optimization, split results back per location"],"key_behavior":{"locked_values":"Do NOT change during optimization - stay exactly as user specified","included_in_calculation":"Locked values ARE included in national optimization calculation","non_locked_distribution":"After optimization, non-locked portions are split per location using split factors"}},"performance":{"solver":"CBC","solver_fast":false,"speedup":"3-10x faster than v3.29","optimizations":["⚡ ORJSON serialization (10x faster JSON)","🗜️ GZip compression (70-90% smaller responses)","💾 In-memory caching (5 min TTL)","🔄 Async I/O (non-blocking Supabase calls)","🖥️ CBC solver (multi-threaded)","🔀 Pre-split and post-split location handling"],"cache_stats":{"size":0,"max_size":500,"hits":0,"misses":0,"hit_rate_percent":0}},"features":{"tk_locking":{"description":"Lock TK values for specific week/location combinations","how_it_works":"Locked TK values are FIXED during optimization - they don't change","json_structure":{"mps_location":[{"location":{"location":"LOC1"},"tambah_kurang_in_batch":[{"week_category":"W1-JAN-25","changed":5}]}]},"note":"Locked value stays fixed for that week AND location, then included in national optimization"},"fp_locking":{"description":"Lock Form Permintaan (FP) values for specific weeks","how_it_works":"FP changes modify demand (FCST + FP), optimizer recalculates DOI based on new demand","json_structure":{"mps_description":{"form_permintaan":[{"raw":5000,"changed":1231,"week_category":"W1-MAR-26"}]}},"note":"FCST remains unchanged, only FP is modified. Demand = FCST + FP_changed"},"dual_locking":"Both TK batches and FP can be locked simultaneously"}}