Dendro: Genetic Algorithm Guide

Introduction

Dendro, Optilogic’s simulation-optimization engine, uses a sophisticated Genetic Algorithm (GA) to, for example, optimize inventory policies across your supply chain network. This guide explains how the algorithm works in business-friendly terms, helping you understand what happens when you run Dendro and how to get the best results.

The Big Picture: Dendro's Genetic Algorithm explores thousands of different inventory policy combinations, simulates each one to see how it performs, and gradually evolves toward the best possible solution - much like natural evolution produces better-adapted organisms over time.

Recommended reading prior to diving into this guide: Getting Started with Dendro, which is a higher-level overview of how Dendro works.

What is a Genetic Algorithm?

The Natural Evolution Analogy

Genetic Algorithms are inspired by biological evolution. Just as species evolve to become better adapted to their environment through:

  • Variation – random mutations
  • Selection survival of the fittest
  • Inheritance – combining traits from successful parents

Dendro evolves inventory policies to become better adapted to your business objectives through:

  • Mutation – trying different policy values
  • Selection – keeping the best-performing policies
  • Crossover – combining successful policies from different solutions

Why Use Evolution for Inventory Optimization?

Traditional optimization methods struggle with inventory networks due to:

  1. Complexity: Thousands of facility-product combinations interact in non-obvious ways
  2. No Simple Formula: The "best" policy depends on simulation results, not a mathematical equation
  3. Many Local Optima: There are many "good" solutions that might trap simpler algorithms where they fail to find the global best solution

Genetic Algorithms excel at this type of problem because they:

  • Explore many different solutions simultaneously
  • Do not get stuck at the first "good enough" solution they find
  • Can handle complex interactions between variables
  • Learn from experience as they evolve

How Dendro's Genetic Algorithm Works

Dendro's implementation uses three fundamental elements: chromosomes, genes, and fitness score.

1. Chromosomes (Policy Combinations)

A chromosome represents one complete set of inventory policies for your entire supply chain.

Example Chromosome:

  • Warehouse A + Product 1: Reorder Point = 500, Order-Up-To = 1000
  • Warehouse A + Product 2: Reorder Point = 200, Order-Up-To = 400
  • Warehouse B + Product 1: Reorder Point = 800, Order-Up-To = 1500
  • ... (and so on for all facility-product combinations)

Each chromosome is essentially a complete "proposal" for how to manage inventory across your network.

2. Genes (Individual Policy Settings)

Each gene within a chromosome represents the policy for one facility-product combination.

Example Gene:

  • Facility: Warehouse A
  • Product: Product 1
  • Policy Type: (s,S)
  • Reorder Point (s): 500
  • Order-Up-To Level (S): 1000

Genes can mutate (change their values) to explore different policy settings.

3. Fitness Score (Performance Measure)

The fitness score measures how good a chromosome is - combining costs, service levels, and other objectives.

Higher scores are better - Dendro displays scores where better solutions have higher values.

A fitness score might combine:

  • Holding costs (weighted 30%)
  • Transportation costs (weighted 25%)
  • Stockout penalties (weighted 25%)
  • Service level achievement (weighted 20%)

The Optimization Process Step-by-Step

Whenever the below refers to an option, this is a model run option that can be set in the Dendro section of the Technology Parameters on the right-hand side of the Run Settings screen that comes up after a user clicks on the green Run button in Cosmic Frog.

Generation 0: Initial Population

What happens: Dendro creates the initial population of chromosomes (policy combinations).

Implementation details:

  • Population size is controlled by the Population Size option (default: 20)
  • The first chromosome always uses your current baseline policies
  • Remaining chromosomes are created by systematically varying policy values
  • Each chromosome represents a different "hypothesis" about good inventory policies

Business perspective: Think of this as Dendro assembling a diverse team of proposals. The first proposal is "keep doing what we are doing", while the others explore variations like "increase safety stock by 10%", "reduce order quantities", etc.

Generations 1 to N: Evolution Cycle

Each generation follows the same four-step cycle:

Step 1: Evaluation (Simulation & Scoring)

What happens: Each chromosome is evaluated by:

  1. Creating a supply chain scenario with those inventory policies
  2. Running a full simulation of your supply chain using Optilogic’s Throg engine
  3. Calculating a fitness score based on the simulation results

Implementation details:

  • Scenarios are generated with unique names (e.g., the name of the base scenario appended with "_GA5.3" for Generation 5, Chromosome 3)
  • Throg simulations run in parallel for efficiency
  • Results are collected from simulation output tables
  • Fitness scores combine multiple weighted metrics via utility curves

Business perspective: Dendro tests each proposal by running it through a realistic simulation of your supply chain over time. It is like running a pilot program for each policy combination to see what would actually happen - but virtually, so you can test thousands of options without risk.

Typical duration:

  • Simple networks: 5-15 minutes per generation
  • Complex networks: 30-90 minutes per generation
  • Dependent on: number of scenarios, simulation complexity, and allocated resources

Step 2: Selection (Survival of the Fittest)

