Skip to content
JAOT

Templates Gallery

JAOT provides a library of pre-built optimization templates covering common problem types across multiple industries. Templates give you a working model structure that you can customize with your own data, skipping the formulation step entirely.

Overview

The template library includes models organized into 11 categories spanning manufacturing, finance, logistics, energy, healthcare, and more. Each template defines a complete optimization model with variables, constraints, an objective function, and an input schema for your data.

Browsing Templates

Navigate to Builder > Templates to open the gallery. Templates are displayed as cards grouped by category, each showing:

  • Template name -- a descriptive title (e.g., "Knapsack Problem," "Vehicle Routing")
  • Category -- the industry or domain
  • Description -- a brief summary of what the template optimizes
  • Input schema -- what data you need to provide

You can filter by category or search by name to find a specific template.

Template Categories

CategoryExample Templates
ManufacturingProduction planning, cutting and packing, food and beverage, textile, chemical process, construction
FinancePortfolio optimization, budget allocation, insurance risk
LogisticsVehicle routing, facility location, warehouse operations
Supply ChainMulti-echelon planning, inventory optimization
EnergyGrid optimization, power generation scheduling
HealthcareResource allocation, staff scheduling, pharmaceutical production
TechnologyTelecom network planning, graph optimization, advertising media
ServicesRetail assortment, workforce scheduling, sports scheduling, education timetabling
Natural ResourcesAgricultural planning, mining operations, forestry management
Public SectorGovernment resource allocation, aerospace mission planning
GeneralKnapsack, assignment, set cover, and other classic combinatorial problems

Using a Template

  1. Select a template -- Click on a template card to view its details, including the full description, input schema, and example input data.

  2. Review the input schema -- Each template defines what data it expects. For example, a knapsack template requires items with names, values, and weights, plus a capacity limit.

  3. Load into builder -- Click Use Template to populate the builder canvas with the template's model structure. Variables, constraints, and the objective function are pre-configured.

  4. Provide your data -- Fill in the input fields with your specific values. The template's input schema tells you exactly what is needed.

  5. Solve -- Run the optimization with your data. The SCIP solver processes the model and returns the optimal solution.

Example: Knapsack Problem

The knapsack template models the classic problem of selecting items to maximize total value within a weight capacity:

Input schema:

{
  "capacity": 50,
  "items": [
    { "name": "laptop", "value": 600, "weight": 10 },
    { "name": "camera", "value": 500, "weight": 5 },
    { "name": "tent", "value": 300, "weight": 15 },
    { "name": "food", "value": 200, "weight": 20 },
    { "name": "binoculars", "value": 150, "weight": 3 }
  ]
}

What the template generates:

  • One binary variable per item (include or exclude)
  • A weight capacity constraint
  • An objective to maximize total value of selected items

Solving via API:

import httpx
 
response = httpx.post(
    "https://api.jaot.io/api/v2/solve/templates/knapsack/solve",
    headers={"Authorization": "Bearer ok_live_your_key_here"},
    json={
        "capacity": 50,
        "items": [
            {"name": "laptop", "value": 600, "weight": 10},
            {"name": "camera", "value": 500, "weight": 5},
            {"name": "tent", "value": 300, "weight": 15},
            {"name": "food", "value": 200, "weight": 20},
        ],
    },
)
result = response.json()
print(f"Selected items: {result['solution']}")

Customizing Templates

After loading a template into the builder, you have full control to modify it:

  • Add variables -- Introduce new decision variables with custom types and bounds
  • Edit constraints -- Modify expressions, change inequality directions, or adjust right-hand-side values
  • Change bounds -- Update variable lower and upper bounds to match your scenario
  • Modify the objective -- Change coefficients, add terms, or switch between minimize and maximize
  • Remove components -- Delete variables or constraints that do not apply to your use case

All modifications are reflected in real time on the visual canvas.

Templates via API

Templates are also available through the REST API and MCP, so you can integrate them into automated workflows:

# List all available templates (no auth required)
curl https://api.jaot.io/api/v2/solve/templates
 
# Get details for a specific template
curl https://api.jaot.io/api/v2/solve/templates/knapsack
 
# Solve with a template
curl -X POST https://api.jaot.io/api/v2/solve/templates/knapsack/solve \
  -H "Authorization: Bearer ok_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"capacity": 50, "items": [...]}'

See the Solve API reference for full request and response schemas.

Templates vs. AI Assistant

AspectTemplatesAI Assistant
SpeedInstant -- model is pre-builtRequires a conversation to generate
CustomizationModify after loadingFully custom from the start
Credit costNo AI credits for formulationAI credits for each message
Best forStandard problem types with known structureNovel problems, unique constraints, domain-specific requirements

Tip: Start with a template when your problem matches a known type, then use the AI assistant to add custom constraints or modify the formulation for your specific needs.