Skip to main content

Documentation Index

Fetch the complete documentation index at: https://feasible-1447f9c5.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

This example introduces a small business question: limited capacity and demand to meet at minimum cost.

The problem

A small bakery plans production over the next four weeks. They make three products: bread, croissants, and cakes. Each product takes a known number of oven-hours per batch and faces a forecasted weekly demand. Anything baked but not sold this week can be carried into next week, but storage costs money.
ProductOven-hours per batch
Bread1.0
Croissants1.5
Cakes2.0
Forecasted demand (batches):
WeekBreadCroissantsCakes
120128
2181510
322239
4251820
Capacity: 80 oven-hours per week. Whole batches: It is not possible to produce fractional batches Holding cost: $2 per batch carried into the next week, regardless of product. Starting inventory: 0 for each product. End-of-horizon: leftover inventory in week 4 has no value (it spoils). Goal: decide how much of each product to bake each week to meet all demand at minimum holding cost.

What you do

Paste the problem into Feasible. You don’t need to give any modeling hints — try it cold, then read what the agent built. For convenience, here’s the problem as dm formatted text
Bakery problem
A small bakery plans production over the next four weeks. They make three products: **bread**, **croissants**, and **cakes**. Each product takes a known number of oven-hours per batch and faces a forecasted weekly demand. Anything baked but not sold this week can be carried into next week, but storage costs money.

| Product    | Oven-hours per batch |
|------------|---------------------:|
| Bread      |                  1.0 |
| Croissants |                  1.5 |
| Cakes      |                  2.0 |

Forecasted demand (batches):

| Week | Bread | Croissants | Cakes |
|-----:|------:|-----------:|------:|
|  1   |  20   |     12     |   8   |
|  2   |  18   |     15     |  10   |
|  3   |  22   |     23     |   9   |
|  4   |  25   |     18     |  20   |

Capacity: **80 oven-hours per week**.
Whole batches: **It is not possible to produce fractional batches**
Holding cost: **$2 per batch carried into the next week**, regardless of product.
Starting inventory: **0** for each product.
End-of-horizon: leftover inventory in week 4 has no value (it spoils).

**Goal:** decide how much of each product to bake each week to **meet all demand** at **minimum holding cost**.
Shared workflow: open in Feasible.

What happens

The agent’s standard form will look roughly like this:
  • Decision variables.
    • produce[p, t] — integer batches of product p in week t.
    • inventory[p, t] — batches of product p carried at end of week t.
  • Constraints.
    • Inventory balance, per product per week: inventory[p, t-1] + produce[p, t] = demand[p, t] + inventory[p, t]. Starting inventory is zero.
    • Oven capacity, per week: sum over p of hours[p] * produce[p, t] <= 80.
    • Non-negativity and integrality on production and inventory.
  • Objective. Minimize sum of 2 * inventory[p,t] over all p, t.
    • Note that the 2 here is unneccessary for finding the optimal solution: minimizing x is the same as minimizing 2x. However, the choosing the factor 2 means that the objective value corresponts to the inventory cost.
It will then do a self-check and, if passed, call the solver on this problem. Since this is a Mixed-Integer Linear Program (MILP), it will likely use HiGHS as solver. And for a tiny problem like this, it will solve the problem in a few milliseconds. The most important information from the solver result are:
  • The status (OPTIMAL if the problem was formulated correctly)
  • The objective value, which is the numeric value of the Objective at the found solution. In this case, the value tells you the expected inventory cost.
  • The variable values, which tell you how much to produce in each period.
In the next step, the agent will take the solver result and interpret it within the problem statement. It will also generate a list of key decisions, that in this context might look something like
  • Produce 13 cakes in week 2
  • Produce 12 cakes in week 3
  • Produce 14 cakes in week 4
  • Produce 19 bread in week 2
  • Produce 21 bread in week 3
  • Produce exactly the demand in all other weeks
There are several optimal solutions to this problem that result in the same holding cost. Common is that in total, 10 batches will have to be carried from one week to the next.

Things to notice

  • The structure is multi-period: The agent links weeks together via the inventory-balance equation. Watch how the Constraints panel groups these.
  • Self-evaluation: Because there’s a quantitative objective, Feasible can sanity-check things like “is the total equal to the sum of holding cost?” and “does inventory + production cover demand each week?” You see this in the Evaluation panel.
  • Solver logs: The raw output from the solver is displayed in a special card on the right.

Using the result

You can download the results as json, which contain the values of all optimization variables in machine-readable format. This is the loop that makes Feasible useful for non-trivial problems: you and the agent converge on a model together. The Using Feasible section covers this loop in more depth.