What happens: Dendro ranks all chromosomes by fitness score and selects the best ones to continue to the next generation.

Implementation details:

  • Chromosomes are sorted by fitness score (highest/best first)
  • The top performers survive to the next generation
  • Poor performers are discarded
  • If fitness rescaling occurred (new min/max values discovered), all historical scores are recalculated for fair comparison

Business perspective: After testing all proposals, Dendro keeps the most promising ones and discards the poor performers. This is like a review committee keeping the best ideas and dropping the ones that do not work well.

Example:

Generation 5 Results (20 chromosomes evaluated):

  • Chromosome 12: Score = 445 ✓ Survives (best)
  • Chromosome 7:  Score = 412 ✓ Survives
  • Chromosome 3:  Score = 380 ✓ Survives
  • ...
  • Chromosome 15: Score = 268 ✗ Discarded
  • Chromosome 19: Score = 245 ✗ Discarded (worst)

Step 3: Crossover (Combining Successful Traits)

What happens: Dendro creates new chromosomes by combining parts of two successful parent chromosomes.

Implementation details:

  • Pairs of parent chromosomes are selected from survivors
  • One or more "crossover points" are chosen (controlled by the Number Of Crossovers option, default: 2)
  • Genes before the crossover point come from one parent; genes after come from the other parent
  • Crossover probability is controlled by the Crossover Probability option (default: 90%)
  • Crossover is disabled when there is only one input factor

Business perspective: Dendro creates new proposals by combining the best parts of successful proposals. If one policy set works well for East Coast facilities and another works well for high-volume products, crossover might create a policy that combines both successful approaches.

Example with 1-Point Crossover:

Parent 1: [Gene_A1, Gene_A2, Gene_A3, Gene_A4, Gene_A5]

Parent 2: [Gene_B1, Gene_B2, Gene_B3, Gene_B4, Gene_B5]

                                                                    ↑ Crossover point

Offspring 1: [Gene_A1, Gene_A2, Gene_A3 | Gene_B4, Gene_B5]

Offspring 2: [Gene_B1, Gene_B2, Gene_B3 | Gene_A4, Gene_A5]

When crossover is most effective:

  • Complex networks with diverse facility types
  • Multiple product categories with different characteristics
  • When different regions/segments require different policy approaches

Step 4: Mutation (Exploring New Variations)

What happens: Dendro randomly adjusts policy values in the new chromosomes to explore variations.

Implementation details:

  • Each gene has a probability of mutating (controlled by the Mutation Probability option, default: 10%)
  • When a gene mutates, one or more of its policy values are adjusted
  • The maximum number of genes to mutate can be limited (Max Values To Mutate option, default: 5)
  • Mutation values are selected from predefined ranges or by adjusting current values

Business perspective: Dendro introduces controlled randomness to explore new options. Even the best current policies might not be optimal, so mutation ensures the algorithm does not get stuck. It is like saying "this policy works well at 500 units, but let's try 525 and 475 too".

Example mutations:

Original Gene: Reorder Point = 500, Order-Up-To = 1000

Mutated Gene: Reorder Point = 525, Order-Up-To = 1050

Mutation strategies:

  • High mutation rate (100%): Aggressive exploration, good for early generations
  • Low mutation rate (30-50%): Refinement of known good solutions

Key Concepts Explained

Input Factors: What Gets Optimized

Input factors define what Dendro can change. They are the "variables" in your optimization problem. They can be specified in the Input Factors input table in your Cosmic Frog model.

Common input factors:

  • Simulation Policy Value 1: First policy parameter (e.g., reorder point 's' or 'R' in (s,S) and (R,Q) inventory policies, respectively)
  • Simulation Policy Value 2: Second policy parameter (e.g., order-up-to quantity 'S', reorder quantity 'Q')
  • Policy Type: Which inventory policy to use (s,S), (R,Q), (T,S), etc.

How they work in chromosomes: Each input factor becomes a position in the chromosome. Dendro explores different values for each position.

Example: If you have 50 facility-product combinations to optimize, and each has two policy values (reorder point and order-up-to), your chromosome has 50 genes, each with 2 values = 100 total parameters being optimized.

Input factors are covered in detail in the Dendro: Input Factors Guide.

The following 2 screenshots show 6 records in an Input Factors input table in Cosmic Frog. Both simulation policy values for Product_1 at 3 different DCs are specified in these records:

Output Factors: How Success Is Measured

Output factors define what Dendro tries to minimize. They are the "objectives" in your optimization problem. Output factors can be set in the Output Factors input table.

Common output factors:

  • Total holding cost: Inventory carrying costs
  • Total transportation cost: Shipping and logistics costs
  • Stockout cost: Penalties for not meeting demand
  • Service level: Customer service performance
  • Total inventory value: Capital tied up in inventory

How they combine - each output factor has a:

  1. Weight: How important it is (e.g., 30% for holding costs)
  2. Utility curve: How raw values map to fitness scores
  3. Normalization: Ensures different units (dollars, percentages) can be compared fairly

The Dendro: Output Factors Guide covers output factors in more detail.

