package com.aps.macroplanner;

import com.google.ortools.Loader;
import com.aps.macroplanner.data.RoutingTestDataBuilder;
import com.aps.macroplanner.data.TestDataBuilder;

/**
 * 多工序路由测试运行器
 *
 * <p>验证场景: 3 工序串行生产同一产品, 验证:
 * <ol>
 *   <li>最终产出 = 销售需求 (不是 3×)</li>
 *   <li>中间 WIP 库存不异常累积</li>
 *   <li>各工序独立消耗各自设备产能</li>
 * </ol>
 */
public class RoutingTestRunner {
    public static void main(String[] args) {
        Loader.loadNativeLibraries();

        System.out.println("===== ROUTING TEST RUNNER START =====");
        System.out.println("Scenario: 3-step routing OP_Cut -> OP_Rough -> OP_Finish -> Product P");
        System.out.println();

        TestDataBuilder data = new RoutingTestDataBuilder();
        System.out.println("Data loaded: " + data.getProducts().size() + " products, "
                + data.getOperations().size() + " operations");
        MacroPlannerOptimizer optimizer = new MacroPlannerOptimizer(data);
        optimizer.buildModel();
        optimizer.solve();
        System.out.println("===== ROUTING TEST RUNNER END =====");
    }
}