Model deep dive

Every worksheet of the uploaded AI + Quantum pricing workbook, rebuilt here as a live running model. Each section below matches a sheet, but the numbers are computed by the engine rather than frozen in a cell.

Products
19
after name normalisation
Binary variables
93
93 feasible after the margin floor
Parsed order lines
769
1179 units sold
Optimality gap
0.0000%
quantum-inspired vs exact

00 · What this model does

Purpose, mathematics and honest limits.

The engine picks one price per product, all products at once, to maximise a blended business score: profit, stock sell-through and customer value up; expected spoilage and price movement down. It re-optimises every 30 minutes on refreshed demand and stock inputs.

The source file holds 400 orders and 769 parsed lines. It contains no cost, stock or spoilage data, so those are clearly-labelled synthetic assumptions you can edit on the Product model page.

The problem is written as a QUBO and solved twice — exactly, and with quantum-inspired annealing — so every run carries proof of how close the quantum-style answer is. No physical quantum hardware is involved.

Binary decision
x(i,k) = 1 when product i is sold at candidate price k
One price per product
Σₖ x(i,k) = 1 for every product i
Minimum margin
(Price − Cost) / Price ≥ 15%; other candidates disabled
Objective
Max Σ x(i,k) × [0.45·Profit + 0.20·Sell-through + 0.15·Customer value + 0.10·Waste score − 0.10·Volatility] × 100
Portfolio stability
0.98 ≤ average selected price index ≤ 1.02
QUBO Hamiltonian
H(x) = −Σ U(i,k)·x(i,k) + A·Σᵢ(Σₖ x(i,k) − 1)² + B·(AvgIndex − 1)²

01 · Parameters

Live engine defaults — change them on the Optimizer page and re-run.

ParameterValueTypeNotes
Minimum margin15%ConstraintNot in the source file — editable default.
Average price index min0.98ConstraintPortfolio stability lower bound.
Average price index max1.02ConstraintPortfolio stability upper bound.
Target price index1.00ObjectiveQuadratic pull toward today's average price.
Re-optimisation cadence30 minRuntimeScheduled engine refresh.
Price candidates0.90×, 0.95×, 1.00×, 1.05×, 1.10×Search spaceRounded to the nearest ₹5.
Profit weight0.45ObjectiveLargest single driver.
Inventory weight0.20ObjectiveRewards sell-through.
Customer value weight0.15ObjectiveRewards keeping prices attractive.
Waste weight0.10ObjectivePenalises spoilage.
Volatility weight0.10ObjectivePenalises price movement.
Annealing restarts / steps24 / 1500SolverQuantum-inspired sampler budget.

02 · Parsed lines → 03 · Product model

Each product rolled up from the order text, then given its synthetic cost, stock and sensitivity assumptions.

ProductLinesUnitsMin ₹Mean ₹Max ₹Baseline ₹Cost ₹DemandStockSensitivitySpoilage
(Kaju) Cashew Nuts (W-210)120153540921135588362015.256-1.290.14
Avacado (Canadian)48701451621751601156.928-1.360.04
Chausa Mango (Uttar Pradesh)12182002232402201551.85-1.480.07
Dragon Fruit (Vietnam)376665707570456.517-1.540.14
Dry fruits Chocolate(Energy bar) (Salima)42871802032202001408.626-1.190.12
Dussheri Mango (Malyabadi)331502003001501051.05-1.160.11
Imported Apples (Imported)60882903263603252058.725-1.190.06
Imported Apples (Queen) (Imported)7010225028231028017510.120-1.050.03
Imported Blueberries (Canadian)40602002222502251506.024-1.760.07
Imported Orange (Mandarin)44651802022202001256.415-1.110.04
Imported Pears (Imported)67932953303653302359.223-1.510.07
Kashmiri Cherry (Kashmiri dark red)14144404925404903251.45-1.610.03
Langda Mango (Gujarati)21281201571801551002.811-1.380.10
Muscat green Grapes (Imported)45636757458257505256.221-1.250.13
Peru (Guava) (Indian)4795809610595609.441-1.420.11
Rambutan Litchi (Muzaffarpur)20302903293603252053.08-1.130.05
Red & Dark Purple Plums (Kashmiri)38562252542752501705.613-1.090.10
Red king Pomegrante(Anaar) (Kashmiri)3986120134150135958.527-1.210.12
Shahi Litchi (Muzaffarpur)223003003003002101.05-1.200.12

