Repository navigation
modeleon 0.2.2
Install or upgrade: pip install -U modeleon
mo.MIN/mo.MAXperiod by period — over two or more operands they give a series:mo.MIN(sweep, balance)caps a line in every period andmo.MAX(cash, inputs.min_cash)floors it, inside aloop=Truecontainer too, written as=MIN(…)/=MAX(…)in every column. Over one operand they stay the reduction over the row.- Formula cells carry the values the engine computed, so a reader that does not recalculate (a file preview,
openpyxlwithdata_only=True, pandas) shows the model's numbers. SUMPRODUCT—mo.SUM(price * volume)over laid-out rows is written as a live=SUMPRODUCT(…).- A declared sheet order —
ExcelView(sheet={'order': ['summary', 'inputs']}). - Captions and units — a keyed line on a period sheet gets a caption row with its keys; a table gets a unit row under its captions;
ExcelView(meta={'unit': False})hides unit text everywhere. - Outline numbering —
meta={'numbering': 'section'}numbers sections and lines as1,1.1,1.1.1. check_compat(model, 'excel')names every number baked into a formula, cell by cell.- Fixes: a compound lag fill is written in brackets, a subscript is written as its cell, a
+chain past Excel's 8,192 characters folds intoSUM, bare literals in number formats are quoted, and the workbook carries no green triangles of its writer's own making.
Behaviour changes: mo.MIN(a, b) / mo.MAX(a, b) over two series used to reduce both rows to one number; they now work period by period. ExcelView(meta={'unit': False}) used to equal unset; it now hides the unit suffixes too.
The full list is in CHANGELOG.md.