The following screenshot shows an output factors table containing 2 output factors, one measuring service and the other cost:

Utility Curves: Translating Results to Scores

Utility curves convert simulation outputs into comparable fitness scores.

Why we need them:

  • Holding cost might be $50,000
  • Service level might be 94%
  • How do you compare dollars to percentages?

How they work:

  1. Piecewise Linear Curve: Maps input values to raw scores
  2. Dynamic Rescaling: Adjusts as new min/max values are discovered
  3. Normalization: Scales to 0-100 range
  4. Weighting: Multiplies by importance weight

Example:

Holding Cost Utility Curve:

  • $0          → Score 100 (best possible)
  • $50,000   → Score 50
  • $100,000  → Score 0 (worst seen so far)
  • Weight: 30%
  • Contribution to fitness: 50 * 0.30 = 15 points

Business benefit: Utility curves let you define what "good" and "bad" mean for each metric. They translate apples-and-oranges metrics into a single comparable score.

Fitness Score Calculation

The overall fitness score is the weighted sum of all output factors.

Formula:

Fitness Score = Σ(Weighted Score for each Output Factor)

Where for each factor:

Weighted Score = (Normalized Score from Utility Curve) × (Factor Weight)

Higher is better - Better solutions receive higher fitness scores.

Example calculation:

Output Factors:

1. Holding Cost:       $75,000 → Raw Score 75 → Weighted 22.5 (weight 30%)

2. Transport Cost:    $40,000 → Raw Score 60 → Weighted 15.0 (weight 25%)

3. Stockout Penalty:  $10,000 → Raw Score 80 → Weighted 20.0 (weight 25%)

4. Service Level:        96%    → Raw Score 90 → Weighted 18.0 (weight 20%)

Overall Fitness = 22.5 + 15.0 + 20.0 + 18.0 = 75.5 points

Important note: Scores are recalculated when new min/max values are discovered to ensure fair comparison across all generations.

After a Dendro run completes, the fitness scores of all scenarios (=chromosomes) of all generations can be found in the Simulation Evolutionary Algorithm Summary output table (showing the top 10 records here with the highest overall fitness scores):

Understanding Fitness Scoring

Dynamic Score Rescaling

The challenge: Early in the optimization, Dendro does not know what the best and worst possible values are for each metric. As it explores, it might find:

  • Better solutions than initially thought possible (new minimum)
  • Worse solutions than previously seen (new maximum)

The solution: Dendro dynamically rescales utility curves when new extremes are discovered.

What happens:

  1. Generation 1: Best holding cost seen = $80,000, worst = $120,000
  2. Generation 5: New best found = $65,000 ← triggers rescaling
  3. All previous fitness scores are recalculated with the new scale
  4. Population is re-ranked fairly

Business perspective: This ensures that a solution that looked "good" in Generation 2 is not unfairly favored if better solutions are discovered later. Everyone is judged by the same standard.

Population Management

Keeping the best results:

  • Dendro maintains the 20 top scenarios
  • After each generation, the bottom performers are purged (their data deleted)
  • This manages storage and focuses computational resources on promising solutions

Tuning the Algorithm

Population Size vs. Generations Trade-off

Small population, many generations:

  • Population Size = 10
  • Number Of Generations = 30
  • Total simulations = ~300

Characteristics:

  • Slower convergence (fewer options explored per generation)
  • More focused evolution (builds incrementally on success)
  • Lower parallelism (fewer concurrent simulations)
  • Best for: Simple networks, limited computational resources

Large population, fewer generations:

  • Population Size = 50
  • Number Of Generations = 10
  • Total simulations = ~500

Characteristics:

  • Faster convergence (more diverse exploration early)
  • Higher parallelism (more concurrent simulations)
  • Risk of missing optimal refinement
  • Best for: Complex networks, ample computational resources

Balanced approach (recommended):

  1. Population Size = 20-30
  2. Number Of Generations = 15-20
  3. Total simulations = ~300-600

Mutation Rate Strategy

High mutation (100% probability):

  • Explores solution space aggressively
  • Good for initial generations
  • Prevents premature convergence
  • Can disrupt good solutions

Low mutation (30-50% probability):

  • Refines existing good solutions
  • Good for later generations
  • Preserves good traits
  • May miss innovative solutions

Crossover Configuration

Single-point crossover (default):

Points To Crossover = 1

  • Simple and effective
  • Preserves blocks of related genes
  • Good for most scenarios

Multi-point crossover:

Points To Crossover = 2 or more

  • More mixing between parents
  • Can disrupt related gene groups
  • Better for highly modular problems

When to disable crossover:

  • Only one input factor (automatically disabled)
  • Genes do not have meaningful interactions
  • Mutation alone provides sufficient exploration

Monitoring Progress

Key indicators of healthy optimization:

  1. Fitness improvement:
  • Best score should generally decrease over generations
  • Expect rapid improvement early, slower later
  • Plateaus are normal as optimal region is explored
  1. Population diversity:
  • Early generations: Wide range of fitness scores
  • Later generations: Scores converge around optimum
  • If diversity collapses too early, increase mutation