Cost, stock, sensitivity and spoilage are synthetic. Everything left of them comes straight from the uploaded orders.

04 · Price candidates & 06 · QUBO variable registry

One binary variable per product-and-price pair. Infeasible candidates are removed before the QUBO is built.

Variables x(i,k)
93
Feasible
93
Blocked by margin floor
0
VariableProductPrice ₹IndexMarginFeasibleDemandProfit ₹WasteUtilitySelected
x_1_1(Kaju) Cashew Nuts (W-210)7950.90122.0%yes17.430397.1520.420
x_1_2(Kaju) Cashew Nuts (W-210)8400.95226.2%yes16.235587.2130.660
x_1_3(Kaju) Cashew Nuts (W-210)8851.00329.9%yes15.140067.2738.980
x_1_4(Kaju) Cashew Nuts (W-210)9251.04833.0%yes14.343557.3144.22x = 1
x_1_5(Kaju) Cashew Nuts (W-210)9701.09936.1%yes13.447007.3548.870
x_2_1Avacado (Canadian)1450.90620.7%yes7.92380.9419.500
x_2_2Avacado (Canadian)1500.93823.3%yes7.62650.9526.520
x_2_3Avacado (Canadian)1601.00028.1%yes6.93120.9538.140
x_2_4Avacado (Canadian)1701.06332.4%yes6.43520.9645.88x = 1
x_2_5Avacado (Canadian)1751.09434.3%yes6.13690.9648.920
x_3_1Chausa Mango (Uttar Pradesh)2000.90922.5%yes2.1930.2822.020
x_3_2Chausa Mango (Uttar Pradesh)2100.95526.2%yes1.91050.2932.330
x_3_3Chausa Mango (Uttar Pradesh)2201.00029.5%yes1.81160.2940.710
x_3_4Chausa Mango (Uttar Pradesh)2301.04532.6%yes1.71250.2946.56x = 1
x_3_5Chausa Mango (Uttar Pradesh)2401.09135.4%yes1.61330.2951.050
x_4_1Dragon Fruit (Vietnam)650.92930.8%yes7.31472.0321.120
x_4_2Dragon Fruit (Vietnam)701.00035.7%yes6.51642.0640.860
x_4_3Dragon Fruit (Vietnam)751.07140.0%yes5.91772.1053.35x = 1
x_5_1Dry fruits Chocolate(Energy bar) (Salima)1800.90022.2%yes9.83912.7021.830
x_5_2Dry fruits Chocolate(Energy bar) (Salima)1900.95026.3%yes9.24582.7231.480
x_5_3Dry fruits Chocolate(Energy bar) (Salima)2001.00030.0%yes8.65182.7539.56x = 1
x_5_4Dry fruits Chocolate(Energy bar) (Salima)2101.05033.3%yes8.15702.7745.300
x_5_5Dry fruits Chocolate(Energy bar) (Salima)2201.10036.4%yes7.76162.7949.930
x_6_1Dussheri Mango (Malyabadi)1350.90022.2%yes1.1340.5218.690
x_6_2Dussheri Mango (Malyabadi)1450.96727.6%yes1.0420.5331.420
x_6_3Dussheri Mango (Malyabadi)1501.00030.0%yes1.0450.5336.78x = 1
x_6_4Dussheri Mango (Malyabadi)1601.06734.4%yes0.9510.5344.470
x_6_5Dussheri Mango (Malyabadi)1651.10036.4%yes0.9540.5347.580
x_7_1Imported Apples (Imported)2950.90830.5%yes9.88821.3421.660
x_7_2Imported Apples (Imported)3100.95433.9%yes9.29701.3630.650
x_7_3Imported Apples (Imported)3251.00036.9%yes8.710471.3738.250
x_7_4Imported Apples (Imported)3401.04639.7%yes8.311161.3843.75x = 1
x_7_5Imported Apples (Imported)3601.10843.1%yes7.711971.3950.100
x_8_1Imported Apples (Queen) (Imported)2500.89330.0%yes11.48550.4925.810
x_8_2Imported Apples (Queen) (Imported)2650.94634.0%yes10.79650.5035.340
x_8_3Imported Apples (Queen) (Imported)2801.00037.5%yes10.110620.5042.91x = 1
x_8_4Imported Apples (Queen) (Imported)2951.05440.7%yes9.611490.5148.200
x_8_5Imported Apples (Queen) (Imported)3101.10743.5%yes9.112270.5153.020
x_9_1Imported Blueberries (Canadian)2050.91126.8%yes7.03861.4819.440
x_9_2Imported Blueberries (Canadian)2150.95630.2%yes6.44191.5029.840
x_9_3Imported Blueberries (Canadian)2251.00033.3%yes6.04461.5137.74x = 1
x_9_4Imported Blueberries (Canadian)2351.04436.2%yes5.54691.5242.730
x_9_5Imported Blueberries (Canadian)2501.11140.0%yes4.94941.5348.010
x_10_1Imported Orange (Mandarin)1800.90030.6%yes7.23990.5424.050
x_10_2Imported Orange (Mandarin)1900.95034.2%yes6.84440.5533.430
x_10_3Imported Orange (Mandarin)2001.00037.5%yes6.44830.5641.36x = 1
x_10_4Imported Orange (Mandarin)2101.05040.5%yes6.15190.5647.070
x_10_5Imported Orange (Mandarin)2201.10043.2%yes5.85510.5751.730
x_11_1Imported Pears (Imported)2950.89420.3%yes10.96551.3723.950
x_11_2Imported Pears (Imported)3150.95525.4%yes9.97911.3935.750
x_11_3Imported Pears (Imported)3301.00028.8%yes9.28761.4142.27x = 1
x_11_4Imported Pears (Imported)3451.04531.9%yes8.69491.4246.510
x_11_5Imported Pears (Imported)3651.10635.6%yes7.910301.4450.830
x_12_1Kashmiri Cherry (Kashmiri dark red)4400.89826.1%yes1.71900.1520.940
x_12_2Kashmiri Cherry (Kashmiri dark red)4650.94930.1%yes1.52110.1631.960
x_12_3Kashmiri Cherry (Kashmiri dark red)4901.00033.7%yes1.42290.1640.18x = 1
x_12_4Kashmiri Cherry (Kashmiri dark red)5151.05136.9%yes1.32440.1645.240
x_12_5Kashmiri Cherry (Kashmiri dark red)5401.10239.8%yes1.22550.1648.730
x_13_1Langda Mango (Gujarati)1400.90328.6%yes3.21281.0219.860
x_13_2Langda Mango (Gujarati)1450.93531.0%yes3.01371.0326.980
x_13_3Langda Mango (Gujarati)1551.00035.5%yes2.81531.0438.55x = 1
x_13_4Langda Mango (Gujarati)1651.06539.4%yes2.51661.0545.920
x_13_5Langda Mango (Gujarati)1701.09741.2%yes2.41711.0548.720
x_14_1Muscat green Grapes (Imported)6750.90022.2%yes7.110702.4921.080
x_14_2Muscat green Grapes (Imported)7150.95326.6%yes6.612602.5231.520
x_14_3Muscat green Grapes (Imported)7501.00030.0%yes6.214062.5339.07x = 1
x_14_4Muscat green Grapes (Imported)7901.05333.5%yes5.915512.5545.110
x_14_5Muscat green Grapes (Imported)8251.10036.4%yes5.516632.5749.280
x_15_1Peru (Guava) (Indian)850.89529.4%yes11.02764.2019.590
x_15_2Peru (Guava) (Indian)900.94733.3%yes10.23054.2430.440
x_15_3Peru (Guava) (Indian)951.00036.8%yes9.43304.2738.60x = 1
x_15_4Peru (Guava) (Indian)1001.05340.0%yes8.83504.2943.840
x_15_5Peru (Guava) (Indian)1051.10542.9%yes8.23684.3247.930
x_16_1Rambutan Litchi (Muzaffarpur)2950.90830.5%yes3.32990.3322.130
x_16_2Rambutan Litchi (Muzaffarpur)3100.95433.9%yes3.13300.3330.960
x_16_3Rambutan Litchi (Muzaffarpur)3251.00036.9%yes3.03570.3438.510
x_16_4Rambutan Litchi (Muzaffarpur)3401.04639.7%yes2.83820.3444.04x = 1
x_16_5Rambutan Litchi (Muzaffarpur)3601.10843.1%yes2.74110.3450.550
x_17_1Red & Dark Purple Plums (Kashmiri)2250.90024.4%yes6.23431.0523.960
x_17_2Red & Dark Purple Plums (Kashmiri)2400.96029.2%yes5.84061.0734.970
x_17_3Red & Dark Purple Plums (Kashmiri)2501.00032.0%yes5.64441.0841.210
x_17_4Red & Dark Purple Plums (Kashmiri)2651.06035.8%yes5.24951.0947.99x = 1
x_17_5Red & Dark Purple Plums (Kashmiri)2751.10038.2%yes5.05261.1051.700
x_18_1Red king Pomegrante(Anaar) (Kashmiri)1200.88920.8%yes9.82462.9321.510
x_18_2Red king Pomegrante(Anaar) (Kashmiri)1300.96326.9%yes8.93122.9734.650
x_18_3Red king Pomegrante(Anaar) (Kashmiri)1351.00029.6%yes8.53412.9839.62x = 1
x_18_4Red king Pomegrante(Anaar) (Kashmiri)1401.03732.1%yes8.23673.0043.180
x_18_5Red king Pomegrante(Anaar) (Kashmiri)1501.11136.7%yes7.54133.0349.450
x_19_1Shahi Litchi (Muzaffarpur)2700.90022.2%yes1.1680.5618.720
x_19_2Shahi Litchi (Muzaffarpur)2850.95026.3%yes1.1800.5728.620
x_19_3Shahi Litchi (Muzaffarpur)3001.00030.0%yes1.0900.5736.90x = 1
x_19_4Shahi Litchi (Muzaffarpur)3151.05033.3%yes0.9990.5742.810
x_19_5Shahi Litchi (Muzaffarpur)3301.10036.4%yes0.91070.5747.570

