Declare
Objectives, budget, floors, values and seasonality
Allocate with constraints. Decide with evidence.
CLARO (Constrained Linear Allocation and Resource Optimiser) is free, open-source decision-support software that allocates a fixed marketing budget across advertising platforms and business objectives using linear programming. It turns historical KPI performance, business priorities and real operating constraints into a single auditable optimisation model, then explains which constraints shaped the result.
CLARO stands for Constrained Linear Allocation and Resource Optimiser. Given a fixed marketing budget, a set of business objectives and your historical platform performance, it solves a linear program that decides how much budget each platform-objective pair should receive — and then reports which constraints stopped the allocation going further.
It runs two ways. The hosted optimiser is a guided browser application that needs no installation. The Python engine installs from PyPI as claro-engine and can be used directly in notebooks or pipelines. Both are MIT-licensed and share the same solver.
pip install claro-engineMarketing budgets have competing objectives, uneven data quality and real operating limits. Those constraints are often applied informally, after the analysis.
CLARO makes the decision structure visible first. It then solves the allocation and explains why the result stopped where it did.
How CLARO works
Each layer is separate, reviewable and designed to be challenged.
Objectives, budget, floors, values and seasonality
Historical KPI productivity and data quality
LP allocation under named constraints
Robustness, trade-offs and recommendations
Core capabilities
Not a black box and not an automated media buyer. CLARO is a structured planning framework.
Make objectives, priorities, minimum spends, goal values, reserve and seasonality explicit before solving.
Allocate across platform-objective cells with diminishing returns and named, auditable LP constraints.
Compare conservative, base and optimistic scenarios, with optional Monte Carlo stability testing.
Surface binding constraints, shadow prices, concentration, risks and a feasible risk-managed alternative.
Who uses CLARO
The common thread is a fixed budget, competing objectives and a decision that will be questioned.
Split a fixed quarterly or campaign budget across platforms and objectives, and produce a plan that survives being questioned by finance.
Replace spreadsheet heuristics with a reproducible LP model whose assumptions, constraints and shadow prices are all inspectable.
Show a client not only the recommended allocation but the constraint that stopped it going further, and a risk-managed alternative plan.
Use a documented, tested, citable operations-research application of linear programming to a real marketing decision problem.
Example use case
A B2B software company has £120,000 for one quarter, split across lead generation, website traffic and awareness. Sales need at least 400 qualified leads. Brand require a minimum of £15,000 on awareness. LinkedIn has only 21 days of history, so its cost-per-lead estimate is unreliable.
Enter the £120,000 budget, the three objectives, a £15,000 awareness floor, a 10% test-and-learn reserve, and a goal value of £200 per qualified lead.
Upload platform CSV exports. CLARO composes canonical KPI counts and shrinks LinkedIn's 21-day productivity toward the cross-platform mean rather than trusting it outright.
The LP maximises weighted productivity subject to every declared constraint, with diminishing-returns brackets stopping any single cell from absorbing the plan.
The awareness floor is reported as binding with a shadow price, showing exactly what the brand minimum costs in forecast leads — and a Plan B is produced with less concentration risk.
What you get
CLARO preserves the distinction between model output and managerial judgement. Every result carries the assumptions and caveats needed to assess it.
Read the project wikiPlatform-objective allocation
+Three-scenario comparison
+Data-driven forecast bands
+Binding constraints and shadow prices
+Diagnostic index and classification
+Plan A and risk-managed Plan B
+PDF and Excel decision artefacts
+Frequently asked questions
Yes. CLARO is a free, MIT-licensed, open-source decision-support tool that allocates a limited marketing budget across platforms and objectives under explicit constraints, using linear programming. The Python engine installs with pip install claro-engine, the source is on GitHub, and a hosted browser version runs with no installation.
CLARO builds a linear program over platform-objective cells. It maximises weighted KPI productivity subject to the constraints you declare — total budget, per-platform minimum spend, per-objective minimums, a test-and-learn reserve and seasonality multipliers — with diminishing-returns brackets so no single cell absorbs the entire plan. The solver is PuLP with the CBC backend.
Historical performance exports from your advertising platforms as CSV files, plus your budget, objectives and constraints. CLARO parses the standard exports from twelve platforms, detects encoding and delimiter automatically, and composes each platform's raw columns into canonical KPI counts with a documented rationale for what is included and excluded.
No. CLARO works from CSV exports and does not operate campaigns, place bids or connect to advertising APIs. It also does not estimate causal incrementality — it optimises against the KPI data you supply and inherits that data's strengths and biases. These boundaries are stated deliberately as part of the method.
Yes. The hosted Streamlit application provides a guided wizard covering every input the optimiser needs, and returns the allocation, scenario comparison, binding constraints and downloadable PDF and Excel artefacts. Python users can instead install the engine directly with pip install claro-engine.
Yes. CLARO is released under the MIT licence, which permits commercial use, modification and redistribution, subject to retaining the copyright and licence notice.
Cite the peer-reviewed SoftwareX paper: Rezvanjoo, H. (2026). CLARO: Constrained budget allocation with rule-based decision interpretation. SoftwareX, 35, 102935. DOI 10.1016/j.softx.2026.102935. For a specific software release, use the corresponding Zenodo DOI.
Evidence and reproducibility
Code, tests, examples and implementation history.
Packageclaro-engine on PyPIInstall the optimisation engine with pip and use it directly.
PublicationPublished in SoftwareXPeer-reviewed paper describing CLARO's constrained allocation and decision-interpretation framework.
Peer-reviewed paper
Rezvanjoo, H. (2026). CLARO: Constrained budget allocation with rule-based decision interpretation. SoftwareX, 35, 102935. doi:10.1016/j.softx.2026.102935
Software release
Hoda Rezvanjoo. CLARO: Constrained Linear Allocation and Resource Optimiser — a Decision-Support Framework for Marketing Budget Allocation. Version 0.2.1. Zenodo. doi:10.5281/zenodo.21230206
Scope matters
CLARO allocates at platform-objective level. It does not operate campaigns, connect directly to advertising APIs or estimate causal incrementality.
It inherits the strengths and biases in the KPI data supplied. That boundary is stated because a useful model should make its limits as visible as its outputs.
Start with the decision structure
Run the guided optimiser in your browser, or install the engine and inspect the full open-source method.