The Simulation Evolutionary Algorithm Summary output table can be used to assess the above 2 points as it contains the fitness scores of all scenarios (=chromosomes) that were run for all generations. See an example screenshot of this table further above in the Fitness Score Calculation section.

  1. Score recalculation events:
  • Occasional rescaling indicates new discoveries
  • Frequent rescaling suggests unstable solution space
  • No rescaling after ~5 generations is normal

This last point can be assessed by reviewing the logs of the base scenario used for the Dendro run.

Logging output: Dendro logs key events. These can be found in the Run Manager application, which is another application on the Optilogic platform. The Job Log of the base scenario that Dendro is run on contains quite a lot of detailed on events, such as:

  • "Solving generation N containing X chromosomes"
  • "Mutated X genes in Y chromosomes"
  • "Best scenario was [name] with a score of [value]"

This screenshot shows part of a Job Log for a Dendro run:

After opening the Run Manager application, users first need to select the base scenario that was kicked off running Dendro on it, (this scenario does not have a _GAx.xx postfix). Next select the Job Log by clicking on the 5th icon in the row of icons at the right top of the logs.

The Job Records log, which can be accessed by clicking on the second icon in the row of icons at the top right of the logs provides a higher level summary of the Dendro run, just calling out the main events:

When to Use the Genetic Algorithm

Best Use Cases

The GA excels in following situations:

  1. Complex supply chain networks
  • Many interdependent facilities
  • Multiple product categories with different characteristics
  • Cross-facility dependencies (e.g., distribution networks)
  1. No obvious starting point
  • Current policies are poor or non-existent
  • Major network changes planned
  • Need to explore many different approaches
  1. Optimization quality matters more than speed
  • Production optimization projects
  • Strategic planning decisions
  • High-value inventory networks
  1. Multiple competing objectives
  • Balancing cost, service, and inventory
  • Different stakeholders with different priorities
  • No single "right answer"

Advanced Topics

Chromosome Deduplication

The mechanism: Dendro automatically detects and eliminates duplicate chromosomes.

How it works:

  • Each gene combination is hashed and stored
  • When mutation/crossover creates a new chromosome, it is checked against existing genes
  • If identical, the existing gene ID is reused
  • Prevents wasted simulations on identical policies

Business benefit: Ensures computational resources are used efficiently - never simulating the same policy combination twice.

Scenario Data Management

Challenge: Each chromosome generates a simulation scenario with potentially gigabytes of output data.

Solution:

  • Dendro keeps detailed results for the 20 top performers
  • Poor performers are purged (scenario data deleted)
  • Fitness scores and input factors are retained for all scenarios

Business benefit: You can analyze the best solutions in detail without storing data for thousands of unsuccessful experiments.

Practical Example Walkthrough

Scenario: Regional Distribution Center Optimization

Network:

  • 3 distribution centers
  • 100 products
  • Target: 95% fill rate
  • Minimize: Total cost (holding + transportation + stockouts)

Configuration:

  • Population Size = 30
  • Number Of Generations = 20
  • Mutation Probability = 1.0
  • Crossover Probability = 1.0
  • Points To Crossover = 1

Process:

Generation 1:

  • 30 different policy combinations created
  • Each simulated for 1 year
  • Fitness scores range: 168 to 412
  • Best: Chromosome 12 (score: 412)

Generations 2-10:

  • GA explores various combinations
  • Service levels vary 89-98%
  • Costs vary $180K-$320K
  • Best score improves: 412 → 534
  • New minimum holding cost discovered → rescaling triggered

Generations 11-15:

  • Population converges around good solutions
  • Refinement through mutation
  • Service stabilizes near 95%
  • Best score: 608

Generations 16-20:

  • Fine-tuning phase
  • Small improvements
  • Final best score: 648
  • Service: 95.2%, Cost breakdown: Hold $85K, Trans $62K, Stockout $21K

Results:

  • Starting solution: Score 168, Service 89%
  • Final solution: Score 648, Service 95.2%
  • Improvement: 286% better (nearly 4x improvement)
  • Policies: 156 facility-product policies optimized

Summary

Dendro's Genetic Algorithm is a powerful, flexible optimization engine that:

  • Explores thousands of inventory policy combinations
  • Evaluates each through realistic supply chain simulation
  • Evolves toward optimal solutions through selection, crossover, and mutation
  • Balances multiple competing objectives (cost, service, inventory)
  • Adapts to your specific network, constraints, and business rules

By understanding how the algorithm works, you can:

  • Configure it effectively for your use case
  • Interpret the results with confidence
  • Make informed decisions about when and how to use it
  • Troubleshoot issues when they arise

The GA is not magic – it is a systematic, intelligent search process. Like any tool, it works best when used thoughtfully and configured appropriately for your specific situation.

Other Helpful Resources

You may find these links helpful, some of which have already been mentioned above:

Please do not hesitate to contact the Optilogic Support team on support@optilogic.com for any questions or feedback.

Introduction

