[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79CDBHKM3XC0ST2JSB65VVX":3,"skill-same:01M79CDBHKM3XC0ST2JSB65VVX":51},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":34,"ownerDescription":35,"updatedAt":36,"install":37,"resources":50},"01M79CDBHKM3XC0ST2JSB65VVX","vehicle-routing-problem-optimization",null,"Solve complex fleet dispatch and delivery routing challenges using Capacitated Vehicle Routing Problem with Time Windows (CVRPTW) algorithms and Google OR-Tools. Model vehicle capacities, customer service time windows, pickup-and-delivery pairs, driver shifts, and distance\u002Fduration matrices. Trigger when optimizing fleet logistics, dispatch systems, or courier delivery routes.","hamzabellouch\u002Fagent-skills","hamzabellouch","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F237856042?v=4","01M79BRYW7XAMK3YDWQEMTWGWS","Hamza Bellouch","01M79BRYWXQV3JK2TGVTX8GN2A",8,"MIT","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FBusiness\u002FSupply_Chain_and_Logistics\u002Fvehicle-routing-problem-optimization\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: vehicle-routing-problem-optimization\nmetadata:\n  category: Supply Chain and Logistics Tech\ndescription: Solve complex fleet dispatch and delivery routing challenges using Capacitated Vehicle Routing Problem with Time Windows (CVRPTW) algorithms and Google OR-Tools. Model vehicle capacities, customer service time windows, pickup-and-delivery pairs, driver shifts, and distance\u002Fduration matrices. Trigger when optimizing fleet logistics, dispatch systems, or courier delivery routes.\ncompatibility: Python 3.10+, Google OR-Tools 9.8+, NumPy\n---\n\n# Vehicle Routing Problem (VRP) Optimization Skill Guide\n\nThis skill standardizes mathematical modeling and programmatic resolution of delivery fleet route optimization using Google OR-Tools constraint programming.\n\n---\n\n## 1. CVRPTW Constraint Hierarchy\n\n```text\n[ Input Problem Data ]\n  |-- Customer Coordinates & Delivery Demands (e.g. packages\u002Fweight)\n  |-- Service Time Windows [Earliest Arrival, Latest Departure]\n  |-- Fleet Vehicle Capacities & Maximum Shift Durations\n  |-- Distance \u002F Travel Time Matrix (from OSRM \u002F Google Maps API)\n          |\n          v\n[ Google OR-Tools Routing Model ]\n  |-- RoutingIndexManager (Node \u003C-> Index Mapping)\n  |-- AddDimension(Distance \u002F Capacity \u002F Time)\n  |-- AddDisjunction (Penalized Dropped Visits if overconstrained)\n          |\n          v (Guided Local Search \u002F Tabu Search)\n[ Optimized Multi-Vehicle Dispatch Schedules ]\n```\n\n---\n\n## 2. Production Code Implementation (Python \u002F OR-Tools)\n\n```python\nfrom ortools.constraint_solver import routing_enums_pb2\nfrom ortools.constraint_solver import pywrapcp\n\n\ndef create_data_model():\n    \"\"\"Builds sample input data for 4 vehicles and 10 delivery locations.\"\"\"\n    data = {}\n    # Time\u002Fdistance matrix in minutes (10 locations + 1 depot at index 0)\n    data[\"time_matrix\"] = [\n        [0, 12, 20, 15, 18, 25, 22, 10, 14, 16, 20],\n        [12, 0, 10, 8, 15, 18, 20, 14, 16, 12, 18],\n        [20, 10, 0, 12, 14, 15, 16, 18, 20, 14, 10],\n        [15, 8, 12, 0, 10, 12, 14, 16, 18, 10, 15],\n        [18, 15, 14, 10, 0, 8, 10, 12, 14, 16, 18],\n        [25, 18, 15, 12, 8, 0, 6, 10, 12, 14, 16],\n        [22, 20, 16, 14, 10, 6, 0, 8, 10, 12, 14],\n        [10, 14, 18, 16, 12, 10, 8, 0, 6, 8, 10],\n        [14, 16, 20, 18, 14, 12, 10, 6, 0, 5, 8],\n        [16, 12, 14, 10, 16, 14, 12, 8, 5, 0, 6],\n        [20, 18, 10, 15, 18, 16, 14, 10, 8, 6, 0],\n    ]\n    # Time windows: [earliest_start_min, latest_start_min]\n    data[\"time_windows\"] = [\n        (0, 480),  # 0: Depot open 8 hours\n        (30, 120), # 1\n        (60, 180), # 2\n        (90, 240), # 3\n        (120, 300),# 4\n        (150, 360),# 5\n        (180, 400),# 6\n        (60, 200), # 7\n        (120, 300),# 8\n        (180, 360),# 9\n        (240, 450),# 10\n    ]\n    # Customer delivery demands (e.g., packages)\n    data[\"demands\"] = [0, 1, 2, 1, 3, 2, 1, 2, 1, 2, 1]\n    data[\"vehicle_capacities\"] = [8, 8, 8, 8]\n    data[\"num_vehicles\"] = 4\n    data[\"depot\"] = 0\n    return data\n\n\ndef solve_cvrptw():\n    data = create_data_model()\n\n    # 1. Routing Index Manager\n    manager = pywrapcp.RoutingIndexManager(\n        len(data[\"time_matrix\"]),\n        data[\"num_vehicles\"],\n        data[\"depot\"],\n    )\n    routing = pywrapcp.RoutingModel(manager)\n\n    # 2. Transit Callback (Travel Time)\n    def time_callback(from_index, to_index):\n        from_node = manager.IndexToNode(from_index)\n        to_node = manager.IndexToNode(to_index)\n        return data[\"time_matrix\"][from_node][to_node]\n\n    transit_callback_index = routing.RegisterTransitCallback(time_callback)\n    routing.SetArcCostEvaluatorOfAllVehicles(transit_callback_index)\n\n    # 3. Add Time Window Dimension\n    time_dimension_name = \"Time\"\n    routing.AddDimension(\n        transit_callback_index,\n        60,   # Allow waiting time up to 60 mins\n        480,  # Max vehicle shift 8 hours\n        False,# Don't force start cumul to zero\n        time_dimension_name,\n    )\n    time_dimension = routing.GetDimensionOrDie(time_dimension_name)\n\n    # Add time window constraints for each customer\n    for location_idx, time_window in enumerate(data[\"time_windows\"]):\n        index = manager.NodeToIndex(location_idx)\n        time_dimension.CumulVar(index).SetRange(time_window[0], time_window[1])\n\n    # 4. Add Demand \u002F Capacity Dimension\n    def demand_callback(from_index):\n        from_node = manager.IndexToNode(from_index)\n        return data[\"demands\"][from_node]\n\n    demand_callback_index = routing.RegisterUnaryTransitCallback(demand_callback)\n    routing.AddDimensionWithVehicleCapacity(\n        demand_callback_index,\n        0,  # null capacity slack\n        data[\"vehicle_capacities\"],\n        True,  # start cumul to zero\n        \"Capacity\",\n    )\n\n    # 5. Search Parameters\n    search_parameters = pywrapcp.DefaultRoutingSearchParameters()\n    search_parameters.first_solution_strategy = (\n        routing_enums_pb2.FirstSolutionStrategy.PATH_CHEAPEST_ARC\n    )\n    search_parameters.local_search_metaheuristic = (\n        routing_enums_pb2.LocalSearchMetaheuristic.GUIDED_LOCAL_SEARCH\n    )\n    search_parameters.time_limit.seconds = 5\n\n    # Solve\n    solution = routing.SolveWithParameters(search_parameters)\n    return solution is not None\n```\n\n---\n\n## 3. Best Practices Checklist\n\n- [ ] **Triangle Inequality:** Verify that the distance matrix satisfies the triangle inequality ($D(A, C) \\le D(A, B) + D(B, C)$); violating this can break heuristic solvers.\n- [ ] **Disjunctions for Dropped Visits:** Add `routing.AddDisjunction([manager.NodeToIndex(node)], penalty)` so the solver can drop impossible deliveries instead of returning null when overconstrained.\n- [ ] **Service Duration:** Add loading\u002Funloading buffer times at each stop into the transit callback to prevent unrealistic driver schedules.\n","# Vehicle Routing Problem (VRP) Optimization Skill Guide\n\nThis skill standardizes mathematical modeling and programmatic resolution of delivery fleet route optimization using Google OR-Tools constraint programming.\n\n---\n\n## 1. CVRPTW Constraint Hierarchy\n\n```text\n[ Input Problem Data ]\n  |-- Customer Coordinates & Delivery Demands (e.g. packages\u002Fweight)\n  |-- Service Time Windows [Earliest Arrival, Latest Departure]\n  |-- Fleet Vehicle Capacities & Maximum Shift Durations\n  |-- Distance \u002F Travel Time Matrix (from OSRM \u002F Google Maps API)\n          |\n          v\n[ Google OR-Tools Routing Model ]\n  |-- RoutingIndexManager (Node \u003C-> Index Mapping)\n  |-- AddDimension(Distance \u002F Capacity \u002F Time)\n  |-- AddDisjunction (Penalized Dropped Visits if overconstrained)\n          |\n          v (Guided Local Search \u002F Tabu Search)\n[ Optimized Multi-Vehicle Dispatch Schedules ]\n```\n\n---\n\n## 2. Production Code Implementation (Python \u002F OR-Tools)\n\n```python\nfrom ortools.constraint_solver import routing_enums_pb2\nfrom ortools.constraint_solver import pywrapcp\n\n\ndef create_data_model():\n    \"\"\"Builds sample input data for 4 vehicles and 10 delivery locations.\"\"\"\n    data = {}\n    # Time\u002Fdistance matrix in minutes (10 locations + 1 depot at index 0)\n    data[\"time_matrix\"] = [\n        [0, 12, 20, 15, 18, 25, 22, 10, 14, 16, 20],\n        [12, 0, 10, 8, 15, 18, 20, 14, 16, 12, 18],\n        [20, 10, 0, 12, 14, 15, 16, 18, 20, 14, 10],\n        [15, 8, 12, 0, 10, 12, 14, 16, 18, 10, 15],\n        [18, 15, 14, 10, 0, 8, 10, 12, 14, 16, 18],\n        [25, 18, 15, 12, 8, 0, 6, 10, 12, 14, 16],\n        [22, 20, 16, 14, 10, 6, 0, 8, 10, 12, 14],\n        [10, 14, 18, 16, 12, 10, 8, 0, 6, 8, 10],\n        [14, 16, 20, 18, 14, 12, 10, 6, 0, 5, 8],\n        [16, 12, 14, 10, 16, 14, 12, 8, 5, 0, 6],\n        [20, 18, 10, 15, 18, 16, 14, 10, 8, 6, 0],\n    ]\n    # Time windows: [earliest_start_min, latest_start_min]\n    data[\"time_windows\"] = [\n        (0, 480),  # 0: Depot open 8 hours\n        (30, 120), # 1\n        (60, 180), # 2\n        (90, 240), # 3\n        (120, 300),# 4\n        (150, 360),# 5\n        (180, 400),# 6\n        (60, 200), # 7\n        (120, 300),# 8\n        (180, 360),# 9\n        (240, 450),# 10\n    ]\n    # Customer delivery demands (e.g., packages)\n    data[\"demands\"] = [0, 1, 2, 1, 3, 2, 1, 2, 1, 2, 1]\n    data[\"vehicle_capacities\"] = [8, 8, 8, 8]\n    data[\"num_vehicles\"] = 4\n    data[\"depot\"] = 0\n    return data\n\n\ndef solve_cvrptw():\n    data = create_data_model()\n\n    # 1. Routing Index Manager\n    manager = pywrapcp.RoutingIndexManager(\n        len(data[\"time_matrix\"]),\n        data[\"num_vehicles\"],\n        data[\"depot\"],\n    )\n    routing = pywrapcp.RoutingModel(manager)\n\n    # 2. Transit Callback (Travel Time)\n    def time_callback(from_index, to_index):\n        from_node = manager.IndexToNode(from_index)\n        to_node = manager.IndexToNode(to_index)\n        return data[\"time_matrix\"][from_node][to_node]\n\n    transit_callback_index = routing.RegisterTransitCallback(time_callback)\n    routing.SetArcCostEvaluatorOfAllVehicles(transit_callback_index)\n\n    # 3. Add Time Window Dimension\n    time_dimension_name = \"Time\"\n    routing.AddDimension(\n        transit_callback_index,\n        60,   # Allow waiting time up to 60 mins\n        480,  # Max vehicle shift 8 hours\n        False,# Don't force start cumul to zero\n        time_dimension_name,\n    )\n    time_dimension = routing.GetDimensionOrDie(time_dimension_name)\n\n    # Add time window constraints for each customer\n    for location_idx, time_window in enumerate(data[\"time_windows\"]):\n        index = manager.NodeToIndex(location_idx)\n        time_dimension.CumulVar(index).SetRange(time_window[0], time_window[1])\n\n    # 4. Add Demand \u002F Capacity Dimension\n    def demand_callback(from_index):\n        from_node = manager.IndexToNode(from_index)\n        return data[\"demands\"][from_node]\n\n    demand_callback_index = routing.RegisterUnaryTransitCallback(demand_callback)\n    routing.AddDimensionWithVehicleCapacity(\n        demand_callback_index,\n        0,  # null capacity slack\n        data[\"vehicle_capacities\"],\n        True,  # start cumul to zero\n        \"Capacity\",\n    )\n\n    # 5. Search Parameters\n    search_parameters = pywrapcp.DefaultRoutingSearchParameters()\n    search_parameters.first_solution_strategy = (\n        routing_enums_pb2.FirstSolutionStrategy.PATH_CHEAPEST_ARC\n    )\n    search_parameters.local_search_metaheuristic = (\n        routing_enums_pb2.LocalSearchMetaheuristic.GUIDED_LOCAL_SEARCH\n    )\n    search_parameters.time_limit.seconds = 5\n\n    # Solve\n    solution = routing.SolveWithParameters(search_parameters)\n    return solution is not None\n```\n\n---\n\n## 3. Best Practices Checklist\n\n- [ ] **Triangle Inequality:** Verify that the distance matrix satisfies the triangle inequality ($D(A, C) \\le D(A, B) + D(B, C)$); violating this can break heuristic solvers.\n- [ ] **Disjunctions for Dropped Visits:** Add `routing.AddDisjunction([manager.NodeToIndex(node)], penalty)` so the solver can drop impossible deliveries instead of returning null when overconstrained.\n- [ ] **Service Duration:** Add loading\u002Funloading buffer times at each stop into the transit callback to prevent unrealistic driver schedules.\n",{"name":5,"metadata":24,"description":7,"compatibility":26},{"category":25},"Supply Chain and Logistics Tech","Python 3.10+, Google OR-Tools 9.8+, NumPy","main","e905af21e5f1e1c3ca605e9656c3a7930360a84e","Business\u002FSupply_Chain_and_Logistics\u002Fvehicle-routing-problem-optimization",1,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills","https:\u002F\u002Fhamzabellouch.github.io\u002F","https:\u002F\u002Fgithub.com\u002Fhamzabellouch","hamzabellouch.github.io","CEO & Founder of @tknoglobal | Researcher in Technology & Applied Sciences.","2026-10-17 03:20:19",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add hamzabellouch\u002Fagent-skills --skill vehicle-routing-problem-optimization",{"tool":43,"command":44},"bunx","bunx skills add hamzabellouch\u002Fagent-skills --skill vehicle-routing-problem-optimization",{"tool":46,"command":47},"pnpm","pnpm dlx skills add hamzabellouch\u002Fagent-skills --skill vehicle-routing-problem-optimization","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FBusiness\u002FSupply_Chain_and_Logistics\u002Fvehicle-routing-problem-optimization\u002FSKILL.md",true,[],[52,59,66,73,80,87],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M79FHH2H815A9TAP6WNKH4Q8","security-audit","Comprehensive security guidance, source code audit, vulnerability assessment, and penetration test review for codebases, APIs, microservices, CLI tools, libraries, and LLM-backed applications. Triggers on requests to audit a codebase, conduct security reviews, find vulnerabilities or flaws, pen-test source code, or when the user asks in Arabic (فحص أمني، تدقيق الكود أمنياً، مراجعة الثغرات، فحص أمان المشروع). Supports Guidance mode (focused review) and Full Audit mode (deterministic 6-phase harness).","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FSecurity\u002FSecurity_Audit_and_Code_Review\u002Fsecurity-audit\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M79FHBGXVBY6VQ1X7ETAZMF1","malware-analysis-reversing","Production malware analysis workflows, reverse engineering methodologies, isolated sandbox triage, static\u002Fdynamic binary analysis, memory forensics, and YARA detection rule authoring.","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FSecurity\u002FOffensive_Security_and_Pentesting\u002Fmalware-analysis-reversing\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M79FH6EACDR801TZCE4R8SAC","application-security-pentesting","Production Application Security (AppSec) standards, OWASP Top 10 vulnerability remediation, SAST\u002FDAST pipeline integration, secure code review, threat modeling, and defensive security posture.","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FSecurity\u002FOffensive_Security_and_Pentesting\u002Fapplication-security-pentesting\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M79FH0VKVT44FK923K520ZQA","oauth2-oidc-security-flows","Implement enterprise OAuth 2.1 and OpenID Connect (OIDC) authorization code flow with Proof Key for Code Exchange (PKCE), state and nonce verification, refresh token rotation, token revocation, and centralized IdP federation (Keycloak, Auth0, Okta). Trigger when building secure authentication, single sign-on (SSO), or third-party delegated authorization.","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FSecurity\u002FIdentity_and_Access_Management_IAM\u002Foauth2-oidc-security-flows\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M79FGVVB3R4T88XXD8FRSV5B","jwt-session-management-hardening","Harden JWT-based authentication and session lifecycles using asymmetric signing (RS256\u002FEdDSA), JWKS rotation, strict claims validation, Redis-backed sliding window sessions, revocation lists, and secure HttpOnly cookie storage. Trigger when implementing token validation, session revocation, or hardening API authentication.","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FSecurity\u002FIdentity_and_Access_Management_IAM\u002Fjwt-session-management-hardening\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M79FGNCPZ85CVEY0B3NE4H3B","soc2-compliance-automation","Best practices for implementing SOC 2 Type II compliance controls, continuous evidence collection, infrastructure policy-as-code, and automated security monitoring. Use when automating Trust Services Criteria (Security, Availability, Confidentiality, Processing Integrity, Privacy), audit logging, IAM least privilege, or CI\u002FCD security gates.","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FSecurity\u002FGovernance_Compliance_and_Legal_Tech\u002Fsoc2-compliance-automation\u002FSKILL.md",[],[]]