05 · Optimization result

Latest saved run — exact solve next to the quantum-inspired solve.

ProductBaseline ₹Exact ₹QUBO ₹ChangeMarginDemandSell-throughProfit ₹WasteUtilityMatch
(Kaju) Cashew Nuts (W-210)8839259254.8%33.0%14.325%43557.3144.22MATCH
Avacado (Canadian)1601701706.3%32.4%6.423%3520.9645.88MATCH
Chausa Mango (Uttar Pradesh)2202302304.5%32.6%1.733%1250.2946.56MATCH
Dragon Fruit (Vietnam)7075757.1%40.0%5.935%1772.1053.35MATCH
Dry fruits Chocolate(Energy bar) (Salima)2002002000.0%30.0%8.633%5182.7539.56MATCH
Dussheri Mango (Malyabadi)1501501500.0%30.0%1.020%450.5336.78MATCH
Imported Apples (Imported)3253403404.6%39.7%8.333%11161.3843.75MATCH
Imported Apples (Queen) (Imported)2802802800.0%37.5%10.151%10620.5042.91MATCH
Imported Blueberries (Canadian)2252252250.0%33.3%6.025%4461.5137.74MATCH
Imported Orange (Mandarin)2002002000.0%37.5%6.443%4830.5641.36MATCH
Imported Pears (Imported)3303303300.0%28.8%9.240%8761.4142.27MATCH
Kashmiri Cherry (Kashmiri dark red)4904904900.0%33.7%1.428%2290.1640.18MATCH
Langda Mango (Gujarati)1551551550.0%35.5%2.825%1531.0438.55MATCH
Muscat green Grapes (Imported)7507507500.0%30.0%6.230%14062.5339.07MATCH
Peru (Guava) (Indian)9595950.0%36.8%9.423%3304.2738.60MATCH
Rambutan Litchi (Muzaffarpur)3253403404.6%39.7%2.835%3820.3444.04MATCH
Red & Dark Purple Plums (Kashmiri)2502652656.0%35.8%5.240%4951.0947.99MATCH
Red king Pomegrante(Anaar) (Kashmiri)1351351350.0%29.6%8.532%3412.9839.62MATCH
Shahi Litchi (Muzaffarpur)3003003000.0%30.0%1.020%900.5736.90MATCH