Dendro, Optilogic’s simulation-optimization engine, uses a sophisticated Genetic Algorithm (GA) to, for example, optimize inventory policies across your supply chain network. This guide explains how the algorithm works in business-friendly terms, helping you understand what happens when you run Dendro and how to get the best results.

The Big Picture: Dendro's Genetic Algorithm explores thousands of different inventory policy combinations, simulates each one to see how it performs, and gradually evolves toward the best possible solution - much like natural evolution produces better-adapted organisms over time.

Recommended reading prior to diving into this guide: Getting Started with Dendro, which is a higher-level overview of how Dendro works.

What is a Genetic Algorithm?

The Natural Evolution Analogy

Genetic Algorithms are inspired by biological evolution. Just as species evolve to become better adapted to their environment through:

  • Variation – random mutations
  • Selection survival of the fittest
  • Inheritance – combining traits from successful parents

Dendro evolves inventory policies to become better adapted to your business objectives through:

  • Mutation – trying different policy values
  • Selection – keeping the best-performing policies
  • Crossover – combining successful policies from different solutions

Why Use Evolution for Inventory Optimization?

Traditional optimization methods struggle with inventory networks due to:

  1. Complexity: Thousands of facility-product combinations interact in non-obvious ways
  2. No Simple Formula: The "best" policy depends on simulation results, not a mathematical equation
  3. Many Local Optima: There are many "good" solutions that might trap simpler algorithms where they fail to find the global best solution

Genetic Algorithms excel at this type of problem because they:

  • Explore many different solutions simultaneously
  • Do not get stuck at the first "good enough" solution they find
  • Can handle complex interactions between variables
  • Learn from experience as they evolve

How Dendro's Genetic Algorithm Works

Dendro's implementation uses three fundamental elements: chromosomes, genes, and fitness score.

1. Chromosomes (Policy Combinations)

A chromosome represents one complete set of inventory policies for your entire supply chain.

Example Chromosome:

  • Warehouse A + Product 1: Reorder Point = 500, Order-Up-To = 1000
  • Warehouse A + Product 2: Reorder Point = 200, Order-Up-To = 400
  • Warehouse B + Product 1: Reorder Point = 800, Order-Up-To = 1500
  • ... (and so on for all facility-product combinations)

Each chromosome is essentially a complete "proposal" for how to manage inventory across your network.

2. Genes (Individual Policy Settings)

Each gene within a chromosome represents the policy for one facility-product combination.

Example Gene:

  • Facility: Warehouse A
  • Product: Product 1
  • Policy Type: (s,S)
  • Reorder Point (s): 500
  • Order-Up-To Level (S): 1000

Genes can mutate (change their values) to explore different policy settings.

3. Fitness Score (Performance Measure)

The fitness score measures how good a chromosome is - combining costs, service levels, and other objectives.

Higher scores are better - Dendro displays scores where better solutions have higher values.

A fitness score might combine:

  • Holding costs (weighted 30%)
  • Transportation costs (weighted 25%)
  • Stockout penalties (weighted 25%)
  • Service level achievement (weighted 20%)

The Optimization Process Step-by-Step

Whenever the below refers to an option, this is a model run option that can be set in the Dendro section of the Technology Parameters on the right-hand side of the Run Settings screen that comes up after a user clicks on the green Run button in Cosmic Frog.

Generation 0: Initial Population

What happens: Dendro creates the initial population of chromosomes (policy combinations).

Implementation details:

  • Population size is controlled by the Population Size option (default: 20)
  • The first chromosome always uses your current baseline policies
  • Remaining chromosomes are created by systematically varying policy values
  • Each chromosome represents a different "hypothesis" about good inventory policies

Business perspective: Think of this as Dendro assembling a diverse team of proposals. The first proposal is "keep doing what we are doing", while the others explore variations like "increase safety stock by 10%", "reduce order quantities", etc.

Generations 1 to N: Evolution Cycle

Each generation follows the same four-step cycle:

Step 1: Evaluation (Simulation & Scoring)

What happens: Each chromosome is evaluated by:

  1. Creating a supply chain scenario with those inventory policies
  2. Running a full simulation of your supply chain using Optilogic’s Throg engine
  3. Calculating a fitness score based on the simulation results

Implementation details:

  • Scenarios are generated with unique names (e.g., the name of the base scenario appended with "_GA5.3" for Generation 5, Chromosome 3)
  • Throg simulations run in parallel for efficiency
  • Results are collected from simulation output tables
  • Fitness scores combine multiple weighted metrics via utility curves

Business perspective: Dendro tests each proposal by running it through a realistic simulation of your supply chain over time. It is like running a pilot program for each policy combination to see what would actually happen - but virtually, so you can test thousands of options without risk.

Typical duration:

  • Simple networks: 5-15 minutes per generation
  • Complex networks: 30-90 minutes per generation
  • Dependent on: number of scenarios, simulation complexity, and allocated resources

Step 2: Selection (Survival of the Fittest)

What happens: Dendro ranks all chromosomes by fitness score and selects the best ones to continue to the next generation.

