---
title: "Widget Brain Provider"
canonical: "https://help.fieldbuddy.com/space/FBDOCS/6056869917/Widget%20Brain%20Provider"
format: markdown
---
Widget Brain is a default provider for FieldBuddy Smart planning.

Label of that is Widget Brain 2.

## How it works

Given provider is based on a A Mixed-Integer Programming (MIP) principle, that  is a mathematical tool used to find the best solution (optimal solution) for an optimisation problem.

In simple terms, it constructs a problem in a format of a mathematic equation, where each single element has its own cost. Example of such are unplanned appointments, each minute of travel time, each minute of idle time or new shift. The main goal it is to minimise the total sum of all of the costs, since the smaller value – the smaller amount of total travel time, or less shifts used or less unplanned tasks

By changing the Unassigned task cost, it is possible to determine when it is reasonable to drop tasks from being planned (for example, if it is more reasonable to skip the task rather then travelling for few extra hours)

## Settings

It is possible to adjust some of the options mentioned above in the settings of the Widget Brain 2 tab

![image-20250210-134224.png](media://16cca43d-47ab-43d8-a10a-7f7ef04bd370)

Inside it there are 3 tabs. First tab contains all the options, while other 2 might be handy for FieldBuddy team to perform quick checks in case of any issues

All of the adjustable settings could be split up for a following categories:

## Standard Settings

**Country - **country describes which data set is used to get the travel matrix. 

Possible values are for example **netherlands-latest**, **belgium-latest, **or** great-britain-latest**.  
More options could be found here - [https://download.geofabrik.de/europe.html](https://download.geofabrik.de/europe.html) 

> ⚠️ Smart planning could only optimize an appointments and resources in one country

### **Cost Parameters**

- **Travel Cost:** (per minute, default: `10`) - cost of travel of each minute
- **Idle Cost:**  (per minute, default: `0.1`) - cost of idle of each minute of each shift (not travel and not planned time)
- **New Shift Cost:**  (default: `100`) - cost of new shift
- **Unassigned Task Cost per task:**  (per task, default: `20,000`) - cost of an unplanned task considering work order priority (penalty is tasks divided by priority, where high is 2, medium - 3 and low - 4)
- **Unassigned Task Cost per minute:** (per minute of task, default: `0`) - cost of each minute of unplanned task

### **Travel Settings**

- **Include travel from Start Location** *(default: True)*
- **Include travel to End Location** *(default: True)*
- **Travel time rounding:** `5` *(default: 5)*

###  **Advanced Parameters**

- **Alternative processing of locked appointments** *(default: False) - *allows to approach the locked appointments differently. Normally Smart planning might consider certain appointmens over the other if shift time is limited or appointments is not placed efficiently (so for example, few other tasks could be performed instead on one locked in time). This options allows to “force” the locked appointments to be always planned as they are. It also has a downside -  entire optimisation will be executed if locked appointments double booked or  are not realistic in terms of travel time (for example, two adjacently locked appointments with travel times between them might cause this issue)
- **Optimize planning of appointments on same location** *(default: False) – *If enabled, Smart Planning **bundles** appointments at the same location, ensuring that appointments on the same location will have more probability to be executed during same shift. In case if selected option is checked - it makes sense to adjust cost of unplanned task per minute above unplanned  task per task. Good starting values would be 100 (per task) and 2000 (per minute) instead of default 20000 (per task) and 0 (per minute)
- **Max duration in minutes of bundled appointments at the same location:**  *(default: 120)*
- **Maximum number of task combinations:**  *(default: 400) - initial* amount of various combinations for each shift. It is not advised to set it more then 2500 due to excessive optimisation time (> 10 minutes)
- **Time allocated to solver for solving one iteration:** *(default: 30)*
- **Total time allocated for running k-opt:**  *(default: 500)*
- **Runtime:**  *(default: 120)*
- **MipGap - relative optimality gap:**  *(default: 0.01)*
- **Unassigned Task Reason  -  **describes if unassigned task reason is returned
- **Ignore Work Order Priority** *(default: False) - *allows to treat all work orders and appointments as if they have the same priority
- **Raise Priority for Planned Appointments** *(default: False) -* allows to raise priority for allready planed appointments. Can be handy in case if optimizing of already planned appointments to reduce risks that currently planned appointments will be discarded

## Extra Settings

![image (13)-20250213-104108.png](media://d5e9842a-b58e-4792-955a-f6e3706761ab)

It is possible to specify extra settings. Description of those are in that tab. Make sure to use the “MIP v2 Extra Settings”. Only these can be used with the v2 version of the algorithm as selected on the Standard Settings tab. 

> ⚠️ Adjusting these settings are at your own risk. Please do this in a sandbox environment before using them in production.

## Optimization Playground

That is a tool that allows to run optimisation problem manually, as well as re-run existing ones for testing purposes. Use at own risk!