Docs
  • Solver
  • Models
    • Field Service Routing
    • Employee Shift Scheduling
    • Pick-up and Delivery Routing
    • Task Scheduling
  • Platform
Try models
  • Task Scheduling
  • User guide
  • Input datasets
  • Model configuration

Task Scheduling

    • Introduction
    • Getting started: Hello world
    • User guide
      • Terminology
      • Scheduling API concepts
      • Integration
      • Constraints
      • Using the API
        • Using the OpenAPI spec
        • API tooling
      • Demo datasets
      • Input datasets
        • Model configuration
        • Model input
      • Output datasets
        • Metadata
        • Model output
        • Input metrics
        • Key performance indicators (KPIs)
      • Job types and machine types
      • Resource-specific durations
      • Freeze jobs until
      • Metrics and optimization goals
      • Score analysis
      • Validation
    • Machine and employee resource constraints
      • Machine unavailability
      • Resource transitions
      • Employee resources
    • Job service constraints
      • Time windows
      • Time management
      • Job dependencies
      • Priority jobs
      • Tags and specific resources
    • Real-time planning
    • Changelog
    • Upgrading to the latest versions
    • Feature requests

Model configuration

The model configuration config object of the input dataset includes the run and model objects.

Run

In the run object you can specify a name for the dataset, the termination settings to be applied to the dataset, the maxThreadCount, and tags to be applied to the dataset:

{
  "config": {
    "run": {
      "name": "Dataset name",
      "termination": {
        "spentLimit": "PT30M",
        "unimprovedSpentLimit": "PT5M",
        "stepCountLimit": 0
      },
      "maxThreadCount": 1,
      "tags": [
        "Control"
      ]
    }
  }
}

Termination settings can be specified per dataset to override the termination settings in the configuration profile.

  • spentLimit sets the maximum duration (in ISO 8601 duration format) for solving a dataset.

  • unimprovedSpentLimit sets the maximum duration (in ISO 8601 duration format) for solving a dataset since the dataset score improved. If no value is provided, the default diminished returns termination will apply. If set, stepCountLimit must be empty. Warning: using this option will disable the default diminished returns termination which is recommended for most use cases

  • stepCountLimit sets the maximum solver step count for solving a dataset. The solver will stop solving after a pre-determined amount of steps. Use when you require results independently of the hardware resources performance. Use this termination if you want to benchmark your models, not recommended for production use. If set, unimprovedSpentLimit must be empty. Warning: using this option will disable the default diminished returns termination which is recommended for most use cases.

  • slidingWindowDuration sets the sliding window (in ISO 8601 duration format) over which score improvement is measured by the diminished returns termination. Defaults to PT30S when omitted. Only takes effect when diminished returns termination is active (i.e. unimprovedSpentLimit and stepCountLimit are both empty).

  • minimumImprovementRatio sets the minimum ratio between current and initial improvement before the diminished returns termination kicks in. Must be strictly positive. Defaults to 0.0001 when omitted. Only takes effect when diminished returns termination is active (i.e. unimprovedSpentLimit and stepCountLimit are both empty).

Diminished returns terminates the solver early if expected improvements are minimal, saving on CPU costs. This termination is desirable since it terminates based on the relative rate of improvement, and behaves similarly on different hardware and different problem instances. Use slidingWindowDuration and minimumImprovementRatio to fine-tune its sensitivity. You can find more details in the documentation.

Learn more about termination settings.

Thread Count: The default number of threads used for solving is 1. maxThreadCount can be used to specify a maximum number of threads to use.

The maximum number of available threads is determined by the model and by the tenant plan.

Tags are applied to the dataset and allow you to filter your datasets in the Timefold Platform UI based on tags. Tags are helpful for organizing your datasets to represent different segments of your data, for instance, different regions or departments.

Learn more about tags and searching and categorizing datasets for auditability.

Model

The model object contains configuration overrides for individual (soft) constraints weights and additional global model configuration attributes:

{
  "config": {
    "model": {
      "overrides": {
        "exampleConstraintWeight": 0
      }
    }
  }
}
Replace exampleConstraintWeight with the constraint weights you want to configure.

For information about configuring constraint weights, see the Constraints documentation.

Using configuration profiles

Rather than specifying configuration parameters inline in each dataset, it is recommended to manage them via configuration profiles in Timefold Platform. Configuration profiles let you change parameters through the platform UI without modifying your input data, and ensure the same settings are applied consistently across datasets.

Learn more about configuration parameters and profiles.

Specifying a configuration profile

You can specify which configuration profile to use by appending the profile ID as a query parameter to the POST URL.

For instance: ?configurationId=b7eef8b5-14ca-4a45-a943-582381bd1b08

The profile name can be used instead of the ID, but this is less recommended: if the profile is renamed, the query parameter will no longer match the intended profile.

Alternatively, the profile can be selected in the platform UI when creating or re-solving a dataset.

Next

  • See the full API spec or try the online API.

  • Learn about the Model input.

  • © 2026 Timefold BV
  • Timefold.ai
  • Documentation
  • Changelog
  • Send feedback
  • Privacy
  • Legal
    • Light mode
    • Dark mode
    • System default