Implementation details:

  • Chromosomes are sorted by fitness score (highest/best first)
  • The top performers survive to the next generation
  • Poor performers are discarded
  • If fitness rescaling occurred (new min/max values discovered), all historical scores are recalculated for fair comparison

Business perspective: After testing all proposals, Dendro keeps the most promising ones and discards the poor performers. This is like a review committee keeping the best ideas and dropping the ones that do not work well.

Example:

Generation 5 Results (20 chromosomes evaluated):

  • Chromosome 12: Score = 445 ✓ Survives (best)
  • Chromosome 7:  Score = 412 ✓ Survives
  • Chromosome 3:  Score = 380 ✓ Survives
  • ...
  • Chromosome 15: Score = 268 ✗ Discarded
  • Chromosome 19: Score = 245 ✗ Discarded (worst)

Step 3: Crossover (Combining Successful Traits)

What happens: Dendro creates new chromosomes by combining parts of two successful parent chromosomes.

Implementation details:

  • Pairs of parent chromosomes are selected from survivors
  • One or more "crossover points" are chosen (controlled by the Number Of Crossovers option, default: 2)
  • Genes before the crossover point come from one parent; genes after come from the other parent
  • Crossover probability is controlled by the Crossover Probability option (default: 90%)
  • Crossover is disabled when there is only one input factor

Business perspective: Dendro creates new proposals by combining the best parts of successful proposals. If one policy set works well for East Coast facilities and another works well for high-volume products, crossover might create a policy that combines both successful approaches.

Example with 1-Point Crossover:

Parent 1: [Gene_A1, Gene_A2, Gene_A3, Gene_A4, Gene_A5]

Parent 2: [Gene_B1, Gene_B2, Gene_B3, Gene_B4, Gene_B5]

                                                                    ↑ Crossover point

Offspring 1: [Gene_A1, Gene_A2, Gene_A3 | Gene_B4, Gene_B5]

Offspring 2: [Gene_B1, Gene_B2, Gene_B3 | Gene_A4, Gene_A5]

When crossover is most effective:

  • Complex networks with diverse facility types
  • Multiple product categories with different characteristics
  • When different regions/segments require different policy approaches

Step 4: Mutation (Exploring New Variations)

What happens: Dendro randomly adjusts policy values in the new chromosomes to explore variations.

Implementation details:

  • Each gene has a probability of mutating (controlled by the Mutation Probability option, default: 10%)
  • When a gene mutates, one or more of its policy values are adjusted
  • The maximum number of genes to mutate can be limited (Max Values To Mutate option, default: 5)
  • Mutation values are selected from predefined ranges or by adjusting current values

Business perspective: Dendro introduces controlled randomness to explore new options. Even the best current policies might not be optimal, so mutation ensures the algorithm does not get stuck. It is like saying "this policy works well at 500 units, but let's try 525 and 475 too".

Example mutations:

Original Gene: Reorder Point = 500, Order-Up-To = 1000

Mutated Gene: Reorder Point = 525, Order-Up-To = 1050

Mutation strategies:

  • High mutation rate (100%): Aggressive exploration, good for early generations
  • Low mutation rate (30-50%): Refinement of known good solutions

Key Concepts Explained

Input Factors: What Gets Optimized

Input factors define what Dendro can change. They are the "variables" in your optimization problem. They can be specified in the Input Factors input table in your Cosmic Frog model.

Common input factors:

  • Simulation Policy Value 1: First policy parameter (e.g., reorder point 's' or 'R' in (s,S) and (R,Q) inventory policies, respectively)
  • Simulation Policy Value 2: Second policy parameter (e.g., order-up-to quantity 'S', reorder quantity 'Q')
  • Policy Type: Which inventory policy to use (s,S), (R,Q), (T,S), etc.

How they work in chromosomes: Each input factor becomes a position in the chromosome. Dendro explores different values for each position.

Example: If you have 50 facility-product combinations to optimize, and each has two policy values (reorder point and order-up-to), your chromosome has 50 genes, each with 2 values = 100 total parameters being optimized.

Input factors are covered in detail in the Dendro: Input Factors Guide.

The following 2 screenshots show 6 records in an Input Factors input table in Cosmic Frog. Both simulation policy values for Product_1 at 3 different DCs are specified in these records:

Output Factors: How Success Is Measured

Output factors define what Dendro tries to minimize. They are the "objectives" in your optimization problem. Output factors can be set in the Output Factors input table.

Common output factors:

  • Total holding cost: Inventory carrying costs
  • Total transportation cost: Shipping and logistics costs
  • Stockout cost: Penalties for not meeting demand
  • Service level: Customer service performance
  • Total inventory value: Capital tied up in inventory

How they combine - each output factor has a:

  1. Weight: How important it is (e.g., 30% for holding costs)
  2. Utility curve: How raw values map to fitness scores
  3. Normalization: Ensures different units (dollars, percentages) can be compared fairly

The Dendro: Output Factors Guide covers output factors in more detail.

The following screenshot shows an output factors table containing 2 output factors, one measuring service and the other cost:

