Main
View or edit on GitHub
This page is synchronized from trase/models/candyland/candy/main.ipynb. Last modified on 2026-08-05 15:56 CEST by Harry Biddle.
Please view or edit the original file there; changes should be reflected here after a midnight build (CET time),
or manually triggering it with a GitHub action (link).
%configure_logging
from trase.tools.sei_pcs.supply_chain import SupplyChain as SupplyChain
# sc = SupplyChain("candyland/candy", 2017)
# sc.preparation()
# sc.load()
sc.run()
sc.flow_report_by_attribute("vol", ["status", "branch"])
sc.export_results()
# sc.upload_results()
# print("Hello")
Use the validate option with pd.merge or pass validate=None to suppress this warning
/home/sagemaker-user/.admin/repos/TRASE/trase/models/candyland/candy/model.py:61
Use the validate option with pd.merge or pass validate=None to suppress this warning
/home/sagemaker-user/.admin/repos/TRASE/trase/models/candyland/candy/model.py:67
Welcome to the CBC MILP Solver
Version: 2.10.3
Build Date: Dec 15 2019
command line - /home/sagemaker-user/.conda/envs/trase-env/lib/python3.10/site-packages/pulp/solverdir/cbc/linux/64/cbc /tmp/df1a1ab03db74843925de8fd6c9d16e9-pulp.mps -timeMode elapsed -branch -printingOptions all -solution /tmp/df1a1ab03db74843925de8fd6c9d16e9-pulp.sol (default strategy 1)
At line 2 NAME MODEL
At line 3 ROWS
At line 20 COLUMNS
At line 177 RHS
At line 193 BOUNDS
At line 194 ENDATA
Problem MODEL has 15 rows, 54 columns and 108 elements
Coin0008I MODEL read with 0 errors
Option for timeMode changed from cpu to elapsed
Presolve 15 (0) rows, 54 (0) columns and 108 (0) elements
Perturbing problem by 0.001% of 350 - largest nonzero change 0.00138741 ( 0.000654276%) - largest zero change 0.00017683846
0 Obj 0 Primal inf 835 (6)
8 Obj 8000.1431
Optimal - objective value 8000
Optimal objective 8000 - 8 iterations time 0.002
Option for printingOptions changed from normal to all
Total time (CPU seconds): 0.00 (Wallclock seconds): 0.01
sum percentage
status branch
SOLVED 2 - Candy storage is logistic Hub 440 34%
UNKNOWN 5 - Unknown 260 20%
SOLVED DOMESTIC DEMAND 230 17%
1 - Asset linked to production 210 16%
3.1 - Link to level 3/4 asset in known municipality 180 14%
sc.get("flows").columns
sc.flow_report_by_attribute("vol", ["status", "branch", "country"])
sum percentage
status branch country
SOLVED DOMESTIC DEMAND Brazil 230 17%
2 - Candy storage is logistic Hub SWEDEN 200 15%
UNKNOWN 5 - Unknown SWEDEN 160 12%
SOLVED 3.1 - Link to level 3/4 asset in known municipality SWEDEN 130 10%
1 - Asset linked to production FRANCE 120 9%
2 - Candy storage is logistic Hub GERMANY 120 9%
UNKNOWN 5 - Unknown FRANCE 100 8%
SOLVED 2 - Candy storage is logistic Hub FRANCE 60 5%
1 - Asset linked to production SPAIN 50 4%
3.1 - Link to level 3/4 asset in known municipality SPAIN 50 4%
2 - Candy storage is logistic Hub SPAIN 50 4%
1 - Asset linked to production GERMANY 35 3%
2 - Candy storage is logistic Hub POLAND 20 2%