Hey Anaplan Community!
When building multidimensional planning models, we all rely on Anaplan’s native Time Dimensions. They are incredibly powerful for standard calculations, rolling forecasts, and dashboards.
However, when you move into prescriptive analytics with Anaplan Optimizer to build multi-stage problems, the rules change.
No Native Time in Optimizer
Because Optimizer translates your multidimensional model into a flat, mathematical matrix of linear equations (decision variables, objectives, and constraints) for the Gurobi solver, it requires explicit indexable dimensions. Native time scales do not translate directly into this solver matrix.
👉 The Solution: The recommended best practice is to represent time periods using a Custom List (e.g., L2 Time Periods or Custom Months) in your optimization modules.
🛠️ Step-by-Step: How to Model Time for Optimizer
To build a robust, time-aware optimization engine, follow this three-step structural pattern:
1. Create a Custom Time List
Create a flat custom list containing your optimization periods (e.g., "Month 1", "Month 2", or "FY26", "FY27").
- Tip: Keep the list limited strictly to the horizon needed for optimization to avoid generating unnecessary decision variables.
2. Map Native Time to Custom Time (and Vice Versa)
You will need to pass data back and forth between your standard planning modules (which use native time) and your optimization modules (which use custom time).
- Create a system mapping module dimensioned by both your Custom Time List and Native Time.
- Use boolean flags or lookup line items to map
Month 1 to Jan 26, Month 2 to Feb 26, etc. - Use
SUM or LOOKUP formulas to move input data into the custom time module before running the Optimizer, and to export the solved decision variables back to your native time modules afterward.
3. Formulate Multi-Stage Constraints Sequentially (Using Offsets)
In multi-stage optimization (like inventory carry-over or drilling sequences), the state of "Period T" depends on the outcome of "Period T-1" .
- Since you are using a custom list, you cannot use native functions like
PREVIOUS() or OFFSET(). - The Workaround: Create a mapping line item in your Custom Time List attributes called
Previous Period (formatted as your Custom Time List). Use this relation in your constraint formulas to reference the prior period's ending balances (e.g., Ending Inventory[LOOKUP: Previous Period]).
🔍 In Practice: Toolbox Examples
To see how this works in real models, check out the Optimizer Toolbox patterns:
📦 Example 1: T3.1 Inventory Non-Rolling Qty
In this fundamental toolbox pattern, we keep the complexity to an absolute minimum:
- Strictly Flat Dimensioning: The optimization module is dimensioned only by a single custom list:
Current Months. - Non-Rolling Mechanics: Since inventory is non-rolling, each month's calculations run independently. The model does not carry ending stock over to the next month's beginning stock, meaning you do not have to write any lookup formulas referencing previous months.
- The Formulation: The Optimizer simply balances
Demand and Inventorywithin each individual bucket in the Current Months list, solving for the optimal Scheduled Production per month.
-
🔄 Want a more real example? Check out T3.5 Inventory Transfer and Pooling!
T3.5 Inventory Transfer and Pooling extends this logic into multi-echelon networks:
- Balances multi-stage inventory carryover alongside inter-facility transfers (
From Location → To Location). - Dimensions: Dimensioned by
Local DCs andCurrent Months. - Period Chaining: The custom
Period list contains a mapping attribute Previous Period. Using that, we can constructVAR Beginning Inventory - VAR Ending Inventory[LOOKUP: Previous Period] = Carryover Inventory[LOOKUP: Previous Period] - Demonstrates how pooling constraints and lead-time delays across periods can be expressed algebraically using custom period offsets.
Time dimensions in Anaplan Optimizer are all about translating temporal concepts into structured, indexable arrays the solver can digest.
Stop guessing and start optimizing your decisions!