Utility Curves: Translating Results to Scores

Utility curves convert simulation outputs into comparable fitness scores.

Why we need them:

  • Holding cost might be $50,000
  • Service level might be 94%
  • How do you compare dollars to percentages?

How they work:

  1. Piecewise Linear Curve: Maps input values to raw scores
  2. Dynamic Rescaling: Adjusts as new min/max values are discovered
  3. Normalization: Scales to 0-100 range
  4. Weighting: Multiplies by importance weight

Example:

Holding Cost Utility Curve:

  • $0          → Score 100 (best possible)
  • $50,000   → Score 50
  • $100,000  → Score 0 (worst seen so far)
  • Weight: 30%
  • Contribution to fitness: 50 * 0.30 = 15 points

Business benefit: Utility curves let you define what "good" and "bad" mean for each metric. They translate apples-and-oranges metrics into a single comparable score.

Fitness Score Calculation

The overall fitness score is the weighted sum of all output factors.

Formula:

Fitness Score = Σ(Weighted Score for each Output Factor)

Where for each factor:

Weighted Score = (Normalized Score from Utility Curve) × (Factor Weight)

Higher is better - Better solutions receive higher fitness scores.

Example calculation:

Output Factors:

1. Holding Cost:       $75,000 → Raw Score 75 → Weighted 22.5 (weight 30%)

2. Transport Cost:    $40,000 → Raw Score 60 → Weighted 15.0 (weight 25%)

3. Stockout Penalty:  $10,000 → Raw Score 80 → Weighted 20.0 (weight 25%)

4. Service Level:        96%    → Raw Score 90 → Weighted 18.0 (weight 20%)

Overall Fitness = 22.5 + 15.0 + 20.0 + 18.0 = 75.5 points

Important note: Scores are recalculated when new min/max values are discovered to ensure fair comparison across all generations.

After a Dendro run completes, the fitness scores of all scenarios (=chromosomes) of all generations can be found in the Simulation Evolutionary Algorithm Summary output table (showing the top 10 records here with the highest overall fitness scores):

Understanding Fitness Scoring

Dynamic Score Rescaling

The challenge: Early in the optimization, Dendro does not know what the best and worst possible values are for each metric. As it explores, it might find:

  • Better solutions than initially thought possible (new minimum)
  • Worse solutions than previously seen (new maximum)

The solution: Dendro dynamically rescales utility curves when new extremes are discovered.

What happens:

  1. Generation 1: Best holding cost seen = $80,000, worst = $120,000
  2. Generation 5: New best found = $65,000 ← triggers rescaling
  3. All previous fitness scores are recalculated with the new scale
  4. Population is re-ranked fairly

Business perspective: This ensures that a solution that looked "good" in Generation 2 is not unfairly favored if better solutions are discovered later. Everyone is judged by the same standard.

Population Management

Keeping the best results:

  • Dendro maintains the 20 top scenarios
  • After each generation, the bottom performers are purged (their data deleted)
  • This manages storage and focuses computational resources on promising solutions

Tuning the Algorithm

Population Size vs. Generations Trade-off

Small population, many generations:

  • Population Size = 10
  • Number Of Generations = 30
  • Total simulations = ~300

Characteristics:

  • Slower convergence (fewer options explored per generation)
  • More focused evolution (builds incrementally on success)
  • Lower parallelism (fewer concurrent simulations)
  • Best for: Simple networks, limited computational resources

Large population, fewer generations:

  • Population Size = 50
  • Number Of Generations = 10
  • Total simulations = ~500

Characteristics:

  • Faster convergence (more diverse exploration early)
  • Higher parallelism (more concurrent simulations)
  • Risk of missing optimal refinement
  • Best for: Complex networks, ample computational resources

Balanced approach (recommended):

  1. Population Size = 20-30
  2. Number Of Generations = 15-20
  3. Total simulations = ~300-600

Mutation Rate Strategy

High mutation (100% probability):

  • Explores solution space aggressively
  • Good for initial generations
  • Prevents premature convergence
  • Can disrupt good solutions

Low mutation (30-50% probability):

  • Refines existing good solutions
  • Good for later generations
  • Preserves good traits
  • May miss innovative solutions

Crossover Configuration

Single-point crossover (default):

Points To Crossover = 1

  • Simple and effective
  • Preserves blocks of related genes
  • Good for most scenarios

Multi-point crossover:

Points To Crossover = 2 or more

  • More mixing between parents
  • Can disrupt related gene groups
  • Better for highly modular problems

When to disable crossover:

  • Only one input factor (automatically disabled)
  • Genes do not have meaningful interactions
  • Mutation alone provides sufficient exploration

Monitoring Progress

Key indicators of healthy optimization:

  1. Fitness improvement:
  • Best score should generally decrease over generations
  • Expect rapid improvement early, slower later
  • Plateaus are normal as optimal region is explored
  1. Population diversity:
  • Early generations: Wide range of fitness scores
  • Later generations: Scores converge around optimum
  • If diversity collapses too early, increase mutation