06 · QUBO model

How the business problem becomes an energy function.

Decision variables
93 binary candidate variables across 19 products.
One-hot penalty
A × Σᵢ (Σₖ x(i,k) − 1)² keeps exactly one price alive per product.
Business term
− Σ U(i,k)·x(i,k): lower energy means higher business utility.
Portfolio coupling
B × (average selected price index − 1.00)² holds the basket steady.
Minimum margin
Candidates under the floor are fixed to zero before sampling.
Quantum benchmark
Simulated annealing explores the energy landscape with one-hot-preserving moves.
Hardware caveat
QUBO-compatible for later D-Wave / QAOA / hybrid deployment; nothing here runs on a quantum processor.

07 · Benchmark

Quantum-inspired result measured against the exact optimum.

MetricExact classicalQuantum-inspired
Total utility799.30799.30
Average price index1.02001.0200
Runtime0 ms0 ms
Identical price picks1919
Optimality gap0.0000%
Expected profit₹12,403 baseline₹12,981

08 · SHAP global importance

Surrogate fit R² 0.9999 on the candidate utility function.

Price vs baseline7.065
Customer value2.161
Sell-through1.231
Forecast demand0.115
Expected waste0.100
Price sensitivity0.083
Price movement0.062
Spoilage rate0.059
Gross margin0.040
Stock on hand0.033