The Simulation Evolutionary Algorithm Summary output table can be used to assess the above 2 points as it contains the fitness scores of all scenarios (=chromosomes) that were run for all generations. See an example screenshot of this table further above in the Fitness Score Calculation section.

  1. Score recalculation events:
  • Occasional rescaling indicates new discoveries
  • Frequent rescaling suggests unstable solution space
  • No rescaling after ~5 generations is normal

This last point can be assessed by reviewing the logs of the base scenario used for the Dendro run.

Logging output: Dendro logs key events. These can be found in the Run Manager application, which is another application on the Optilogic platform. The Job Log of the base scenario that Dendro is run on contains quite a lot of detailed on events, such as:

  • "Solving generation N containing X chromosomes"
  • "Mutated X genes in Y chromosomes"
  • "Best scenario was [name] with a score of [value]"

This screenshot shows part of a Job Log for a Dendro run:

After opening the Run Manager application, users first need to select the base scenario that was kicked off running Dendro on it, (this scenario does not have a _GAx.xx postfix). Next select the Job Log by clicking on the 5th icon in the row of icons at the right top of the logs.

The Job Records log, which can be accessed by clicking on the second icon in the row of icons at the top right of the logs provides a higher level summary of the Dendro run, just calling out the main events:

When to Use the Genetic Algorithm

Best Use Cases

The GA excels in following situations:

  1. Complex supply chain networks
  • Many interdependent facilities
  • Multiple product categories with different characteristics
  • Cross-facility dependencies (e.g., distribution networks)
  1. No obvious starting point
  • Current policies are poor or non-existent
  • Major network changes planned
  • Need to explore many different approaches
  1. Optimization quality matters more than speed
  • Production optimization projects
  • Strategic planning decisions
  • High-value inventory networks
  1. Multiple competing objectives
  • Balancing cost, service, and inventory
  • Different stakeholders with different priorities
  • No single "right answer"

Advanced Topics

Chromosome Deduplication

The mechanism: Dendro automatically detects and eliminates duplicate chromosomes.

How it works:

  • Each gene combination is hashed and stored
  • When mutation/crossover creates a new chromosome, it is checked against existing genes
  • If identical, the existing gene ID is reused
  • Prevents wasted simulations on identical policies

Business benefit: Ensures computational resources are used efficiently - never simulating the same policy combination twice.

Scenario Data Management

Challenge: Each chromosome generates a simulation scenario with potentially gigabytes of output data.

Solution:

  • Dendro keeps detailed results for the 20 top performers
  • Poor performers are purged (scenario data deleted)
  • Fitness scores and input factors are retained for all scenarios

Business benefit: You can analyze the best solutions in detail without storing data for thousands of unsuccessful experiments.

Practical Example Walkthrough

Scenario: Regional Distribution Center Optimization

Network:

  • 3 distribution centers
  • 100 products
  • Target: 95% fill rate
  • Minimize: Total cost (holding + transportation + stockouts)

Configuration:

  • Population Size = 30
  • Number Of Generations = 20
  • Mutation Probability = 1.0
  • Crossover Probability = 1.0
  • Points To Crossover = 1

Process:

Generation 1:

  • 30 different policy combinations created
  • Each simulated for 1 year
  • Fitness scores range: 168 to 412
  • Best: Chromosome 12 (score: 412)

Generations 2-10:

  • GA explores various combinations
  • Service levels vary 89-98%
  • Costs vary $180K-$320K
  • Best score improves: 412 → 534
  • New minimum holding cost discovered → rescaling triggered

Generations 11-15:

  • Population converges around good solutions
  • Refinement through mutation
  • Service stabilizes near 95%
  • Best score: 608

Generations 16-20:

  • Fine-tuning phase
  • Small improvements
  • Final best score: 648
  • Service: 95.2%, Cost breakdown: Hold $85K, Trans $62K, Stockout $21K

Results:

  • Starting solution: Score 168, Service 89%
  • Final solution: Score 648, Service 95.2%
  • Improvement: 286% better (nearly 4x improvement)
  • Policies: 156 facility-product policies optimized

Summary

Dendro's Genetic Algorithm is a powerful, flexible optimization engine that:

  • Explores thousands of inventory policy combinations
  • Evaluates each through realistic supply chain simulation
  • Evolves toward optimal solutions through selection, crossover, and mutation
  • Balances multiple competing objectives (cost, service, inventory)
  • Adapts to your specific network, constraints, and business rules

By understanding how the algorithm works, you can:

  • Configure it effectively for your use case
  • Interpret the results with confidence
  • Make informed decisions about when and how to use it
  • Troubleshoot issues when they arise

The GA is not magic – it is a systematic, intelligent search process. Like any tool, it works best when used thoughtfully and configured appropriately for your specific situation.

Other Helpful Resources

You may find these links helpful, some of which have already been mentioned above:

Please do not hesitate to contact the Optilogic Support team on support@optilogic.com for any questions or feedback.

Have More Questions?

Contact Support

Get in touch

Contact Sales

Get in touch

Visit Frogger Pond Community

Visit our Community