09 · SHAP local & 10 · LIME local

Pick a product to see why its price was chosen, and how sensitive that choice is.

Price raised by ₹43 to ₹925 — driven mostly by price vs baseline; margin 33.0%, sell-through 25%.

SHAP contribution to this decision
Price vs baseline5.121
Customer value1.206
Sell-through-0.837
Price movement-0.047
Expected waste0.030
Spoilage rate-0.028
Gross margin0.021
Price sensitivity0.021
Forecast demand0.019
Stock on hand0.017
LIME local sensitivity around the chosen price
Price vs baseline6.991
Gross margin0.069
Forecast demand0.135
Sell-through1.453
Expected waste-0.108
Customer value-1.847
Price movement-0.073
Stock on hand0.055
Price sensitivity0.034
Spoilage rate0.022

11 · 30-minute engine

What happens on every cycle.

  1. 01Refresh demand, stock and price inputs from the product model.
  2. 02Rebuild the candidate price ladder and drop anything under the margin floor.
  3. 03Solve exactly, then solve the QUBO with quantum-inspired annealing.
  4. 04Benchmark the two, record the gap and runtimes.
  5. 05Fit the surrogate and compute SHAP and LIME for every chosen price.
  6. 06Write the run, decisions, insights and knowledge chunks to the database.

Last run: 8/9/2026, 6:23:05 pm · trigger manual

12 · Dashboard summary

The workbook's headline numbers, live.

Products optimised
19
Expected profit
₹12,981
baseline ₹12,403
Portfolio price index
1.0200
band 0.98 – 1.02
Expected waste
32.3 units