Every Supply Chain is Unique,
Capture Yours!
any restrictions any behavior any dynamics any supply chain
© The AnyLogic Company | www.anylogic.com
anyLogistix Training
• Introduction to anyLogistix • Section 4: Dynamic Simulation
4.1 Presentation: What is Dynamic Simulation
• ALX Development Environment 4.2 Exercise: Simple Simulation Model
• Section 1: Facilities Location • Section 5: Supply Chain Analysis
1.1 Presentation: GFA 5.1 Exercise: Capacity Estimation
1.2 Exercise: Simple GFA 5.2 Exercise: Service Level Analysis
1.3 Exercise: Multi-Echelon GFA 5.3 Exercise: Risk assessment
• Section 2: Supply Chain Design • Section 6: Inventory Optimization
2.1 Presentation: Supply Chain Design 6.1 Presentation: Inventory Optimization
2.2 Exercise: Beer Distribution 6.2 Exercise: Safety Stock Assessment
6.3 Exercise: Bullwhip Effect Analysis
• Section 3: Master planning
3.1 Presentation: Master Planning • Section 7: Extensions & Inside 4 Walls Logic
3.2 Exercise: Beer Distribution 7.1 Presentation: ALX Extensions
3.3 Exercise: Beer Distribution and Production 7.2 Exercise: Customers loyalty & SC
7.3 Exercise: Transportation cost calculator
• Challenge 1
• Challenge 2
• Practice 1
• Practice 2
• Questions & Answers
• Questions & Answers
© The AnyLogic Company | www.anylogic.com 2
Your Supply Chain is Constantly Being Evaluated
How much to How should we deploy Which resources
What should be a produce and What if we introduce
design of the transportation policies? do we need?
where to store? new products?
supply chain?
Where is my Supply What if our workers
Chain susceptible go on strike?
to risk?
What capacity do
What service we need?
level we will
be able to provide
our customers? What manufacturing
capacity do we need?
Is there a risk of
bullwhip effect in What if we lose a key
my supply chain? supplier?
Which business processes How can I improve my existing
should we implement What if I change inventory, Should we Make or supply chain?
to reach operation excellence transportation or sourcing should we Buy?
policies?
© The AnyLogic Company | www.anylogic.com 3
Pyramid Supply Chain Analytics Problems
Level of Detail Problems Addressed
High Abstraction Locations
Where to Build DCs (GFA)
Less Detail Flows
Where to Stock Products (Net Opt)
Static Linear Dependencies
Master Planning
Continuous
Fleet Size Estimation
Parameter Aggregation
Dynamics (time) Transportation Planning
Randomness Inventory & Sourcing Policy Planning
Parameters Detailing Fleet Size Optimization
Network Processes Service Level & Capacity Estimation
Network Resources Bullwhip Analysis
Network Logic Number of supply chain Risk Analysis
Problems by level of detail Resources Planning & Optimization
How “Inside” influences “Outside”
Inside 4 walls Processes “Inside” Resources Optimization
Inside 4 walls Resources Production Planning
Low Abstraction Inside 4 walls Logic
More Detail “Inside” Bottlenecks Identification
Dynamic (time) Risk Analysis
© The AnyLogic Company | www.anylogic.com 4
Common Methods Used to Solve the Problems
Spreadsheets Analytical Optimization Dynamic Simulation
(solvers)
Pros:
Everybody knows Excel
Cons:
Application area is limited
Pros: Pros:
Used to address SC problems which can Detailed SC modeling. Considers dynamics,
be described with set of linear equations specific logic and randomness
Cons: Cons:
• Generalization • By nature simulation-based optimization
• Represent the supply chain as a may take significant time
continuous flow model • Difficult to use w/o a specialized UI
• Difficult to use w/o a specialized UI
© The AnyLogic Company | www.anylogic.com 5
Analytical Methods: Problems That Can be Addressed
• Supply Chain Design & GFA
̶ Where to locate our facilities?
̶ Identify throughput of our facilities
̶ Determine product flows
• Master Planning by Period:
̶ Where to produce or stock products? Answers the question;
̶ Determine optimal quantities to produce “What is the plan?”
and order
̶ Future resource requirements?
• Transportation
̶ Fleet Size Estimations
© The AnyLogic Company | www.anylogic.com 6
Analytical Models
Supply Chain - ACTUAL Supply Chain - MODEL
Goods/period
Labor/period
OPTIMIZATION
Time (dynamic) Time = Period
Consultant
Products Products = Flows per Period
Orders Orders = Demand Aggregated per Period
Transportation Resources = Flows per Period
Resources Transportation = Cost per Period
Facilities Facilities = Throughput per Period
Randomness Modeling Randomness
Network Level Logic/Processes Process Network Level Logic/Processes
Inside 4 Walls Logic/Processes Inside 4 Walls Logic/Processes
© The AnyLogic Company | www.anylogic.com 7
Analytical Methods: Key Points
• Analytical Optimization is well equipped for large-scale data
intensive problems
• Analytical Models are not able to properly describe the “reality” of
the Supply Chain. The approach forces you to make simplifications
and assumptions.
̶ Ex: Assuming all the events are uniformly distributed within a period
• Attributes not considered:
̶ Dynamics (Time)
̶ Randomness
̶ SC Operating Logic
• The approach is like a “BLACK BOX”
© The AnyLogic Company | www.anylogic.com 8
Why Dynamic Simulation?
“Simulation is especially useful, when the underlying system is
assumed to be too complex to be examined by mathematical-
analytical methods. Such complexity arises due to time-dependent,
random, and interacting effects within the system”
–“Towards Supply Chain Risk Analytics: Fundamentals, Simulation, Optimization”, IrisHeckmann, 2016.
Observation of Time Dynamic Interactions
Ability to observe how your Incorporate and gain visibility into dynamic
supply chain will perform over time interactions between supply chain elements
Real World Variability Actual Behavior
Integrate randomness into various Determine and gain insight into the
supply chain inputs and processes real behavior of your supply chain
© The AnyLogic Company | www.anylogic.com 9
Dynamic Simulation: Problems That Can be Addressed
• Examination\implementation of the Supply Chain
̶ What if the solution suggested by network
optimization is not feasible
̶ How to implement the plan suggested by
network optimization
• Understanding of how the Supply Chain operates
in time Answering the question:
̶ You need to understand how your Supply Chain “How to reach
works in details to manage it operational
excellence in your
• Supply Chain improvements over time Supply Chain?”
̶ What if you already have the Supply Chain, do
not plan any reconfiguration of the high-level
design but want to improve it?
• Risk assessment
̶ What are the risks related to SC design?
© The AnyLogic Company | www.anylogic.com 10
Dynamic Simulation Model
Supply Chain - MODEL
Supply Chain - ACTUAL Processes
Resources
Logic…
SIMULATION
Time (dynamic) Consultant Time = Actual Time
Products Products = Products & Parameters
Orders Orders = Orders & Parameters
Transportation Resources = Any Resource, Any Logic
Resources Transportation = Any Rules
Facilities Facilities = Location, Capacity
Randomness Modeling Randomness = any
Network Level Logic/Processes Process Network Level Logic/Processes
Inside 4 Walls Logic/Processes Inside 4 Walls Logic/Processes
© The AnyLogic Company | www.anylogic.com 11
Dynamic Simulation: Key Points
• Dynamic simulation methods allow you to model a Supply Chain
with limitless detail, including “Inside the 4 walls”
• Simulation-based optimization is fundamentally different from
mathematical-optimization
̶ The optimization engine is a separate program working in conjunction
with the Simulation Model – measuring the model output and
generating a new set of input parameters
• You must be careful when deciding on the level of abstraction to
build your Dynamic Simulation model - too many details may result
in slower performance
© The AnyLogic Company | www.anylogic.com 12
Pyramid Supply Chain Analytics Problems
Level of Detail Problems Addressed
High Abstraction Locations
Where to Build DCs (GFA)
Less Detail Flows
Where to Stock Products (Net Opt)
Static Linear Dependencies
Master Planning
Continuous
Fleet Size Estimation
Parameter Aggregation Analytical
Methods Transportation Planning
Dynamics (time)
Randomness Inventory & Sourcing Policy Planning
Parameters Detailing Fleet Size Optimization
Network Processes Service Level & Capacity Estimation
Network Resources Bullwhip Analysis
Network Logic Number of supply chain Risk Analysis
Dynamic
Problems by level of detail Resources Planning & Optimization
Simulation Methods How “Inside” influences “Outside”
Inside 4 walls Processes “Inside” Resources Optimization
Inside 4 walls Resources Production Planning
Low Abstraction Inside 4 walls Logic
More Detail “Inside” Bottlenecks Identification
Dynamic (time) Risk Analysis
© The AnyLogic Company | www.anylogic.com 13
Pyramid Supply Chain Analytics Problems
Level of Detail
High Abstraction Locations Less Lean
Less Detail Flows
Static Linear Dependencies
Continuous
Parameter Aggregation Analytical
Methods
Dynamics (time)
Randomness
Opportunities for Innovation
Parameters Detailing
Network Processes
Network Resources
Network Logic
Dynamic
Simulation Methods
Inside 4 walls Processes
Inside 4 walls Resources
Low Abstraction Inside 4 walls Logic
More Detail
Dynamic (time)
More Lean
The MORE LEAN you are trying to be, the more need for DYNAMIC SIMUALTION you will have
© The AnyLogic Company | www.anylogic.com 14
Example 1: Supply Chain Design
Details Result Method
Analytical
+ Aggregated demand
Areas to put the DCs Methods
+ Transportation cost (m3 per km)
(GFA)
+ Possible facilities locations Analytical
Configurations of supply
+ Real roads Methods
chain ranked by cost
+ Sites throughput (CPLEX)
+ Sites capacity (not throughput!) Configurations of supply Analytical Methods
+ Inventory policies chain ranked by criteria e.g +
+ Sourcing policies service level Dynamic Simulation
© The AnyLogic Company | www.anylogic.com 15
Example 2: Budgeting
Details Result Method
+ Products flows
+ Transportation cost (m3 per km)
Budget Excel
+ Flows processing cost
+ Labor and facilities cost
+ Time-based costs e.g.: Analytical Methods
+ Resources cost (linear, flows)
+ Operations cost Activity-Based Budget
+ Handling\carrying cost Dynamic
+ Idle cost Simulation
+ Randomness
+ Risks Dynamic
Budgeting Risk Assessment
+ Resources sharing Simulation
+ One line – many products
© The AnyLogic Company | www.anylogic.com 16
Example 3: Omnichannel Supply Chain
Details Result Method
+ Aggregated demand Configurations of supply Analytical Methods
+ Transportation cost (m3 per km) chains ranked by cost (GFA + NetOpt)
+ Processes inside 4 walls
How should
+ Resource sharing
the omnichannel supply
+ Sites capacity
chain operate? Dynamic
+ Working hours
(service level, number of Simulation
+ Refunds/returns
resources, resources
+ Inventory policies
utilization, reliability …)
+ Transportation policies
© The AnyLogic Company | www.anylogic.com 17
Example 4: Service Level and Bullwhip Estimation
Details Result Method
+ Supply chain
+ Inventory policies
+ Sourcing policies Service level
+Transportation policies Dynamic
Service level dynamics
+ Production policies Simulation
Bullwhip effect ratio
+ Sales and production batches
+ Capacities
+ Randomness
Bullwhip effect ratio
+ Costs (carrying, production…) Dynamic
Service level
+ What-IF scenarios Simulation
Cost dynamics
© The AnyLogic Company | www.anylogic.com 18
Example 5: Risk Analysis
Details Result Method
+ Operational risks
Supply chain robustness
+ Demand changes
Service level Dynamic
+ Lead time changes
Costs Simulation
+ Supplier reliability
Utilization
+ Strikes
+ Disruption risks
Supply chain robustness
+ Natural disasters Dynamic
Service level
+ Terrorism Simulation
Costs
+ Political and financial crisis
© The AnyLogic Company | www.anylogic.com 19
anyLogistix – Supply Chain Analytics Tool
• Design, optimize, analyze your supply chain with anyLogistix
• Use both analytical and dynamic simulation methods complimenting each other
• Employ the power of the leading dynamic simulation engine from AnyLogic and leading solver
CPLEX from IBM for precise end-to-end supply chain analysis
• Extend the functionality of built-in supply chain model using AnyLogic Professional
• Use powerful visualization and dashboard capabilities to observe how the supply chain works
anyLogistix
Supply Chain Model
Analytical methods Dynamic simulation methods
(CPLEX) (AnyLogic)
Linear Mixed Integer Discrete- System
Heuristics Agent-Based
Programming Programming event Dynamics
© The AnyLogic Company | www.anylogic.com 20
Pyramid Supply Chain Analytics Problems
Level of Detail
High Abstraction Locations Less Lean
The most of
Less Detail Flows
SC tools
Static Linear Dependencies
Continuous
Parameter Aggregation Analytical
Methods
Dynamics (time)
Randomness
Opportunities for Innovation
Parameters Detailing
Network Processes
Network Resources
Network Logic
Dynamic
Simulation Methods
Inside 4 walls Processes
Inside 4 walls Resources
Low Abstraction Inside 4 walls Logic
More Detail
Dynamic (time)
More Lean
The MORE LEAN you are trying to be, the more need for DYNAMIC SIMUALTION you will have
© The AnyLogic Company | www.anylogic.com 21
anyLogistix Usage Scenario
Supply Chain Model The solutions
Replenishment/Sourcing policies
Transportation policies
Inside 4 walls processes
Locations
Capacities
Resources
Risk assessment
Budgeting
…
The real world
Supply Chain Problem
? TMS
© The AnyLogic Company | www.anylogic.com 22
anyLogistix Simulation Modeling Capabilities
Warehouses Suppliers
Factory
Customers
AnyLogic
Factory
Distribution Centers
© The AnyLogic Company | www.anylogic.com 23
Integration with IT Infrastructure
GFA
Integration with
ERP systems &
Network
SC tools
optimization
Oracle What-If
SAP Visualization
MS Dynamics Dynamic simulation
experiments
SCM Software
Reports
…..
…..
© The AnyLogic Company | www.anylogic.com 24
How anyLogistix Works
Scenarios (initial data)
Scenario 1 Scenario 2 … Scenario N Scenario N+1 Scenario N+2
Experiments
Analytical methods Dynamic Simulation (AnyLogic)
Network Risk Inventory What-if &
GFA Comparison …
Optimization Analysis Optimization Visualization
Results Results Results Results Results Results Results
Decision making
© The AnyLogic Company | www.anylogic.com 25
anyLogistix Key Differentiators
• Integrates Analytical and Dynamic simulation methods for precise end-to-end
supply chain design and analysis
̶ Powered by the leading analytical solver (CPLEX) and leading dynamic
simulation engine (AnyLogic)
̶ Address large scale problems while providing true representation of reality
̶ Capture your Supply Chain uniqueness
• Modeling “Inside the 4 walls”
̶ Do not stop at network level, go deeper in your analysis to improve your
Supply Chain efficiency and effectiveness
• Extensibility with AnyLogic Professional
̶ Address ALL behavior in your Supply Chain by extending ALX functionality with
AnyLogic to extend standard model
• Visualization
̶ Observe how your Supply Chain works, validate the model and make
improvements while verifying assumptions
• Measure your Supply Chain
̶ Thanks to Dynamic Simulation you can measure everything in your model
̶ Use standard statistics or add your own
© The AnyLogic Company | www.anylogic.com 26
DEMO
© The AnyLogic Company | www.anylogic.com 27
In the margins…
© The AnyLogic Company | www.anylogic.com 28
Flows vs. Logic
• Flow is the amount of “something” in the Supply Chain per period
e.g.
̶ Ex 1: Number of orders per period
̶ Ex 2: Number of labor hours per period
• Logic is defined as the rules according to which your Supply Chain
operates
• Connection between Logic and Flows:
̶ All Flows are generated by the Logic inside your supply chain
̶ When you model in terms of Flows you abstract from underlying Logic
̶ Analytical Optimization optimizes the Flows. “Implementing”the flows
in your supply chain means finding the Logic
© The AnyLogic Company | www.anylogic.com 29
Periods vs. Time
• A Period represents length of time. There is a beginning of the period, end of the
period and nothing in between.
̶ For example, period may represent weeks, months, years
• Analytical models do not know how long a period is. Periods are treated like a unit of
measure.
• Analytical models work with periods, not time.
• The data a modeler feeds to an analytical model should be aggregated by period
̶ Ex: A Factory produces 1,000,000 TVs per Year
̶ Advantage: Data sets captured in time are easily represented
̶ Disadvantage: Distribution of data over time is ignored
• Example: The period is 1 day. Per day you produce 300 laptops to stock and ship them
every 7 days to the US.
̶ What is the flow from production line to finished goods warehouse?
̶ Answer: 300 laptops per period
̶ What is the flow from finished goods warehouse to the US?
̶ Answer: 300 laptops per period (it is not the same as every 7 days)
© The AnyLogic Company | www.anylogic.com 30
“Simulation”…The Reality of the Situation
• Does using the word “simulation” always mean the same thing?
̶ NO
• How “simulation” is used in most Supply Chain tools
̶ Simple visualization: basic animation of the Supply Chain
̶ Sensitivity analysis: how the system will react to fluctuations of input
parameters
• But dynamic simulation is much more powerful, this is like using
powerful multitool knife only as a fork
VS.
© The AnyLogic Company | www.anylogic.com 31
Capturing Uncertainty
• Uncertainty of Input Parameters
Supply Chain
Variation of Input
Model
Parameters
(deterministic)
• Uncertainty of Input Parameters and Variation within the model
Variation of Input Supply Chain
Parameters Model Probabilistic Output
(probabilistic)
Iterations
© The AnyLogic Company | www.anylogic.com 32
Distributions or Averages?
DC Capacity in 000 m3
60
50
1,2
1
• Average capacity utilization is 273K m3
• What is the target capacity for warehouse
Frequency
40 0,8
CDF
30 0,6
20 0,4 to rent/build?
10 0,2
0 0
180
300
100
120
140
160
200
220
240
260
280
320
340
360
380
400
420
440
460
480
Capacity in 000 m3
Service level (days)
120 1,2
• According to the SLA we must deliver 100 1
90% of the order within 30 days. Number of orders 80 0,8
CDF
• Our current service level is exactly 90% 60 0,6
40 0,4
• Should we be happy with this number? 20 0,2
0 0
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35
Lead time (days)
© The AnyLogic Company | www.anylogic.com 33
Throughput and Capacity
• Throughput - The rate at which
something can be processed
Ex) A warehouse can process
10,000 m3 of goods per year
• Capacity - The ability to hold,
receive or absorb inventory
Ex) A warehouse is able to hold
100 m3 of inventory
© The AnyLogic Company | www.anylogic.com 34
anyLogistix Training
• Introduction to anyLogistix • Section 4: Dynamic Simulation
4.1 Presentation: What is Dynamic Simulation
• ALX Development Environment 4.2 Exercise: Simple Simulation Model
• Section 1: Facilities Location • Section 5: Supply Chain Analysis
1.1 Presentation: GFA 5.1 Exercise: Capacity Estimation
1.2 Exercise: Simple GFA 5.2 Exercise: Service Level Analysis
1.3 Exercise: Multi-Echelon GFA 5.3 Exercise: Risk assessment
• Section 2: Supply Chain Design • Section 6: Inventory Optimization
2.1 Presentation: Supply Chain Design 6.1 Presentation: Inventory Optimization
2.2 Exercise: Beer Distribution 6.2 Exercise: Safety Stock Assessment
6.3 Exercise: Bullwhip Effect Analysis
• Section 3: Master planning
3.1 Presentation: Master Planning • Section 7: Extensions & Inside 4 Walls Logic
3.2 Exercise: Beer Distribution 7.1 Presentation: ALX Extensions
3.3 Exercise: Beer Distribution and Production 7.2 Exercise: Customers loyalty & SC
7.3 Exercise: Transportation cost calculator
• Challenge 1
• Challenge 2
• Practice 1
• Practice 2
• Questions & Answers
• Questions & Answers
© The AnyLogic Company | www.anylogic.com 35
Development Environment
© The AnyLogic Company | www.anylogic.com 36
Projects in anyLogistix
• In anyLogistix input data and experiments are organized by projects
• Each project can include any number of scenarios (input data) and experiments
• When you create a project ALX will automatically create a dedicated database
which includes all project related information
• Only one project can be worked with at a time. Use “File” menu to switch from
one project to another.
Project 1
database
Project 2
database
Project N
database
DBMS
© The AnyLogic Company | www.anylogic.com 37
anyLogistix Projects Menu
List of ALX projects.
Select the project you want
to open in ALX and click
“OK” button
Click the “Create” button
Project creation dialog
to create ALX project
© The AnyLogic Company | www.anylogic.com 38
anyLogistix Project Database Creation Dialog
New project name
Default project location
(workspace folder)
Custom database location
Database type
© The AnyLogic Company | www.anylogic.com 39
Login to anyLogistix Project Database
Set up your own username and password
when launching ALX for the first time
Checkbox to remember your username and password
Checkbox for automatic login
If you login for the first time to the project database
Click “OK” anyLogistix will suggest to create a user
• Use menu “Settings | Users“ to add, delete or edit users
© The AnyLogic Company | www.anylogic.com 40
anyLogistix Welcome Screen
List of examples
Click to create
new scenario
Click to open Help
© The AnyLogic Company | www.anylogic.com 41
anyLogistix Main Screen
Project name
Tabs with appropriate
scenarios
List of scenarios List of actions for
in selected tab selected scenario
Tabs to select a set of
tables to show
Selected table
List of tables for
selected scenario
© The AnyLogic Company | www.anylogic.com 42
anyLogistix GUI
Click to show
connections between Click to show
objects names of the objects
Button to filter the sites
to show on the map
Double click
to add selected
site
Map view
© The AnyLogic Company | www.anylogic.com 43
anyLogistix Menu
• Menu “File”
Create New Scenario
Import data from Excel
Export data to Excel
Add external tables to store
Change user to work additional information
with a Project
Change Project
• Menu “Extensions”
Click to run AnyLogic Professional
© The AnyLogic Company | www.anylogic.com 44
anyLogistix Menu
• Menu “Settings”
Add, remove, edit database users
Manage access rules
to the database
Choose UI language
Add, remove, edit units
• Menu “Help”
Import examples from Excel
Open welcome screen
Open log file
anyLogistix help
Version, license, copyrights
© The AnyLogic Company | www.anylogic.com 45
Experiments
Click to run selected experiment
Modeling period
Statistics to be collected
during simulation run
List of actions and available
Experiments for selected scenario
Other experiment
settings depending on
the selected experiment
Adjustable dashboard
Dashboard pages
© The AnyLogic Company | www.anylogic.com 46
anyLogistix Training
• Introduction to anyLogistix • Section 4: Dynamic Simulation
4.1 Presentation: What is Dynamic Simulation
• ALX Development Environment 4.2 Exercise: Simple Simulation Model
• Section 1: Facilities Location • Section 5: Supply Chain Analysis
1.1 Presentation: GFA 5.1 Exercise: Capacity Estimation
1.2 Exercise: Simple GFA 5.2 Exercise: Service Level Analysis
1.3 Exercise: Multi-Echelon GFA 5.3 Exercise: Risk assessment
• Section 2: Supply Chain Design • Section 6: Inventory Optimization
2.1 Presentation: Supply Chain Design 6.1 Presentation: Inventory Optimization
2.2 Exercise: Beer Distribution 6.2 Exercise: Safety Stock Assessment
6.3 Exercise: Bullwhip Effect Analysis
• Section 3: Master planning
3.1 Presentation: Master Planning • Section 7: Extensions & Inside 4 Walls Logic
3.2 Exercise: Beer Distribution 7.1 Presentation: ALX Extensions
3.3 Exercise: Beer Distribution and Production 7.2 Exercise: Customers loyalty & SC
7.3 Exercise: Transportation cost calculator
• Challenge 1
• Challenge 2
• Practice 1
• Practice 2
• Questions & Answers
• Questions & Answers
© The AnyLogic Company | www.anylogic.com 47
1.1 Presentation:
Green Field Analysis (GFA)
© The AnyLogic Company | www.anylogic.com 48
What is Greenfield Analysis
• Objective:
̶ Find potential areas to locate supply chain facilities
• GFA uses the following information to do the optimization:
̶ Products
̶ Demand
̶ Customer Locations
̶ Service distance or number of facilities
• Criteria:
̶ Minimizing “transportation cost”
which is calculated as
<distance> * <product amount>
• Simplifications:
̶ All the routes are straight
̶ GFA knows nothing about surface
© The AnyLogic Company | www.anylogic.com 49
anyLogistix Training
• Introduction to anyLogistix • Section 4: Dynamic Simulation
4.1 Presentation: What is Dynamic Simulation
• ALX Development Environment 4.2 Exercise: Simple Simulation Model
• Section 1: Facilities Location • Section 5: Supply Chain Analysis
1.1 Presentation: GFA 5.1 Exercise: Capacity Estimation
1.2 Exercise: Simple GFA 5.2 Exercise: Service Level Analysis
1.3 Exercise: Multi-Echelon GFA 5.3 Exercise: Risk assessment
• Section 2: Supply Chain Design • Section 6: Inventory Optimization
2.1 Presentation: Supply Chain Design 6.1 Presentation: Inventory Optimization
2.2 Exercise: Beer Distribution 6.2 Exercise: Safety Stock Assessment
6.3 Exercise: Bullwhip Effect Analysis
• Section 3: Master planning
3.1 Presentation: Master Planning • Section 7: Extensions & Inside 4 Walls Logic
3.2 Exercise: Beer Distribution 7.1 Presentation: ALX Extensions
3.3 Exercise: Beer Distribution and Production 7.2 Exercise: Customers loyalty & SC
7.3 Exercise: Transportation cost calculator
• Challenge 1
• Challenge 2
• Practice 1
• Practice 2
• Questions & Answers
• Questions & Answers
© The AnyLogic Company | www.anylogic.com 50
Exercise 1.2: Problem Definition
• Description:
̶ You are going to start selling innovative tooth
brush in the USA
̶ The demand is proportional to the population
of the cities
̶ You would like to deliver the product to your customers within 2 days
which means the customers should be located within 1000km range
from the facilities
• Goal:
̶ Find the areas to locate regional distribution centers
© The AnyLogic Company | www.anylogic.com 51
1.2 Exercise: Action – Step 1
2. Name the scenario “Simple GFA”
1. Click this button to
create new scenario
3. Choose GFA
4. Enable toggle button
© The AnyLogic Company | www.anylogic.com 52
1.2 Exercise: Action – Step 2
1. Specify that you would like to create one
customer per location with demand
proportional to population of the city
2.Choose “United States”
3. Specify that you would
like to define demand for
100 biggest cities in the US
4. Define that customers
buy toothbrush every day
5. Demand per capita per 1 day is 0.003
which corresponds to addressable market
of 10% of the population
6. Click “OK”
© The AnyLogic Company | www.anylogic.com 53
1.2 Exercise: Action – Step 3
• Initially we do not plan to sell toothbrush in Anchorage and Honolulu, thus let’s
delete them
1. Select customer in Anchorage
and right click to open context menu
2. Choose “Remove” to
delete the customer
3. Delete customer in Honolulu
4. Select “Demand”
table
5. Click on the name of the column “Customer”
6. Select two empty demand
records and delete them with
“Remove” button
© The AnyLogic Company | www.anylogic.com 54
1.2 Exercise: Action – Step 4
3. Choose “pcs” as
measurement unit
1. Select “Products” table
2. Change the name of
the product to “Toothbrush“
© The AnyLogic Company | www.anylogic.com 55
1.2 Exercise: Action – Step 5
1. Click “GFA experiment” to
open experiment settings
6. Run the experiment
3. Define maxim service distance 1000
2. Choose “Maximum service
distance” button
4. Choose pieces
5. Choose kilometers
© The AnyLogic Company | www.anylogic.com 56
1.2 Exercise: Action – Step 6
2. Click the button to show connections
1. Click on the result of
the experiment
Amount of flows between 3. Analyze the result
customers and sites
List of found sites
with the locations
How demand fulfilment
depends
depends on
on distance
distance
© The AnyLogic Company | www.anylogic.com 57
Tables: Interface
Use “Add” button to add new record
Click table groups buttons to filter tables Use “Remove” button to delete selected record(s)
Click the cell to select it.
Click the“#” filed to select the row. Shift+click to select a range of cells.
Shift+click to select a range of row. Ctrl+click for multiple selection.
Ctrl+click for multiple selection
Press Space to change
the value in the selected cells
© The AnyLogic Company | www.anylogic.com 58
Tables: Interface (2)
Click and drag the name These are the filters. If you define multiple
of the column to move it filters they work as “and” i.e.
Filter 1 & Filter 2 &…. Filter N
basing on the first column that you edited
This filter shows all locations
This filter shows all locations with latitude less than -75 Press this button to
which names include “New” You may use <, >, = remove filter
© The AnyLogic Company | www.anylogic.com 59
anyLogistix Training
• Introduction to anyLogistix • Section 4: Dynamic Simulation
4.1 Presentation: What is Dynamic Simulation
• ALX Development Environment 4.2 Exercise: Simple Simulation Model
• Section 1: Facilities Location • Section 5: Supply Chain Analysis
1.1 Presentation: GFA 5.1 Exercise: Capacity Estimation
1.2 Exercise: Simple GFA 5.2 Exercise: Service Level Analysis
1.3 Exercise: Multi-Echelon GFA 5.3 Exercise: Risk assessment
• Section 2: Supply Chain Design • Section 6: Inventory Optimization
2.1 Presentation: Supply Chain Design 6.1 Presentation: Inventory Optimization
2.2 Exercise: Beer Distribution 6.2 Exercise: Safety Stock Assessment
6.3 Exercise: Bullwhip Effect Analysis
• Section 3: Master planning
3.1 Presentation: Master Planning • Section 7: Extensions & Inside 4 Walls Logic
3.2 Exercise: Beer Distribution 7.1 Presentation: ALX Extensions
3.3 Exercise: Beer Distribution and Production 7.2 Exercise: Customers loyalty & SC
7.3 Exercise: Transportation cost calculator
• Challenge 1
• Challenge 2
• Practice 1
• Practice 2
• Questions & Answers
• Questions & Answers
© The AnyLogic Company | www.anylogic.com 60
1.3 Exercise: Problem Definition
• Description:
̶ You would like to produce innovative tooth
brush in the USA
̶ You plan to have one production site and ship
the product to the regional distribution center
form the factory
• Goal:
̶ Find the area to place the factory
© The AnyLogic Company | www.anylogic.com 61
1.3 Exercise: Action – Step 1
2. Click right mouse button
to open context menu
1. Select the result
of the experiment
3. Select “Convert to GFA scenario”
© The AnyLogic Company | www.anylogic.com 62
1.3 Exercise: Action – Step 2
2. Click right mouse button
1. Select converted to open context menu
scenario
4. Rename scenario to
3. Select “Properties” “Simple GFA with Factory
5. Select and delete default description
6. Click “OK”
© The AnyLogic Company | www.anylogic.com 63
1.3 Exercise: Action – Step 3
7. Run the experiment
1. Select the
converted
scenario
5. Disable the toggle button
2. Select “GFA Experiment”
6. Enable the toggle button
3. Choose “Desired number of sites” and to tell GFA you want
enter “1” to tell GFA to find the site which will
we want to find 1 site supply the existing sites
4. Choose pieces
© The AnyLogic Company | www.anylogic.com 64
1.3 Exercise: Action – Step 4
1. Click show connections button
2. Use those buttons to filter
the objects on the map
3. Analyze the results
© The AnyLogic Company | www.anylogic.com 65
Discussion
• What should be the settings of GFA experiment if:
̶ Transportation cost is calculated based on volume of the product
̶ Distance is measured in miles
• If you do two experiments below with the same input data and in
both cases GFA suggests two sites, which result will be better from
transportation cost standpoint?
̶ Experiment 1: Desired number of sites = 2
̶ Experiment 2: Maximum service distance = 100
© The AnyLogic Company | www.anylogic.com 66
Summary
• Greenfield analysis is used to find the AREAS to locate facilities
• To conduct a GFA experiment you need to define:
̶ Customers
̶ Products
̶ Demand
• Criteria:
̶ Minimizing transportation cost which is calculated as <distance> * <product
amount>
• GFA Results:
̶ Areas to locate the facilities
̶ Flows between facilities and customers
̶ Distance by demand
̶ Demand by distance
• Simplifications:
̶ GFA does not know about surface i.e. sea or land, cities, means of transportation
etc. thus it may suggest to put DCs in unrealistic locations. i.e. on the top of the
mountain or in the middle of the sea
̶ GFA calculates the locations based on direct distance
© The AnyLogic Company | www.anylogic.com 67
anyLogistix Training
• Introduction to anyLogistix • Section 4: Dynamic Simulation
4.1 Presentation: What is Dynamic Simulation
• ALX Development Environment 4.2 Exercise: Simple Simulation Model
• Section 1: Facilities Location • Section 5: Supply Chain Analysis
1.1 Presentation: GFA 5.1 Exercise: Capacity Estimation
1.2 Exercise: Simple GFA 5.2 Exercise: Service Level Analysis
1.3 Exercise: Multi-Echelon GFA 5.3 Exercise: Risk assessment
• Section 2: Supply Chain Design • Section 6: Inventory Optimization
2.1 Presentation: Supply Chain Design 6.1 Presentation: Inventory Optimization
2.2 Exercise: Beer Distribution 6.2 Exercise: Safety Stock Assessment
6.3 Exercise: Bullwhip Effect Analysis
• Section 3: Master planning
3.1 Presentation: Master Planning • Section 7: Extensions & Inside 4 Walls Logic
3.2 Exercise: Beer Distribution 7.1 Presentation: ALX Extensions
3.3 Exercise: Beer Distribution and Production 7.2 Exercise: Customers loyalty & SC
7.3 Exercise: Transportation cost calculator
• Challenge 1
• Challenge 2
• Practice 1
• Practice 2
• Questions & Answers
• Questions & Answers
© The AnyLogic Company | www.anylogic.com 68
2.1 Presentation:
Network Optimization
© The AnyLogic Company | www.anylogic.com 69
What is Network Optimization (1)
• Analytical model describes the supply chain as a set of all possible flows and facilities
$$$
$$$
• The optimal solution is the best set of flows and facilities
̶ Maximize cost
̶ Satisfy constraints
• Outputs of optimization are values of flows and storages in each time period and
associated costs
© The AnyLogic Company | www.anylogic.com 70
What is Network Optimization (2)
• Objective:
̶ Find best locations for supply chain facilities and optimal flows in each period
̶ Network structure from suppliers to customers
• Network Optimization uses the following information to do the optimization:
̶ Demand
̶ Exact locations of suppliers, customers, existing and to-be facilities
̶ Flows
̶ Storages
̶ Costs
̶ Constraints
̶ Periods
• Criteria:
̶ Maximizing revenue
• Simplifications:
̶ We operate with flows, not individual shipments
̶ Flows are uniform
© The AnyLogic Company | www.anylogic.com 71
What is Network Optimization (3)
• We define all possible flows in our supply chain
̶ Some might be fixed
• Constraints add some limitations:
̶ Min/max value of the flow or storage
̶ Multiple constraints may apply limit on number of flows/storages
̶ Limit number of facilities in each group
̶ Custom constraints
• Penalties:
̶ Are used to avoid infeasibility
̶ Assume our supply capacity is less than demand
̶ We couldn’t solve the problem in case of hard constraints
̶ Help to understand which assumptions were wrong
̶ Assume that transportation cost is higher than sale price
̶ The best solution would be not to sell anything unless we put higher penalty for not satisfying
demand
© The AnyLogic Company | www.anylogic.com 72
anyLogistix Training
• Introduction to anyLogistix • Section 4: Dynamic Simulation
4.1 Presentation: What is Dynamic Simulation
• ALX Development Environment 4.2 Exercise: Simple Simulation Model
• Section 1: Facilities Location • Section 5: Supply Chain Analysis
1.1 Presentation: GFA 5.1 Exercise: Capacity Estimation
1.2 Exercise: Simple GFA 5.2 Exercise: Service Level Analysis
1.3 Exercise: Multi-Echelon GFA 5.3 Exercise: Risk assessment
• Section 2: Supply Chain Design • Section 6: Inventory Optimization
2.1 Presentation: Supply Chain Design 6.1 Presentation: Inventory Optimization
2.2 Exercise: Beer Distribution 6.2 Exercise: Safety Stock Assessment
6.3 Exercise: Bullwhip Effect Analysis
• Section 3: Master planning
3.1 Presentation: Master Planning • Section 7: Extensions & Inside 4 Walls Logic
3.2 Exercise: Beer Distribution 7.1 Presentation: ALX Extensions
3.3 Exercise: Beer Distribution and Production 7.2 Exercise: Customers loyalty & SC
7.3 Exercise: Transportation cost calculator
• Challenge 1
• Challenge 2
• Practice 1
• Practice 2
• Questions & Answers
• Questions & Answers
© The AnyLogic Company | www.anylogic.com 73
2.1 Exercise: Problem Definition
• Description:
̶ Design beer distribution network in Germany
̶ The Köstritzer brewery is located in Bad Köstritz
̶ Local distributors are all over the country
̶ There are some known locations for warehouses
• Goal:
̶ Find best number of locations for warehouses
© The AnyLogic Company | www.anylogic.com 74
2.1 Exercise: Action - Step 1
• Import Beer Distribution scenario
• Scenario already contains:
̶ Customers with corresponding historic demand
̶ The supplier (brewery)
̶ All possible locations for warehouses with corresponding costs
̶ Paths and flows between the supplier and possible DC locations
̶ Paths and flows between possible DCs and customers
© The AnyLogic Company | www.anylogic.com 75
2.1 Exercise: Action - Step 2
1. Switch to “NO experiment”
4. Run the experiment
© The AnyLogic Company | www.anylogic.com 76
2.1 Exercise: Experiment settings
• Demand variation type:
̶ Exact
̶ Optimizer will try to satisfy specified demand
̶ 100%-105%
̶ 95%-100%
̶ These options help to understand profitability
of each customer
• Search type for N best solutions
̶ Find N best
̶ Optimizer finds next best solution one by one
̶ Solution pool
̶ Optimizer keeps solutions found during search and
returns N best of them
• Optimization time limit
̶ Sets the maximum time for optimization process
• Relative MIP gap
̶ Sets a relative tolerance on the gap between the best found solution and best
possible solution.
̶ To instruct the optimizer to stop when it has found a solution proved to be within five percent of
optimal, set the relative MIP gap tolerance to 0.05
© The AnyLogic Company | www.anylogic.com 77
2.1 Exercise: Action - Step 3
2. Click the button to show
the connections
Results tabs
1. The best result is on top.
Select it to see the map.
Total amount of flows
Profit
2. Detailed statistics
© The AnyLogic Company | www.anylogic.com 78
2.1 Exercise: Action - Step 4
2. Click the button
to enlarge the table
1. Select output table you 3. Use filters to analyze the data
would like to look at
© The AnyLogic Company | www.anylogic.com 79
2.1 Exercise: How It Works
• IBM CPLEX solver is built into anyLogistix and used by default
̶ You can also use other external solvers using a custom experiment
• The whole structure of the Supply Chain is considered. Optimal flows along with the
configuration of DCs are searched
̶ Mixed Integer Linear Programming problem is solved
• The objective to maximize:
Profit (NetOpt) = Revenue - Sites Associated Costs - Transportation Costs - Penalties
• Optimization Variables:
̶ Site opening & closure – a site may change its state only once across all periods in a SC
configuration
̶ Flow values
̶ Storage values
© The AnyLogic Company | www.anylogic.com 80
Exercise 2.1: How It Works (2)
• Flow definition
On: Defines flow and Off: applies constraints to
Group or facility
Individual constraints sum of flows
Constraints applied to the flow Fixed value of the flow Penalties for constraints violation
© The AnyLogic Company | www.anylogic.com 81
Exercise 2.1: How It Works (3)
• Hard constraints: “Fixed Value” option – used if “Fixed” flag is “On”
• Soft Constraints: Penalty Options
̶ Demand: “Down Penalty” and “Up Penalty”
̶ If total amount requested = 1000, amount received = 900, down penalty = 2000$, then total penalty will be 200,000$
̶ Site Constraints – Applied to a storage at the end of a period if “Fixed” flag is “Off”
Stock Down Safety Stock Stock Up
No Penalty
Penalty Penalty Penalty
Min Stock Safety Stock Max Stock
̶ Flow Constraints – applied to a flow (throughput) within a period if “Fixed” flag is “Off”
Down Penalty No Penalty Up Penalty
Min Throughput Max Throughput
© The AnyLogic Company | www.anylogic.com 82
Exercise 2.1: Problem Definition
• Description:
̶ Köstritzer is a small brewery, shipping to 5 warehouses generates
unwanted overhead
̶ Small shipments may lead to higher transportation costs
• Goal:
̶ Check if it makes sense to have a 2-tier network
̶ The brewery will ship to one or several distribution centers
̶ Distribution centers will ship to local warehouses
© The AnyLogic Company | www.anylogic.com 83
2.1 Exercise: Action – Step 5
• Create 3 sites as potential distribution centers
̶ Click on “Create warehouse” button
̶ Double-click on the map at the position you want to place a DC
̶ Name it DC1
̶ Create also DC2 and DC3
• Go to DCs and Factories table
̶ Change “Inclusion Type” of created DCs to “Consider”
̶ Change “Initially Opened” to false
© The AnyLogic Company | www.anylogic.com 84
2.1 Exercise: Action – Step 6
• Create a group containing these sites
̶ Name it DCs
• We have to adjust existing flows definition to specify 2-tier structure
• Navigate to the “Product flows” table, adjust the data:
̶ The brewery can ship only to DCs
̶ DCs can ship to warehouses
̶ Warehouses can ship to customers
© The AnyLogic Company | www.anylogic.com 85
2.1 Exercise: Action – Step 7
• We need to adjust paths to reflect new flows
̶ Navigate to the “Paths” table and add the following paths:
̶ Brewery to DCs: Volume-distance based, value = 0.1
̶ DCs to warehouses: Volume-distance based, value = 0.2
̶ Paths shouldn’t be straight
• Navigate to “Facility Expenses” table and add Costs for DCs:
̶ Other costs: 1000 USD per day
̶ Carrying costs: 0.05 USD per day per m3
© The AnyLogic Company | www.anylogic.com 86
2.1 Exercise: Measurement Units
• ALX allows to use specific units in your supply chain
• ALX has 2 types of units:
̶ Project units
̶ Scenario units
• You can specify conversions between units
̶ Once you have created a new unit, you must define the conversions
for this unit to use it in your scenarios
© The AnyLogic Company | www.anylogic.com 87
2.1 Exercise: Project Units
• Project units
̶ Available through menu: Settings -> Units
̶ Allows to define measurement units which will be available in all
scenarios of the project
̶ Allows to specify default unit of the project
̶ The Default unit is the type of a unit that is used throughout the scenarios of the
current project by default, preventing you from specifying it each time
̶ You can set a default unit for each of the available unit measurement types:
̶ Weight
̶ Volume
̶ Distance
̶ Speed
̶ Time
̶ Currency
© The AnyLogic Company | www.anylogic.com 88
2.1 Exercise: Scenario Units
• Scenario units
̶ Available through the scenario “Units” table
̶ Allows to create custom measurement units of weight and volume
that will be used exclusively within the current scenario
̶ All these units will be available in the corresponding table cells
additionally to the available project units
© The AnyLogic Company | www.anylogic.com 89
2.1 Exercise: Unit Conversions
• Project units conversions
̶ You can't edit the default existing conversion rule If it comprises a pair
of standard predefined units unless these units belong to the Currency
type
̶ Conversions can be created only for units of the same type
̶ Conversions are product-independent
• Scenario units conversions
̶ Allows to create conversions for the user-defined weight and volume
units that will be used exclusively within the current scenario
̶ Conversions refer to a specific product, and there can be only one unit
conversion per table record
© The AnyLogic Company | www.anylogic.com 90
2.1 Exercise: Action – Step 8
• Run optimization
• Examine Results
̶ It might happen we’ll get all DCs in the result
̶ Let’s define number of DCs should not exceed 2 sites
© The AnyLogic Company | www.anylogic.com 91
2.1 Exercise: Action – Step 9
• Navigate to “Assets Constraints table” (“Advanced” tab)
̶ Add a constraint for DCs group: min=0, max=2
• Run experiment again and check the results
• You can have overlapping Assets constraints:
̶ Different groups can contain the same facilities
̶ All constraints are applied simultaneously
• As an exercise try the following configuration:
̶ Number of DCs should not exceed 2
̶ Number of warehouses should not exceed 2
̶ Number of sites should not exceed 3
© The AnyLogic Company | www.anylogic.com 92
anyLogistix Training
• Introduction to anyLogistix • Section 4: Dynamic Simulation
4.1 Presentation: What is Dynamic Simulation
• ALX Development Environment 4.2 Exercise: Simple Simulation Model
• Section 1: Facilities Location • Section 5: Supply Chain Analysis
1.1 Presentation: GFA 5.1 Exercise: Capacity Estimation
1.2 Exercise: Simple GFA 5.2 Exercise: Service Level Analysis
1.3 Exercise: Multi-Echelon GFA 5.3 Exercise: Risk assessment
• Section 2: Supply Chain Design • Section 6: Inventory Optimization
2.1 Presentation: Supply Chain Design 6.1 Presentation: Inventory Optimization
2.2 Exercise: Beer Distribution 6.2 Exercise: Safety Stock Assessment
6.3 Exercise: Bullwhip Effect Analysis
• Section 3: Master planning
3.1 Presentation: Master Planning • Section 7: Extensions & Inside 4 Walls Logic
3.2 Exercise: Beer Distribution 7.1 Presentation: ALX Extensions
3.3 Exercise: Beer Distribution and Production 7.2 Exercise: Customers loyalty & SC
7.3 Exercise: Transportation cost calculator
• Challenge 1
• Challenge 2
• Practice 1
• Practice 2
• Questions & Answers
• Questions & Answers
© The AnyLogic Company | www.anylogic.com 93
3.1 Presentation:
Master Planning
© The AnyLogic Company | www.anylogic.com 94
3.1 What is Master Planning
• Now you may use periods in ALX
• Demand is defined separately for each period
• The output of the period is the input for the next one
• A site can be closed/opened in the period
• Inventory can be planned for beginning and end of the period
IQ IIQ IIIQ IVQ
© The AnyLogic Company | www.anylogic.com 95
anyLogistix Training
• Introduction to anyLogistix • Section 4: Dynamic Simulation
4.1 Presentation: What is Dynamic Simulation
• ALX Development Environment 4.2 Exercise: Simple Simulation Model
• Section 1: Facilities Location • Section 5: Supply Chain Analysis
1.1 Presentation: GFA 5.1 Exercise: Capacity Estimation
1.2 Exercise: Simple GFA 5.2 Exercise: Service Level Analysis
1.3 Exercise: Multi-Echelon GFA 5.3 Exercise: Risk assessment
• Section 2: Supply Chain Design • Section 6: Inventory Optimization
2.1 Presentation: Supply Chain Design 6.1 Presentation: Inventory Optimization
2.2 Exercise: Beer Distribution 6.2 Exercise: Safety Stock Assessment
6.3 Exercise: Bullwhip Effect Analysis
• Section 3: Master planning
3.1 Presentation: Master Planning • Section 7: Extensions & Inside 4 Walls Logic
3.2 Exercise: Beer Distribution 7.1 Presentation: ALX Extensions
3.3 Exercise: Beer Distribution and Production 7.2 Exercise: Customers loyalty & SC
7.3 Exercise: Transportation cost calculator
• Challenge 1
• Challenge 2
• Practice 1
• Practice 2
• Questions & Answers
• Questions & Answers
© The AnyLogic Company | www.anylogic.com 96
3.2 Exercise: Problem Definition
• Problem Definition
̶ We have designed beer distribution network
in the previous exercise
• Goal:
̶ Find amount of product at storages at the
beginning and end of each month
© The AnyLogic Company | www.anylogic.com 97
3.2 Exercise: Action - Step 1
Let’s explore results of NO experiment
• Open the last received NO experiment results
• Open “Storage by product” table
• Filter results by Iteration 1 (best result)
̶ Type “1” in the filter field below the Iteration column name and press
“Enter”
• Filter by one of the opened sites
̶ Type site name in the filter field below the Facility column name and press
“Enter”
As you can see flow result is aggregated by the whole year
© The AnyLogic Company | www.anylogic.com 98
3.2 Exercise: Action - Step 2
• Let’s split year by 2 periods
̶ Click “Data”
̶ Click “All”
̶ To open list of all tables
̶ Open “Periods” table
̶ Rename basic period to
“Time period 1”
̶ Create one more period
̶ Name: Time Period 2
̶ Start date: 01.07.2017
© The AnyLogic Company | www.anylogic.com 99
3.2 Exercise: Action - Step 3
• Run NO experiment
• Open result
̶ Open “Storage by product” table
̶ Filter by Iteration 1 (best result)
̶ Filter by one of the opened sites
• Results are shown for 2 periods
© The AnyLogic Company | www.anylogic.com 100
3.2 Exercise: Action - Step 4
• Let’s add 12 periods for each month of the year
̶ Remove all periods from the “Periods” table
̶ Click File -> Import Scenario and select “3.2 Periods.xlsx” Excel file
̶ Open Advanced options
̶ Check “Periods” in “Sheets to import” section
̶ Uncheck “Import experiments”
̶ Uncheck “Create new scenario”
̶ Select scenario to import
© The AnyLogic Company | www.anylogic.com 101
3.2 Exercise: Action - Step 5
• Click “OK” to import periods table to
existing scenario
• Now we have 12 periods for 1 year
© The AnyLogic Company | www.anylogic.com 102
3.2 Exercise: Action - Step 6
• Run NO experiment
• Open result
̶ Open “Storage by product” tab
̶ Filter by Iteration 1 (best result)
̶ Filter by one of the opened sites
• Results are shown for 12 periods now
© The AnyLogic Company | www.anylogic.com 103
anyLogistix Training
• Introduction to anyLogistix • Section 4: Dynamic Simulation
4.1 Presentation: What is Dynamic Simulation
• ALX Development Environment 4.2 Exercise: Simple Simulation Model
• Section 1: Facilities Location • Section 5: Supply Chain Analysis
1.1 Presentation: GFA 5.1 Exercise: Capacity Estimation
1.2 Exercise: Simple GFA 5.2 Exercise: Service Level Analysis
1.3 Exercise: Multi-Echelon GFA 5.3 Exercise: Risk assessment
• Section 2: Supply Chain Design • Section 6: Inventory Optimization
2.1 Presentation: Supply Chain Design 6.1 Presentation: Inventory Optimization
2.2 Exercise: Beer Distribution 6.2 Exercise: Safety Stock Assessment
6.3 Exercise: Bullwhip Effect Analysis
• Section 3: Master planning
3.1 Presentation: Master Planning • Section 7: Extensions & Inside 4 Walls Logic
3.2 Exercise: Beer Distribution 7.1 Presentation: ALX Extensions
3.3 Exercise: Beer Distribution and Production 7.2 Exercise: Customers loyalty & SC
7.3 Exercise: Transportation cost calculator
• Challenge 1
• Challenge 2
• Practice 1
• Practice 2
• Questions & Answers
• Questions & Answers
© The AnyLogic Company | www.anylogic.com 104
3.3 Exercise: Problem Definition
• Problem Definition
̶ There is a beer distribution network which
we designed on previous steps
̶ Since we plan to produce beer ourselves we need to
add brewery to the model
• Goal:
̶ Find the amount of product the brewery should
produce each period (month)
© The AnyLogic Company | www.anylogic.com 105
3.3 Exercise: Action - Step 1
• Let’s replace Supplier with a Factory
̶ Click Data
̶ Add new Factory
̶ Name this factory “Brewery”
̶ Set type: Factory
̶ Set “Bad Köstritz” location for this factory (location of the Supplier)
̶ Remove Supplier from the “Suppliers” table
© The AnyLogic Company | www.anylogic.com 106
3.3 Exercise: Action - Step 2
• Navigate to “Product flows” table
̶ Select Brewery in the “Source” column (instead of empty cell)
© The AnyLogic Company | www.anylogic.com 107
3.3 Exercise: Action - Step 3
• Navigate to “BOM” table
̶ Click “Add” to create new BOM
̶ Name it “Beer BOM”
̶ Select “Beer” in the “End product” column
© The AnyLogic Company | www.anylogic.com 108
3.3 Exercise: Action - Step 4
• Navigate to “Production” table
̶ Click “Add” to create new table record
̶ Site: Brewery
̶ Product: beer
̶ BOM: Beer BOM
̶ Cost: 35$
• Anything else?
© The AnyLogic Company | www.anylogic.com 109
3.3 Exercise: Action - Step 5
• Run NO experiment
• Let’s look at how the “Brewery” works:
̶ Select “Storage by product” table
̶ Filter by facility “Brewery”
̶ We can see “Brewery” Out Flows. This the amount “Brewery” produces per period
̶ Analyze “Production Cost” table
̶ Table shows detailed statistics on costs incurred during the production process
© The AnyLogic Company | www.anylogic.com 110
3.3 Exercise: Action - Step 6
• Now we have infinite production throughput
• Let’s add maximum throughput restrictions for the “Brewery”
̶ Navigate to “Production” table
̶ Set Max throughput to 600 000
̶ Set “Up Penalty” to 1000
̶ NOTE: How the maximum throughput value is calculated
̶ As we can see in previous results total factory throughput is about
7 000 000 produced items for a year
̶ Divide 7 000 000 by 12 month: 584 000
̶ Round it up to 600 000
© The AnyLogic Company | www.anylogic.com 111
3.3 Exercise: Action - Step 7
• Run NO experiment
• Open result
• Analyze “Production costs” table
̶ Filter by Iteration 1 (best result)
̶ Production amount at each period do not exceed 600 000
̶ “Brewery” works at full capacity first months
• Analyze “Storage by product” table
̶ Filter by Iteration 1 (best result) and by “Brewery”
̶ “Brewery”s Out Flow hasn't changed, but “Brewery” now keeps certain
amount of product at the end of each period to be able to satisfy
demand of the forthcoming periods
• Is everything OK? Let’s have a look at the “Demand” table in result
© The AnyLogic Company | www.anylogic.com 112
3.3 Exercise: Action - Step 8
• Open “Demand” table
• Analyze values of “Penalty” and “Satisfied” columns
• As you can see we have unsatisfied demand
© The AnyLogic Company | www.anylogic.com 113
3.3 Exercise: Action - Step 9
• All products are stored at the Brewery where we do not have much
space
• Let’s store the product at the DCs
̶ Navigate to “Facility Expenses” table
̶ Add new table record
̶ Select Brewery in the “Facility” column
̶ Set “Expense Type” and Value columns to “Carrying cost” and “1” respectively
© The AnyLogic Company | www.anylogic.com 114
3.3 Exercise: Action - Step 10
• Run NO experiment
• Analyze “Storage by Product” table
̶ There is no storage at the “Brewery”
̶ All storage is distributed among sites
• As you can see from the data of the “Demand” table, we haven't
completely satisfied demand
• What should we do to completely satisfy demand?
© The AnyLogic Company | www.anylogic.com 115
Discussion
• What is the difference between capacity and throughput?
• May we calculate warehouse capacity based on throughput value?
• If you set time period equal to 1 days will you be able to:
̶ Calculate warehouse capacity
̶ Inventory in/out for each day
̶ How much to produce every day
• How can we set up factory parameters to make it work for certain
periods (for example the 2nd and the 4th periods)?
• What should you do in actual supply chain to implement the results
of network optimization?
© The AnyLogic Company | www.anylogic.com 116
Summary
• Network optimization is used to find optimal supply chain configuration and master
planning by periods
• To do master planning you need to define:
̶ Customers
̶ Products
̶ Demand
̶ Sites
̶ Flows and constraints
• Criteria:
̶ Profit maximization
• Results:
̶ Cost, revenue and profit
̶ Inventory levels at the beginning and end of the period
̶ Flows between the facilities
̶ Supply chain structure by periods
• Simplifications:
̶ All the values are distributed uniformly within the period
̶ It does not take into account dynamics and operating logic of a supply chain
© The AnyLogic Company | www.anylogic.com 117
anyLogistix Training
• Introduction to anyLogistix • Section 4: Dynamic Simulation
4.1 Presentation: What is Dynamic Simulation
• ALX Development Environment 4.2 Exercise: Simple Simulation Model
• Section 1: Facilities Location • Section 5: Supply Chain Analysis
1.1 Presentation: GFA 5.1 Exercise: Capacity Estimation
1.2 Exercise: Simple GFA 5.2 Exercise: Service Level Analysis
1.3 Exercise: Multi-Echelon GFA 5.3 Exercise: Risk assessment
• Section 2: Supply Chain Design • Section 6: Inventory Optimization
2.1 Presentation: Supply Chain Design 6.1 Presentation: Inventory Optimization
2.2 Exercise: Beer Distribution 6.2 Exercise: Safety Stock Assessment
6.3 Exercise: Bullwhip Effect Analysis
• Section 3: Master planning
3.1 Presentation: Master Planning • Section 7: Extensions & Inside 4 Walls Logic
3.2 Exercise: Beer Distribution 7.1 Presentation: ALX Extensions
3.3 Exercise: Beer Distribution and Production 7.2 Exercise: Customers loyalty & SC
7.3 Exercise: Transportation cost calculator
• Challenge 1
• Challenge 2
• Practice 1
• Practice 2
• Questions & Answers
• Questions & Answers
© The AnyLogic Company | www.anylogic.com 118
anyLogistix Training
• Introduction to anyLogistix • Section 4: Dynamic Simulation
4.1 Presentation: What is Dynamic Simulation
• ALX Development Environment 4.2 Exercise: Simple Simulation Model
• Section 1: Facilities Location • Section 5: Supply Chain Analysis
1.1 Presentation: GFA 5.1 Exercise: Capacity Estimation
1.2 Exercise: Simple GFA 5.2 Exercise: Service Level Analysis
1.3 Exercise: Multi-Echelon GFA 5.3 Exercise: Risk assessment
• Section 2: Supply Chain Design • Section 6: Inventory Optimization
2.1 Presentation: Supply Chain Design 6.1 Presentation: Inventory Optimization
2.2 Exercise: Beer Distribution 6.2 Exercise: Safety Stock Assessment
6.3 Exercise: Bullwhip Effect Analysis
• Section 3: Master planning
3.1 Presentation: Master Planning • Section 7: Extensions & Inside 4 Walls Logic
3.2 Exercise: Beer Distribution 7.1 Presentation: ALX Extensions
3.3 Exercise: Beer Distribution and Production 7.2 Exercise: Customers loyalty & SC
7.3 Exercise: Transportation cost calculator
• Challenge 1
• Challenge 2
• Practice 1
• Practice 2
• Questions & Answers
• Questions & Answers
© The AnyLogic Company | www.anylogic.com 119
Practice 1: Problem Definition
• Description:
̶ You are going to start selling new tablet PC in Europe
̶ You are going to start sales in 100 biggest cities in Germany, France,
Austria, Netherlands, Belgium, Switzerland and Italy
̶ Your addressable market is 15% of the population
̶ You do not have any existing supply chain in Europe
̶ Expected lead from regional warehouse should be 2 days
• Goal:
̶ Find the number of distribution centers
̶ Find exact locations for the distribution centers
̶ Production schedule by quarter
© The AnyLogic Company | www.anylogic.com 120
Practice 1: Problem Definition
• Description:
̶ We have suppliers and we have predefined proportion for each
supplier: 40% of products supplied from Supplier 1 and 60% from
Supplier 2
̶ Factories can not produce the product in QII and QIV
̶ There is a storage cost for the facility
• Goal:
̶ What will be the flows between the facilities
̶ When how much factory should produce
© The AnyLogic Company | www.anylogic.com 121
anyLogistix Training
• Introduction to anyLogistix • Section 4: Dynamic Simulation
4.1 Presentation: What is Dynamic Simulation
• ALX Development Environment 4.2 Exercise: Simple Simulation Model
• Section 1: Facilities Location • Section 5: Supply Chain Analysis
1.1 Presentation: GFA 5.1 Exercise: Capacity Estimation
1.2 Exercise: Simple GFA 5.2 Exercise: Service Level Analysis
1.3 Exercise: Multi-Echelon GFA 5.3 Exercise: Risk assessment
• Section 2: Supply Chain Design • Section 6: Inventory Optimization
2.1 Presentation: Supply Chain Design 6.1 Presentation: Inventory Optimization
2.2 Exercise: Beer Distribution 6.2 Exercise: Safety Stock Assessment
6.3 Exercise: Bullwhip Effect Analysis
• Section 3: Master planning
3.1 Presentation: Master Planning • Section 7: Extensions & Inside 4 Walls Logic
3.2 Exercise: Beer Distribution 7.1 Presentation: ALX Extensions
3.3 Exercise: Beer Distribution and Production 7.2 Exercise: Customers loyalty & SC
7.3 Exercise: Transportation cost calculator
• Challenge 1
• Challenge 2
• Practice 1
• Practice 2
• Questions & Answers
• Questions & Answers
© The AnyLogic Company | www.anylogic.com 122
Introduction to Dynamic
Simulation of Supply
Chains
© The AnyLogic Company | www.anylogic.com 123
What is Simulation Modeling
• Simulation model is described as a set of LOGIC RULES:
If factory has the orders If supplier workers
Customer place Initial inventory is 1000. for 3000 units it are on strike it will
orders for 300 units If inventory is below 1000 starts production not process the orders
every day 4 days a week it orders batch
of 3000 untis If raw materials stock drops
to 100m3 order 300m3
• Simulation is the process of execution the LOGIC RULES in time
order for order for order for order for Stock < 1000 Starts Stock < 100m3 Strike, do not
300 units 300 units 300 units 300 units order 3000 production order 300m3 process the order
Modeling
Day 1 Day 2 Day 3 Day 4 Day 5 Day 6 Day 7 Day 8 time
• Output of simulation is the behavior of a system in time
© The AnyLogic Company | www.anylogic.com 124
Analytical vs. Simulation Models
• Modeling:
̶ Analytical modeling requires to do simplifications and aggregation to
be able to describe supply chain with a set of equations
̶ Simulation modeling may describe the supply chain as it is by defining
the rules of how supply chain operates
• Output:
̶ To build analytical model you should know what value(s) you want to
calculate and the model will work only for this value(s)
̶ In simulation model you describe the logic of how supply chain works
and may collect any statistics
• Optimization:
̶ In case of analytical optimization, optimizer is the part of the model
thus it may solve large-scale problem
̶ Simulation-based optimization, optimizer is external module which
measure output generated by the model and change input parameters
© The AnyLogic Company | www.anylogic.com 125
When to Use Simulation Modeling
“Simulation is especially useful, when the underlying system is
assumed to be too complex to be examined by mathematical-
analytical methods. Such complexity arises due to time-dependent,
random, and interacting effects within the system”
–“Towards Supply Chain Risk Analytics: Fundamentals, Simulation, Optimization”, IrisHeckmann, 2016.
Observation of Time Dynamic Interactions
Ability to observe how your Incorporate and gain visibility into dynamic
supply chain will perform over time interactions between supply chain elements
Real World Variability Actual Behavior
Integrate randomness into various Determine and gain insight into the
supply chain inputs and processes real behavior of your supply chain
© The AnyLogic Company | www.anylogic.com 126
Examples of Problems to Address with Simulation
• What should be a safety stock in multi-echelon supply chain?
• Which inventory policy will work better for the supply chain?
• What are the bottlenecks?
• What service level you will be able to provide to the customers and
what is associated cost?
• How reliable is the supply chain design?
• How does new manufacturing process will change my supply chain?
• What if you introduce new transportation policy?
• What is the activity-based budget?
© The AnyLogic Company | www.anylogic.com 127
anyLogistix Simulation Modeling Capabilities
Warehouses Suppliers
Factory
Customers
AnyLogic
Distribution Centers
© The AnyLogic Company | www.anylogic.com 128
Customers
• Generate orders and receive shipments
shipments
Supply
Chain
orders
• Customers behavior is defined with table “Demand” and “Products”
• Customer-related statistics include a number of characteristics e.g. service level,
waiting time, number of received orders, number of delayed orders
© The AnyLogic Company | www.anylogic.com 129
anyLogistix Simulation Modeling Capabilities
Warehouses Suppliers
Factory
Customers
AnyLogic
Distribution Centers
© The AnyLogic Company | www.anylogic.com 130
Warehouse and Distribution Centers
• Receives the orders, send the shipments, generate upstream orders
and receive shipments
shipments shipments
Supply
Chain
orders orders
• Warehouse parameters are defined with table “DC and Factories”
• Collected statistics include inventory levels, costs, inbound
shipment, outbound shipments, incoming orders, outcoming
orders, gates, utilization etc.
© The AnyLogic Company | www.anylogic.com 131
anyLogistix Simulation Modeling Capabilities
Warehouses Suppliers
Factory
Inventory Policies
Sourcing Policies
Customers
Inventory Policies
Sourcing Policies Inventory Policies
Sourcing Policies
AnyLogic
Distribution Centers
© The AnyLogic Company | www.anylogic.com 132
Inventory and Sourcing Policies
Distribution center/Warehouse/Factory
Reordering point Inventory policy defines
when and how many
products to order.
Use “Inventory” table
The quantity to order to specify inventory
policies.
Sourcing policy defines
where to order.
Where to order
Use “Sourcing” table
to specify sourcing
policies.
© The AnyLogic Company | www.anylogic.com 133
anyLogistix Simulation Modeling Capabilities
Warehouses Suppliers
Factory
Inventory Policies
Sourcing Policies
Customers
Inventory Policies
Sourcing Policies Inventory Policies
Sourcing Policies
AnyLogic
Distribution Centers
© The AnyLogic Company | www.anylogic.com 134
Factory (1)
Factory suppliers Factory Next SC level
Bill of Materials
BOM
Finished goods
warehouse
Production policies Table: Inventory
Table: BOM
Table: Production
Raw materials warehouse
Table: Inventory
Table: Sourcing
© The AnyLogic Company | www.anylogic.com 135
Factory (2)
• ALX assumes there is a production line for each product
• Each line may use the same raw materials
• Production orders are created based on the Inventory policies for finished
goods warehouse.
̶ They are not directly dependent on the orders the factory receives!
Production: Product 1 Product 1
Production: Product 2 Product 2
. .
. .
Production: Product N Product N
Raw materials Finished goods
warehouse warehouse
© The AnyLogic Company | www.anylogic.com 136
Factory (3)
• Factory produces and ships finished goods, receives orders and raw
materials shipments, orders raw materials
shipments shipments shipments
Supply
orders Chain
orders orders
• Factory behavior is defined with tables:
̶ “DC and Factories”
̶ “Production”
̶ “BOM”
• Collected statistics include production cost, produced items,
inventory levels, production utilization, dropped orders, backlog etc.
© The AnyLogic Company | www.anylogic.com 137
anyLogistix Simulation Modeling Capabilities
Warehouses Suppliers
Factory
Inventory Policies
Sourcing Policies
Customers
Inventory Policies
Sourcing Policies Inventory Policies
Sourcing Policies
AnyLogic
Distribution Centers
© The AnyLogic Company | www.anylogic.com 138
External Supplier
• Receives the orders and send shipments
shipments shipments shipments
orders orders orders
• We can not control suppliers sourcing, inventory and transportation
policies
• Suppliers parameters are defined in table “Suppliers”
© The AnyLogic Company | www.anylogic.com 139
anyLogistix Simulation Modeling Capabilities
Warehouses Suppliers
Factory
Transportation
policies Inventory Policies
Sourcing Policies
Transportation
Transportation policies
Customers policies
Inventory Policies
Sourcing Policies Inventory Policies
Sourcing Policies
Transportation AnyLogic
policies
Distribution Centers
© The AnyLogic Company | www.anylogic.com 140
Transportation Policies
• Are used to define how transportation is organized
• Standard policies allows to define:
̶ Own fleet – table “Fleet size”
̶ Types of vehicles – table “Vehicle Types”
̶ Paths and costs – table “Paths”
̶ Path selection rules – table “Path Selection”
• ALX collects statistics on fleet utilization, transport utilization,
transportation cost and lead time
© The AnyLogic Company | www.anylogic.com 141
Other Tables
• “Demand Forecast” is used to specify MRP policy
• “Events” defines events which may happen in the model
• “Facility Expenses” defines site-related expenses
• “Loading and Unloading Gates” specified number of gates for the facility
• “Milk Runs” is used to introduce milk runs into the model
• “Ordering Rules” defines how to order in the case there are batches in the system
• “Periods” is used to link the model behavior to a particular time periods
• “Processing Cost” defines inbound\outbound processing cost
• “Processing Time” is used to specify time for difference operations
• “Production Batch” is used to define production batches
• “Sale Batch” defines batches and how price depends on the batch size
• “Units” and “Unit Conventions” specify units and how to convert them
© The AnyLogic Company | www.anylogic.com 142
anyLogistix Training
• Introduction to anyLogistix • Section 4: Dynamic Simulation
4.1 Presentation: What is Dynamic Simulation
• ALX Development Environment 4.2 Exercise: Simple Simulation Model
• Section 1: Facilities Location • Section 5: Supply Chain Analysis
1.1 Presentation: GFA 5.1 Exercise: Capacity Estimation
1.2 Exercise: Simple GFA 5.2 Exercise: Service Level Analysis
1.3 Exercise: Multi-Echelon GFA 5.3 Exercise: Risk assessment
• Section 2: Supply Chain Design • Section 6: Inventory Optimization
2.1 Presentation: Supply Chain Design 6.1 Presentation: Inventory Optimization
2.2 Exercise: Beer Distribution 6.2 Exercise: Safety Stock Assessment
6.3 Exercise: Bullwhip Effect Analysis
• Section 3: Master planning
3.1 Presentation: Master Planning • Section 7: Extensions & Inside 4 Walls Logic
3.2 Exercise: Beer Distribution 7.1 Presentation: ALX Extensions
3.3 Exercise: Beer Distribution and Production 7.2 Exercise: Customers loyalty & SC
7.3 Exercise: Transportation cost calculator
• Challenge 1
• Challenge 2
• Practice 1
• Practice 2
• Questions & Answers
• Questions & Answers
© The AnyLogic Company | www.anylogic.com 143
4.2 Exercise: Problem Definition
• Description:
̶ You are going to start producing and sell foam concrete in San Paulo
state in Brazil
̶ Your supply chain includes:
̶ Factory near Tatui city
̶ Distribution center will be located close to San Paulo since your first three customers
are located there
̶ Suppliers:
̶ Sand supplier in Itapetininga
̶ Cement supplier in Piracicaba
̶ Foam agent supplier in Ribeirao Preto
• Goal:
̶ Analyze how to implement this supply chain
© The AnyLogic Company | www.anylogic.com 144
4.2 Exercise: Problem Definition
Autoclave
Foam concrete
Mixing
…
raw
materials
Curing of foam
concrete Cutting
© The AnyLogic Company | www.anylogic.com 145
4.2 Exercise: Action - Step 1
• Create new simulation scenario and name it “SimpleSIM”
2. Name the scenario “SimpleSIM”
1. Click this button to
create new scenario
3. Choose simulation scenario type
4. Click “OK”
© The AnyLogic Company | www.anylogic.com 146
4.2 Exercise: Action - Step 2
• Let’s add units to our project which we will use in the model:
̶ All the financial metrics will be calculated in Brazilian reals (R$)
̶ Sand and cement will be measured in ton
̶ Foam agent will be measured in liters
̶ Production time will be measured in minutes
2. Select “Currency”
1. Choose “Units” 3. Click “Create New”
from the menu
4. Name it “R$”
4. Click “OK”
5. Choose “R$” as
default currency
© The AnyLogic Company | www.anylogic.com 147
4.2 Exercise: Action - Step 3
• Add predefined units for ton, liter and minute
3. Select “Volume” to add “liter”
1. Select “Weight” to add “ton” 4. Select “Time” to add “minute”
2. Click “Add Predefined” to add ton
5. Click “OK”
© The AnyLogic Company | www.anylogic.com 148
4.2 Exercise: Action - Step 4
• Add three customers on the south of San Paulo city and one
distribution center on the north
3. Click DCicon to add distribution center
1. Click this toolbar icon to add customers
5. Click to show the connections
2. Double-click on the map to add the customers 4. Double-click on the map to add DC
5. Select table “DCs and Factories” and
rename distribution center to “DC”
© The AnyLogic Company | www.anylogic.com 149
4.2 Exercise: Action - Step 5
• Select “Products” to define product parameters:
̶ Rename product to “Foam concrete 600”
̶ Set selling price to 164 reals and cost to 0 since it will be calculated
automatically based on production settings
© The AnyLogic Company | www.anylogic.com 150
4.2 Exercise: Action - Step 6
• Let’s define demand for the customers:
̶ Select table “Demand”
̶ Choose “Foam concrete 600” product for all the customers
̶ Change “Period” in demand parameters to 1 day
̶ Change “Quantity” in demand parameters:
̶ For “Customer 1”: 50
̶ For “Customer 2”: 40
̶ For “Customer 3”: 70
© The AnyLogic Company | www.anylogic.com 151
4.2 Exercise: Action - Step 7
• Select table “Path” to define transportation cost:
̶ Change cost per volume per distance to 0.16
̶ Change “Cost Unit” to R$
© The AnyLogic Company | www.anylogic.com 152
4.2 Exercise: Action - Step 8
• Let’s run the model
5. Run simulation
3. Type “Profit” in “Statistics selection” and choose it
1. Select “Simulation
experiment”
2. Right-click on “Dashboard”
and choose “Add item”
4. Click “OK”
© The AnyLogic Company | www.anylogic.com 153
Statistics: Configuration
• Use “Configure statistics” button to choose which statistics will be collected during
simulation run
1. Press this button to select the statistics
to be collected during simulation run
2. You may use filters as you
do with scenario tables
3. Switch on the statics to collect.
You may use left-click or press space key
© The AnyLogic Company | www.anylogic.com 154
Statistics: Dashboard (1)
• Dashboard is used to visualize collected statistics
Right-click on the dashboard to add statistics
item or rearrange already added one
This is the ALX dashboard where you may
analyze statistics during and after a
simulation run. Each dashboard may include
multiples pages.
© The AnyLogic Company | www.anylogic.com 155
Statistics: Dashboard (2)
Press this button to delete
objects from the dashboard
Choose “Rearrange” to enter into
dashboard editing mode
Drag the corner to change To exit the editing mode left-click
the windows size for the statistics Outside of the area or right-click
and choose “Exit editing”
© The AnyLogic Company | www.anylogic.com 156
Statistics: Dashboard (3)
Choose how you want it to
be visualized on the dashboard
Choose the desired Filter statistics by name
statistics
Choose “Add item” to open
the Configure statistics wizard
Preview of how the statistics
will look like at the dashboard
Choose if you want to observe data
per day or accumulated
List of keys that statistics can
be detailed and filtered by
Add filters. For example, you may want Add the level of detail that you
to look at maximum capacity for “Factory” want the statistics to display.
For example you may want to look
at maximum capacity
per supply chain object
© The AnyLogic Company | www.anylogic.com 157
Statistics: Dashboard (4)
• “Detail by”
̶ Shows how you may detail collected statistics
̶ e.g. by supply chain object, product, replication
• “Contains”
̶ Allows you to display the statistics only for selected items
̶ E.g. If you add filter by “Customer 1”, ALX will show you transportation costs for
“Customer 1” only.
• “Show”
̶ Allows you to choose if you want to display statistics for all the items
individually or sum it
© The AnyLogic Company | www.anylogic.com 158
4.2 Exercise: Action - Step 9
• Let’s add factory to the model:
̶ Click on the factory icon in the toolbar and double-click to place the
factory close to Tatui city
̶ Name the site “Factory” in the table “DCs and Factories”
© The AnyLogic Company | www.anylogic.com 159
4.2 Exercise: Action - Step 10
• To define that DC will get product from Factory add the following two records to
table “Sourcing”:
̶ To define that customers get product from DC
̶ Delivery destination: (All customers)
̶ Product: Foam concrete 600
̶ Sources: DC
̶ To define that DC gets product from Factory
̶ Delivery destination: DC
̶ Product: Foam concrete 600
̶ Sources: Factory
• Click “Show sourcing paths” button to look at the connections
© The AnyLogic Company | www.anylogic.com 160
4.2 Exercise: Action - Step 11
• In table “Inventory” we will define inventory policies for DC and Factory:
̶ Change the existing record to define when DC orders the product and which amount
̶ Facility: DC
̶ Product: Foam concrete 600
̶ Policy Type: Min-max policy
̶ Policy Parameters: s = 200, S = 400
̶ Initial stock: 300
̶ Add new record to define inventory policy for Factory
̶ Facility: DC
̶ Product: Foam concrete 600
̶ Policy Type: Unlimited inventory
© The AnyLogic Company | www.anylogic.com 161
4.2 Exercise: Action - Step 12
• Select “Simulation experiment”
̶ Add new page to the dashboard and name it “DC”
̶ Add statistic “Available inventory in product units” to the page “DC”
̶ Visualization type: Line
̶ Show daily statistics
̶ Object: DC
̶ Product: Foam concrete 600
• Run simulation
© The AnyLogic Company | www.anylogic.com 162
4.2 Exercise: Action - Step 13
• Let’s add production to the model:
̶ Add raw materials in table “Products”
̶ Product name: Foam agent, Unit: liter, Selling price:0, Cost: 19.99
̶ Product name: Sand, Unit: ton, Selling price:0, Cost: 19.5
̶ Product name: Cement, Unit: ton, Selling price:0, Cost: 260
̶ Product name: Water, Unit: liter, Selling price:0, Cost: 0.01
̶ Add BOM in table “BOM”
̶ Name: Foam concrete 600
̶ End Product: Foam concrete 600
̶ Quantity: 1
̶ Components:
̶ Foam agent: 0.9
̶ Sand: 0.21
̶ Cement: 0.31
̶ Water: 146
̶ Define production in “Production” table
̶ Product: Foam concrete 600
̶ Parameters: 8.0 minute
̶ BOM: Foam concrete 600
̶ Production cost: 10 reals
© The AnyLogic Company | www.anylogic.com 163
4.2 Exercise: Action - Step 14
• Define inventory policies for finished goods and raw materials
warehouses at Factory:
̶ Change existing inventory policy for Factory finished goods warehouse
to “Min-max policy” with the parameters s = 200, S = 400
̶ Add “Unlimited inventory” policies for Factory raw materials
warehouse
© The AnyLogic Company | www.anylogic.com 164
4.2 Exercise: Action - Step 15
• Let’s define conversions for the units in order to compare “apples
and apples”
̶ Select table “Unit Conversions”
̶ Add conversion rule for “Cement”: 1.1 ton is equal to 1m3
̶ Add conversion rule for “Sand”: 1.5 ton is equal to 1m3
© The AnyLogic Company | www.anylogic.com 165
4.2 Exercise: Action - Step 16
• Select “Simulation experiment”
̶ Create new page on the dashboard and name it “Factory”
̶ Add the following statistics to the page “Factory” on ONE chart
̶ Statistics: Produced products in product units, Available inventory in product units,
Available inventory (integral) in product units
̶ Visualization type: Line
̶ Show daily statistics
̶ Object: Factory
̶ Product: Foam concrete 600
̶ Name the chart “Finished goods”
• Run simulation experiment
̶ What is the difference between “Available inventory” and “Available
inventory (integral)”?
© The AnyLogic Company | www.anylogic.com 166
4.2 Exercise: Action - Step 17
• Let’s add suppliers to the model
̶ Add “Foam agent supplier” close to Ribeirao Preto
̶ Add “Cement supplier” close to Piracibaba
̶ Add “Sand supplier” close to Itapetininga
© The AnyLogic Company | www.anylogic.com 167
4.2 Exercise: Action - Step 18
• Define from which supplier Factory will get raw materials
̶ Select table “Sourcing”
̶ Add three new records which defines where and which raw material
Factory will order
• Look at the connections to verify everything defined correctly
© The AnyLogic Company | www.anylogic.com 168
4.2 Exercise: Action - Step 19
• Change inventory policies for raw materials
̶ “Cement” and “Sand” Factory will “order on demand” since the
suppliers are close and may deliver the raw materials within 3 hours
̶ For “Foam agent” Factory will use “Min-max policy” with s = 200, S =
500
̶ For “Water” Factory has unlimited inventory policy
© The AnyLogic Company | www.anylogic.com 169
4.2 Exercise: Action - Step 20
• Select “Simulation experiment”
̶ Add new chart to the page “Factory”
̶ Name the chart “Raw materials”
̶ Statistics: “Available inventory in product units”
̶ Visualization: Line
̶ Show daily statistics
̶ Object: “Factory”
̶ Product: “Sand”, “Cement”, “Foam agent” PER ITEM
̶ Add P&L to page “Dashboard”
• Run simulation
© The AnyLogic Company | www.anylogic.com 170
Discussion
• Which table(s) will you use to add vehicles to the model?
• Where can you define FTL\LTL policy and load ratio?
• What is the difference between “Available inventory” statistics and
“Available inventory (integral)”?
• How to add batches to the model?
© The AnyLogic Company | www.anylogic.com 171
Summary
• Dynamic simulation allows to capture the behavior of the supply
chain which can not be captures with analytical optimization but on
another hand simulation-based optimization is less scalable than
analytical one
• Dynamic simulation allows you to analyze how your actual supply
chain works/will work. It enables to experiment with the supply
chain in risk-free environment
• Analyzing the dynamic behavior of a supply chain you may and will
find a way to make the supply chain more effective and efficient
© The AnyLogic Company | www.anylogic.com 172
anyLogistix Training
• Introduction to anyLogistix • Section 4: Dynamic Simulation
4.1 Presentation: What is Dynamic Simulation
• ALX Development Environment 4.2 Exercise: Simple Simulation Model
• Section 1: Facilities Location • Section 5: Supply Chain Analysis
1.1 Presentation: GFA 5.1 Exercise: Capacity Estimation
1.2 Exercise: Simple GFA 5.2 Exercise: Service Level Analysis
1.3 Exercise: Multi-Echelon GFA 5.3 Exercise: Risk assessment
• Section 2: Supply Chain Design • Section 6: Inventory Optimization
2.1 Presentation: Supply Chain Design 6.1 Presentation: Inventory Optimization
2.2 Exercise: Beer Distribution 6.2 Exercise: Safety Stock Assessment
6.3 Exercise: Bullwhip Effect Analysis
• Section 3: Master planning
3.1 Presentation: Master Planning • Section 7: Extensions & Inside 4 Walls Logic
3.2 Exercise: Beer Distribution 7.1 Presentation: ALX Extensions
3.3 Exercise: Beer Distribution and Production 7.2 Exercise: Customers loyalty & SC
7.3 Exercise: Transportation cost calculator
• Challenge 1
• Challenge 2
• Practice 1
• Practice 2
• Questions & Answers
• Questions & Answers
© The AnyLogic Company | www.anylogic.com 173
5.1 Exercise: Problem Definition
• Description:
̶ You have supply chain structure build with GFA
̶ Demand is uniformly distributed over a year
̶ You will use your own fleet to deliver the goods
to distribution centers
̶ The Factory produces and sells by batches, the minimum batch size is
10,000 and it can be increased by 1,000
̶ DCs allow to increase or decrease ordered amount to fit the Factory
batches
• Goal:
̶ Estimate the capacity of the factory
̶ Estimate fleet size to deliver toothbrushes from Factory to regional
distributions centers
© The AnyLogic Company | www.anylogic.com 174
5.1 Exercise: Action - Step 1
• To estimate capacity you need to convert GFA experiment result to
Sim scenario:
1. Select GFA scenarios tab
3. Right-click “Result 1” and choose
2. Select scenario “Convert to Sim scenario”
“Simple GFA with Factory”
© The AnyLogic Company | www.anylogic.com 175
5.1 Exercise: Action - Step 2
• Rename created simulation scenario to “MySC”
1. Select “SIM” tab
2. Right-click on created
scenario name to open 4. Rename scenario to “MySC”
context menu
3. Select properties
5. Delete description
6. Click OK
© The AnyLogic Company | www.anylogic.com 176
5.1 Exercise: Action - Step 3
• To calculate revenue you have to define selling price:
̶ Select table “Products”
̶ Set selling price to 2 USD
• Since we want to estimate capacity in m3 we have to define how to
convert pieces of toothbrush into m3
̶ Select “Unit Conversions” table
̶ Add new record
̶ Product: Toothbrush
̶ Amount from: 5,000
̶ Unit from: pcs
̶ Amount to: 1
̶ Unit to: m3
© The AnyLogic Company | www.anylogic.com 177
5.1 Exercise: Action - Step 4
2. Select “Time” section
• Add new time unit
3. Click “Create New”
4. Name the unit “sec”
1. Click menu Settings > Units
7. Click “Create New”
5. Click “OK”
8. Enter the following values:
From: 86400 sec
To: 1 day 6. Click “Conversions”
and click “Create”
9. Click “OK”
© The AnyLogic Company | www.anylogic.com 178
5.1 Exercise: Action - Step 5
• Convert Super site to Factory site:
̶ Select “DCs and Factories” table
̶ Change the type of the Super DC to “Factory“
̶ Change the name to “Factory“
© The AnyLogic Company | www.anylogic.com 179
5.1 Exercise: Action - Step 6
• Since it is not efficient to have 2 sites in the same region move DC in
Chicago to the Factory location
© The AnyLogic Company | www.anylogic.com 180
5.1 Exercise: Action - Step 7
• Let’s define when the factory produces toothbrushes
̶ Select table “Inventory”
̶ Change inventory policy for the Factory
̶ Policy Type: Order on demand
̶ NOTE: Inventory police “Order on demand” tells ALX that DC/Factory does not keep products in
stock. The required number of products is ordered only on receiving an order from a customer,
DC or factory.
̶ Set Initial Stock to 0
© The AnyLogic Company | www.anylogic.com 181
5.1 Exercise: Action - Step 8
• Add production process to the model:
̶ Select “Production” table
̶ Add new record with the following parameters:
̶ Site: Factory
̶ Product: Toothbrush
̶ Production parameters:
̶ Time: 0.2
̶ Time unit: sec
̶ Production cost: 1 USD
© The AnyLogic Company | www.anylogic.com 182
5.1 Exercise: Action - Step 9
• Let’s add production batches to the model:
̶ Select table “Production Batch”
̶ Add new record to the table
̶ Source: Factory
̶ Product: Toothbrush
̶ Type: Starts From
̶ Batch Size: 10,000
̶ Step size: 1,000
̶ Production Cost: 1
̶ Cost Unit: USD
̶ Production Time: 0.2
̶ Time Unit: sec
© The AnyLogic Company | www.anylogic.com 183
5.1 Exercise: Action - Step 10
• Let’s add a sale batch to the model:
̶ Select table “Production Batch”
̶ Add new record to the table
̶ Source: Factory
̶ Product: Toothbrush
̶ Type: Starts From
̶ Batch Size: 10,000
̶ Step size: 1,000
̶ Cost Unit: USD
© The AnyLogic Company | www.anylogic.com 184
5.1 Exercise: Action - Step 11
• We need to define the rules according to which the actual ordered
amount requested by DCs is adjusted to fit the Factory sale batches.
Otherwise orders from sites will be delayed because it is very
unlikely for a site to order the exact amount of 10000, 11000, or
12000 as for instance.
• Let’s add ordering rules
̶ Select table “Ordering Rules”
̶ Add two new records
̶ Source: Factory
̶ Product: Toothbrush
̶ Rule: Can Increase – for one record, Can Decrease – for another
̶ Limit, units: 500
• Ordering rules allow to change the amount requested according to
the inventory policy within the specified limits
© The AnyLogic Company | www.anylogic.com 185
5.1 Exercise: Action - Step 12
• Let’s setup Simulation experiment for the scenario
̶ Select “MySC” scenario
̶ Select “Simulation experiment”
̶ Add statistics to the Dashboard:
̶ Maximum capacity
̶ Chart type “Line”
̶ Object: Factory
© The AnyLogic Company | www.anylogic.com 186
5.1 Exercise: Action - Step 13
• Run the Simulation experiment
• Examine the statistics
̶ What is the maximum capacity you need to have at factory?
̶ How to verify the model works correctly?
© The AnyLogic Company | www.anylogic.com 187
5.1 Exercise: Action - Step 14
• Let’s define trucks which will deliver the products:
̶ Select table “Vehicle Types”
̶ Add new vehicle type
̶ Name: Lorry
̶ Capacity, m3: 5
̶ Speed, km/h: 50.0
• Let’s add fleet of trucks:
̶ Select “Fleet size” table
̶ Add new record
̶ Facility: Factory
̶ Vehicle type: Lorry
̶ Amount: 20
© The AnyLogic Company | www.anylogic.com 188
5.1 Exercise: Action - Step 15
• In anyLogistix you may use groups to simplify modeling process.
Let’s add a group for DCs which were created by GFA. We will use it
on the next step to define new paths:
̶ Select table “Groups”
̶ Add new group and name it “DCs”
̶ Add all DCs except Factory to this group in column “Sites”
© The AnyLogic Company | www.anylogic.com 189
5.1 Exercise: Action - Step 16
• Let’s define that Lorries will be used to deliver the goods from Factory to DCs and
than will have to return to Factory:
̶ Select table “Paths”
̶ Change the existing path in table “Path”
̶ From: Factory
̶ To: DCs
̶ Cost: Distance-based cost
̶ Cost Calculation Parameters: 0,25
̶ Vehicle Type: Lorry
̶ Transportation Policy: FTL
̶ Min Load, ratio: 0.8
̶ Add return path for Lorries
̶ From: DCs
̶ To: Factory
̶ Cost: Distance-based cost
̶ Cost Calculation Parameters: 0,10
̶ Straight: No (real routes)
̶ Vehicle type: Lorry
© The AnyLogic Company | www.anylogic.com 190
5.1 Exercise: Action - Step 17
• Continue previous step:
̶ Add a path to connect DCs and Customers
̶ From: DCs
̶ To: Customers
̶ Cost: Volume&distance based
̶ Cost Calculation Parameters: 0,05
̶ Straight: No (real routes)
© The AnyLogic Company | www.anylogic.com 191
5.1 Exercise: Action - Step 18
• Run the Simulation experiment
• Examine the statistics
̶ Why is the maximum capacity growing?
© The AnyLogic Company | www.anylogic.com 192
5.1 Exercise: Action - Step 19
• Let’s change fleet size to 23 and look at the capacity
• Run the Simulation experiment
̶ Is it the maximum capacity we need to have at factory?
© The AnyLogic Company | www.anylogic.com 193
5.1 Exercise: Action - Step 20
• Let’ find the size of the fleet:
̶ Select table “Fleet size”
̶ Change Amount to “0”
̶ NOTE: “0” tells ALX that fleet is unlimited, this way we may analyze the size of the fleet
• Select “Simulation experiment”
• Add statistics to the Dashboard:
̶ Fleet size utilization
̶ Max number of vehicles used
̶ Chart type “Table”
̶ Object: Factory
• Run the Simulation experiment
© The AnyLogic Company | www.anylogic.com 194
5.1 Exercise: Action - Step 21
• Let’s adjust the scenario based on found values:
̶ Change fleet size to the maximum number of vehicles used
• Run the Simulation experiment and look at the results
© The AnyLogic Company | www.anylogic.com 195
Discussion
• How to estimate the maximum capacity for a facility?
• What to do if you want to estimate capacity in pieces?
• Which parameters may effect capacity?
• If you use only the statistics you used during this exercise will it be
enough to make a decision about required capacity?
© The AnyLogic Company | www.anylogic.com 196
anyLogistix Training
• Introduction to anyLogistix • Section 4: Dynamic Simulation
4.1 Presentation: What is Dynamic Simulation
• ALX Development Environment 4.2 Exercise: Simple Simulation Model
• Section 1: Facilities Location • Section 5: Supply Chain Analysis
1.1 Presentation: GFA 5.1 Exercise: Capacity Estimation
1.2 Exercise: Simple GFA 5.2 Exercise: Service Level Analysis
1.3 Exercise: Multi-Echelon GFA 5.3 Exercise: Risk assessment
• Section 2: Supply Chain Design • Section 6: Inventory Optimization
2.1 Presentation: Supply Chain Design 6.1 Presentation: Inventory Optimization
2.2 Exercise: Beer Distribution 6.2 Exercise: Safety Stock Assessment
6.3 Exercise: Bullwhip Effect Analysis
• Section 3: Master planning
3.1 Presentation: Master Planning • Section 7: Extensions & Inside 4 Walls Logic
3.2 Exercise: Beer Distribution 7.1 Presentation: ALX Extensions
3.3 Exercise: Beer Distribution and Production 7.2 Exercise: Customers loyalty & SC
7.3 Exercise: Transportation cost calculator
• Challenge 1
• Challenge 2
• Practice 1
• Practice 2
• Questions & Answers
• Questions & Answers
© The AnyLogic Company | www.anylogic.com 197
Statistics: Service level
• There are three service level characteristics collected by ALX:
̶ Alpha Service Level – the ratio of demand satisfied from stock on hand,
i.e. immediately when an order is placed, to total demand
̶ Calculated for products and orders
̶ Beta Service Level – the ratio of demand satisfied from stock on hand
measured in money to total demand measured in money
̶ Calculated for products and orders
̶ ELT Service Level – ratio of demand satisfied within “Expected lead
time” (Demand table) to total demand
̶ Takes into account backlog and transportation time to the customer
̶ Calculated for products and orders
̶ Usually makes sense for B2B when service level agreements are concluded
© The AnyLogic Company | www.anylogic.com 198
5.2 Exercise: Problem Definition
• Problem Definition
̶ There is a supply chain with defined behavior and logic
• Goal:
̶ Estimate service level we will be able to provide to our customers
© The AnyLogic Company | www.anylogic.com 199
5.2 Exercise: Action - Step 1
• To calculate ELT service level we have to define when customer is
expecting to receive an order
̶ Select table “Demand”
̶ Change the Expected Lead Time for all customers from 30 to 1 days
© The AnyLogic Company | www.anylogic.com 200
5.2 Exercise: Action - Step 2
• Let’s analyze the Service Level of our supply chain
̶ Select “Simulation experiment”
̶ Add new page to dashboard and name it “Service level”
̶ Add service level metrics to the “Service Level” dashboard page as
table
̶ Alpha service level by products
̶ ELT service level by products
• Run the simulation experiment
̶ What should we do to improve service level?
© The AnyLogic Company | www.anylogic.com 201
Discussion
• What is the difference between:
̶ Service level, by products q-ty
̶ Service level, by orders q-ty
• What will alpha and beta service levels be if we allow back orders?
Will they be the same as “Service Level (ELT)”?
• What can you say about your orders structure if:
̶ Service level, by orders q-ty = 95%
̶ Service level, by products q-ty = 60%
• Let’s assume you supply very expensive goods and your customers
are ready to wait
̶ Which service level metric you would consider in this case?
̶ How could you estimate it with ALX?
© The AnyLogic Company | www.anylogic.com 202
anyLogistix Training
• Introduction to anyLogistix • Section 4: Dynamic Simulation
4.1 Presentation: What is Dynamic Simulation
• ALX Development Environment 4.2 Exercise: Simple Simulation Model
• Section 1: Facilities Location • Section 5: Supply Chain Analysis
1.1 Presentation: GFA 5.1 Exercise: Capacity Estimation
1.2 Exercise: Simple GFA 5.2 Exercise: Service Level Analysis
1.3 Exercise: Multi-Echelon GFA 5.3 Exercise: Risk assessment
• Section 2: Supply Chain Design • Section 6: Inventory Optimization
2.1 Presentation: Supply Chain Design 6.1 Presentation: Inventory Optimization
2.2 Exercise: Beer Distribution 6.2 Exercise: Safety Stock Assessment
6.3 Exercise: Bullwhip Effect Analysis
• Section 3: Master planning
3.1 Presentation: Master Planning • Section 7: Extensions & Inside 4 Walls Logic
3.2 Exercise: Beer Distribution 7.1 Presentation: ALX Extensions
3.3 Exercise: Beer Distribution and Production 7.2 Exercise: Customers loyalty & SC
7.3 Exercise: Transportation cost calculator
• Challenge 1
• Challenge 2
• Practice 1
• Practice 2
• Questions & Answers
• Questions & Answers
© The AnyLogic Company | www.anylogic.com 203
5.3 Exercise: Problem Definition
• Description:
̶ There is a supply chain with defined structure and logic
̶ There is a 75% probability of strike on the Factory in September-October
̶ Independently of when strike starts we have to recover by 15th of
November before Christmas sales period
• Goal:
̶ Estimate how the risk of the strike may effect the revenue
© The AnyLogic Company | www.anylogic.com 204
5.3 Exercise: Action - Step 1
• Let’s add possibility of strike into the model
̶ Create a copy of the scenario MySC and name it “MySC Risk
Assessment”
̶ Add an event to model strike:
̶ Select table “Events”
̶ Add a new event which may disable DC 3 between 01 of September and 31 of October
with probability of 75%
̶ Name: Go on Strike!
̶ Object Type: Site
̶ Object: Factory
̶ Event Type: Change state
̶ Value: No
̶ Occurrence Type: Random
̶ Occurrence Time: 01 September 2017 – 31 October 2017
̶ Probability: 0.75
© The AnyLogic Company | www.anylogic.com 205
5.3 Exercise: Action - Step 2
• Continue previous step: let’s add end of strike into the model
̶ Add an event to model end of strike:
̶ Add new event which will enable DC 3 on 15th of November with probability of 100%
̶ Name: End of Strike!
̶ Object Type: Site
̶ Site: Factory
̶ Value: Yes
̶ Occurrence Type: Date
̶ Occurrence Time: 15th of November 2017
̶ Probability: 1
© The AnyLogic Company | www.anylogic.com 206
5.3 Exercise: Action - Step 3
• Run the Simulation experiment
̶ Check that everything is operating as expected
̶ Examine service level statistics
• The Simulation experiment runs the model only once but if you
need to conduct a number of replications use “Variation
experiment”
̶ Create the Variation experiment
̶ Replications: 5
̶ Add “Revenue” statistics to the Dashboard as a Histogram chart detailed by
Replications
• Run the Variation experiment
̶ Analyze the result
© The AnyLogic Company | www.anylogic.com 207
Discussion
• What kind of events can you add to your model?
• How to define the following behavior with the Events table?
̶ There is a 30% probability that the demand will be increased by 30% in
June-July
̶ Strike will end after 45 days since its start
© The AnyLogic Company | www.anylogic.com 208
Summary
• ALX supports a set of experiment for supply chain analysis:
̶ Simulation experiment for what-if analysis
̶ Variation experiment is used to vary parameters or run a scenario
several times to collect the statistics
̶ Comparison experiment is used to compare different scenarios
• ALX collects a number of different statistics which can be used to
analyze capacity, service levels, costs, utilization, performance,
inventory, production, fleet size etc.
• Risk is always associated with randomness and time thus simulation
modeling is the perfect tool to do risk analysis
© The AnyLogic Company | www.anylogic.com 209
anyLogistix Training
• Introduction to anyLogistix • Section 4: Dynamic Simulation
4.1 Presentation: What is Dynamic Simulation
• ALX Development Environment 4.2 Exercise: Simple Simulation Model
• Section 1: Facilities Location • Section 5: Supply Chain Analysis
1.1 Presentation: GFA 5.1 Exercise: Capacity Estimation
1.2 Exercise: Simple GFA 5.2 Exercise: Service Level Analysis
1.3 Exercise: Multi-Echelon GFA 5.3 Exercise: Risk assessment
• Section 2: Supply Chain Design • Section 6: Inventory Optimization
2.1 Presentation: Supply Chain Design 6.1 Presentation: Inventory Optimization
2.2 Exercise: Beer Distribution 6.2 Exercise: Safety Stock Assessment
6.3 Exercise: Bullwhip Effect Analysis
• Section 3: Master planning
3.1 Presentation: Master Planning • Section 7: Extensions & Inside 4 Walls Logic
3.2 Exercise: Beer Distribution 7.1 Presentation: ALX Extensions
3.3 Exercise: Beer Distribution and Production 7.2 Exercise: Customers loyalty & SC
7.3 Exercise: Transportation cost calculator
• Challenge 1
• Challenge 2
• Practice 1
• Practice 2
• Questions & Answers
• Questions & Answers
© The AnyLogic Company | www.anylogic.com 210
Presentation:
Multi-echelon Inventory Optimization
© The AnyLogic Company | www.anylogic.com 211
Multi-echelon Inventory Management
• Goal:
̶ To deliver the desired end customer service levels at minimum network
inventory, with the inventory divided among the various echelons
• Requirements to true multi-echelon inventory optimization
̶ Avoid multiple independent demand forecast in each echelon
̶ Account for all lead times and lead time variations
̶ Monitor and manage bullwhip effect
̶ Enable visibility up and down the demand chain
̶ Different service levels to different DCs/Customers
̶ Account different replenishment strategies
• To satisfy all the requirement ALX uses simulation modeling to do inventory
optimization
lead time lead time lead time
demand demand demand
© The AnyLogic Company | www.anylogic.com 212
How ALX Does Inventory Optimization
Actual inventory
Quantity behavior
“Reorder up to” Ideal inventory
quantity dynamics
Reorder point
Safety stock to provide 100% service level
Redundant safety stock
Simulation modeling time
© The AnyLogic Company | www.anylogic.com 213
anyLogistix Training
• Introduction to anyLogistix • Section 4: Dynamic Simulation
4.1 Presentation: What is Dynamic Simulation
• ALX Development Environment 4.2 Exercise: Simple Simulation Model
• Section 1: Facilities Location • Section 5: Supply Chain Analysis
1.1 Presentation: GFA 5.1 Exercise: Capacity Estimation
1.2 Exercise: Simple GFA 5.2 Exercise: Service Level Analysis
1.3 Exercise: Multi-Echelon GFA 5.3 Exercise: Risk assessment
• Section 2: Supply Chain Design • Section 6: Inventory Optimization
2.1 Presentation: Supply Chain Design 6.1 Presentation: Inventory Optimization
2.2 Exercise: Beer Distribution 6.2 Exercise: Safety Stock Assessment
6.3 Exercise: Bullwhip Effect Analysis
• Section 3: Master planning
3.1 Presentation: Master Planning • Section 7: Extensions & Inside 4 Walls Logic
3.2 Exercise: Beer Distribution 7.1 Presentation: ALX Extensions
3.3 Exercise: Beer Distribution and Production 7.2 Exercise: Customers loyalty & SC
7.3 Exercise: Transportation cost calculator
• Challenge 1
• Challenge 2
• Practice 1
• Practice 2
• Questions & Answers
• Questions & Answers
© The AnyLogic Company | www.anylogic.com 214
6.2 Exercise: Problem Definition
• Description:
̶ You are producing and selling innovative toothbrush and do want to
provide 98% service level to our customers
̶ There are demand variations which can be about 20%
̶ There are lead time variations since average vehicle speed vary from
40km to 60km
• Goal:
̶ Estimate what should safety stock for each supply chain site
© The AnyLogic Company | www.anylogic.com 215
6.2 Exercise: Action - Step 1
• We will proceed with the scenario MySC with which we worked
during the exercise 5.2
• Remove all demand rows from the scenario
̶ Select all rows using “Ctrl + A”
̶ Remove them using “Delete” key
© The AnyLogic Company | www.anylogic.com 216
6.2 Exercise: Action - Step 2
• Let’s import demand with 20% variation
̶ Press “Ctrl + I” to open import dialog
̶ Select “Demand variations.xlsx” from the training materials
̶ Enable “Advanced options” toggle button
̶ Choose Demand table in “Sheets to Import "
̶ Disable “Create new scenario” toggle button
̶ Choose “MySC” in “Scenario name”
̶ Click “OK”
© The AnyLogic Company | www.anylogic.com 217
6.2 Exercise: Action - Step 3
• Add lead time variations by varying average speed
̶ Navigate to “Vechicle Types” table
̶ Change speed value to Uniform(40, 60)
© The AnyLogic Company | www.anylogic.com 218
6.2 Exercise: Action - Step 4
• Let us see how variation of demand and speed of the vehicle type
affects service level
̶ Run the simulation
̶ Analyze the following statistics:
̶ Alpha service level, by products
̶ Inventory – backlog
© The AnyLogic Company | www.anylogic.com 219
6.2 Exercise: Action - Step 5
• Let’s setup experiment to estimate safety stock
̶ Select “Safety stock estimation” experiment
̶ Define 10 replications
̶ Set “Desired service level” to 98%
• Run the experiment
© The AnyLogic Company | www.anylogic.com 220
6.2 Exercise: Action - Step 6
• Analyze the result
̶ The “Safety stock estimation” tab contains a table with the detailed
experiment results
̶ Each tab named after a site contains a histogram of the corresponding
site’s safety stock values across all replications
© The AnyLogic Company | www.anylogic.com 221
6.2 Exercise: Action - Step 7
• Right click the result of the experiment and select “Convert to SIM
scenario”
• A new scenario “MySC with safety stock 1” will be added to the
scenario list. The differences between the initial and the resulting
scenarios are the following:
̶ Inventory policies are split by sites, products and periods
̶ Each inventory policy that requires safety stock is updated with the
average value of safety stock by replication
̶ Initial stock of each inventory policy is increased by the same value
© The AnyLogic Company | www.anylogic.com 222
6.2 Exercise: Action - Step 8
• Run the simulation of the “MySC with safety stock 1” scenario and
analyze how the service level and the dynamics of inventory have
changed
© The AnyLogic Company | www.anylogic.com 223
Discussion
• What are the advantages and disadvantages of using simulation
modeling to calculate safety stock?
• If your customers do not expect to get a product just after
purchasing does it make sense to calculate safety stock?
• Is there any correspondence between NO Safety Stock and
simulation Safety Stock?
© The AnyLogic Company | www.anylogic.com 224
anyLogistix Training
• Introduction to anyLogistix • Section 4: Dynamic Simulation
4.1 Presentation: What is Dynamic Simulation
• ALX Development Environment 4.2 Exercise: Simple Simulation Model
• Section 1: Facilities Location • Section 5: Supply Chain Analysis
1.1 Presentation: GFA 5.1 Exercise: Capacity Estimation
1.2 Exercise: Simple GFA 5.2 Exercise: Service Level Analysis
1.3 Exercise: Multi-Echelon GFA 5.3 Exercise: Risk assessment
• Section 2: Supply Chain Design • Section 6: Inventory Optimization
2.1 Presentation: Supply Chain Design 6.1 Presentation: Inventory Optimization
2.2 Exercise: Beer Distribution 6.2 Exercise: Safety Stock Assessment
6.3 Exercise: Bullwhip Effect Analysis
• Section 3: Master planning
3.1 Presentation: Master Planning • Section 7: Extensions & Inside 4 Walls Logic
3.2 Exercise: Beer Distribution 7.1 Presentation: ALX Extensions
3.3 Exercise: Beer Distribution and Production 7.2 Exercise: Customers loyalty & SC
7.3 Exercise: Transportation cost calculator
• Challenge 1
• Challenge 2
• Practice 1
• Practice 2
• Questions & Answers
• Questions & Answers
© The AnyLogic Company | www.anylogic.com 225
Statistics: Bullwhip effect
• Bullwhip effect shows demand variability amplification during the supply chain
simulation: from the point of actual (final) order demand to the point of origin (DC,
Factory)
̶ BWE > 1 means that outgoing variability prevails over the incoming
̶ 0 =< BWE < 1 means that incoming variability prevails over the outgoing
̶ BWE = 1 means there is NO bullwhip effect
̶ BWE = -1 means that incoming variability is 0
2 2
𝜎𝑖𝑛 𝜎𝑜𝑢𝑡 2
𝜎𝑜𝑢𝑡ൗ𝜇
𝜇𝑖𝑛 𝜇𝑜𝑢𝑡
Variance In
DC
Variance Out 𝐵𝑊𝐸 = 2 𝑜𝑢𝑡
𝜎𝑖𝑛ൗ
𝜇𝑖𝑛
• Bullwhip effect is calculated per product per site
© The AnyLogic Company | www.anylogic.com 226
Exercise 6.3: Problem Definition
• Description:
̶ There is a supply chain network structure with defined inventory,
sourcing and transportation policies
• Goal:
̶ Analyze if there is a possibility of bullwhip effect in the system
© The AnyLogic Company | www.anylogic.com 227
6.3 Exercise: Action - Step 1
• Let’s add BWE statistics to the model:
̶ Select “Simulation experiment” for “MySC” scenario
̶ Add new tab to dashboard and name it “BWE”
̶ Add statistics “Products bullwhip effect”
̶ Detail it by DC
̶ Choose “Line” visualization type
• Run the experiment
̶ Look at bullwhip effect dynamics
© The AnyLogic Company | www.anylogic.com 228
Discussion
• What is the meaning of BWE?
• What does it mean if BWE = 1?
• What does it mean if BWE = -1
• Does it make sense to measure BWE for a number of products?
• Which inventory policies would you use to guarantee BWE = 1?
BWE < 1?
© The AnyLogic Company | www.anylogic.com 229
Summary
• Inventory optimization is used to:
̶ Determine safety stock
̶ Test inventory policies, sourcing and transportation policies
̶ Analyze how all the policies work together using statistics (e.g.
bullwhip effect)
• To conduct a Inventory optimization you have to define:
̶ Supply chain structure (can be converted from GFA or NO)
̶ Inventory/sourcing policies (can be created automatically based on
GFA or NO results)
̶ Transportation policies
̶ Production policies
• Simplifications:
̶ It is up to you to decide if simplifications are needed
© The AnyLogic Company | www.anylogic.com 230
anyLogistix Training
• Introduction to anyLogistix • Section 4: Dynamic Simulation
4.1 Presentation: What is Dynamic Simulation
• ALX Development Environment 4.2 Exercise: Simple Simulation Model
• Section 1: Facilities Location • Section 5: Supply Chain Analysis
1.1 Presentation: GFA 5.1 Exercise: Capacity Estimation
1.2 Exercise: Simple GFA 5.2 Exercise: Service Level Analysis
1.3 Exercise: Multi-Echelon GFA 5.3 Exercise: Risk assessment
• Section 2: Supply Chain Design • Section 6: Inventory Optimization
2.1 Presentation: Supply Chain Design 6.1 Presentation: Inventory Optimization
2.2 Exercise: Beer Distribution 6.2 Exercise: Safety Stock Assessment
6.3 Exercise: Bullwhip Effect Analysis
• Section 3: Master planning
3.1 Presentation: Master Planning • Section 7: Extensions & Inside 4 Walls Logic
3.2 Exercise: Beer Distribution 7.1 Presentation: ALX Extensions
3.3 Exercise: Beer Distribution and Production 7.2 Exercise: Customers loyalty & SC
7.3 Exercise: Transportation cost calculator
• Challenge 1
• Challenge 2
• Practice 1
• Practice 2
• Questions & Answers
• Questions & Answers
© The AnyLogic Company | www.anylogic.com 231
7.1 Presentation:
ALX Extension
© The AnyLogic Company | www.anylogic.com 232
ALX Extension
anyLogistix
Policies e.g.:
Sourcing, Inventory, Policies e.g.: Policies e.g.:
Transportation … Sourcing, Inventory, Sourcing, Inventory,
Transportation … Transportation …
Customer Warehouse Distribution Center Production site Supplier
Customer
(Agent in AnyLogic) (Agent in AnyLogic)
Warehouse Distribution
(Agent Center
in AnyLogic) Production
(Agent site
in AnyLogic) (AgentSupplier
in AnyLogic)
(AgentCustomer
in AnyLogic) Warehouse
(Agent in AnyLogic) Distribution
(Agent Center
in AnyLogic) Production
(Agent site
in AnyLogic) (AgentSupplier
in AnyLogic)
(AnyLogic Agent) (AnyLogic Agent) (AnyLogic Agent) (AnyLogic Agent) (Agent in AnyLogic)
Policies e.g.:
Policies e.g.:
Sourcing, Inventory,
Sourcing, Inventory,
Transportation …
Transportation …
Policies e.g:
Sourcing, Inventory,
Transportation …
Each object in anyLogistix is an
Production site AnyLogic agent designed to be able
Production
(Agent site
in AnyLogic)
Production
(Agent site
in AnyLogic) to connect with other object that
(AnyLogic Agent) can be modified with AnyLogic
© The AnyLogic Company | www.anylogic.com 233
ALX Extension: Data Model
• ALX scenarios represent the Supply Chain structure:
̶ Facility types
̶ Connections
̶ Behavior
̶ Parameters
• ALX experiments contain:
̶ The type of experiment
̶ Specific experiment parameters
̶ Set of outputs or results
© The AnyLogic Company | www.anylogic.com 234
ALX Extension: How it works
• Experiment reads scenario data and creates a model (analytical or
simulation)
• Experiment runs and generates results: new scenarios and/or
statistics
• Results are passed back to ALX
Scenario Data
© The AnyLogic Company | www.anylogic.com 235
ALX Extension: How it works
• Run AnyLogic
• Extend a template describing behavior of a network object
• AnyLogic model should implement certain API:
̶ Initialize parameters
̶ Inventory status
̶ Process incoming orders
̶ Process incoming shipments
̶ Additional parameters
̶ Etc.
• Export as a library (C:\Users\User\.anyLogistix\Extensions\extension.jar)
• Restart anyLogistix
© The AnyLogic Company | www.anylogic.com 236
ALX Extension: How it works
• Custom objects extend ALX data structure
Extended objects
appear in ALX
Additional parameters
© The AnyLogic Company | www.anylogic.com 237
ALX Extension: What Can be Extended
• DCs
• Factories
• Customers
• Sourcing, Inventory, Transportation policies
• Extended decision making logic
̶ Shipment times
̶ Grouping of shipments
̶ Source selection logic
̶ Route selection logic
̶ Etc.
• Custom Experiments
© The AnyLogic Company | www.anylogic.com 238
ALX Extension: Custom Experiments
• Your own Supply Chain model based on ALX scenario data
• Additional data sources (external DB, files, internet)
• Data pre/post processing
• External solvers (CPLEX, Gurobi, FICO etc.)
• Your own optimization algorithms
• Heuristics
• Custom statistics
• Results: New ALX scenarios (like GFA and NetOpt)
© The AnyLogic Company | www.anylogic.com 239
anyLogistix Training
• Introduction to anyLogistix • Section 4: Dynamic Simulation
4.1 Presentation: What is Dynamic Simulation
• ALX Development Environment 4.2 Exercise: Simple Simulation Model
• Section 1: Facilities Location • Section 5: Supply Chain Analysis
1.1 Presentation: GFA 5.1 Exercise: Capacity Estimation
1.2 Exercise: Simple GFA 5.2 Exercise: Service Level Analysis
1.3 Exercise: Multi-Echelon GFA 5.3 Exercise: Risk assessment
• Section 2: Supply Chain Design • Section 6: Inventory Optimization
2.1 Presentation: Supply Chain Design 6.1 Presentation: Inventory Optimization
2.2 Exercise: Beer Distribution 6.2 Exercise: Safety Stock Assessment
6.3 Exercise: Bullwhip Effect Analysis
• Section 3: Master planning
3.1 Presentation: Master Planning • Section 7: Extensions & Inside 4 Walls Logic
3.2 Exercise: Beer Distribution 7.1 Presentation: ALX Extensions
3.3 Exercise: Beer Distribution and Production 7.2 Exercise: Customers loyalty & SC
7.3 Exercise: Transportation cost calculator
• Challenge 1
• Challenge 2
• Practice 1
• Practice 2
• Questions & Answers
• Questions & Answers
© The AnyLogic Company | www.anylogic.com 240
Problem Definition
• Description:
̶ We will introduce notion of loyalty for our customers
• Goal:
̶ Analyze how supply chain metrics depends on customers behavior
© The AnyLogic Company | www.anylogic.com 241
7.2 Exercise: Description
• Stage 1: Customer will collect no statistics and have very simple
behavior:
̶ Generate one order for two items of some product once a week
̶ Process arrived shipment
• Stage 2: Addition of Loyalty attribute to customer
̶ Loyalty can range from 0 to 1
̶ According to its loyalty Customer will drop some orders independently
(as if he/she has decided to send an order to another company)
• Stage 3: Further additions…
̶ Customer will generate orders according to ALX Demand table
̶ Customer will reconsider their loyalty every 10 days
̶ We will add statistics to provide an overview of the results
© The AnyLogic Company | www.anylogic.com 242
7.2 Exercise: Action - Step 1
1. Run AnyLogic through the Extensions menu in anyLogistix
© The AnyLogic Company | www.anylogic.com 243
7.2 Customers loyalty & SC : Stage 1
1. Open Customer_Template agent
2. Add a source for orders
Source will generate an agent according to the specified rate
We need to set the new agent type to be Order
Also we need to specify a product, quantity and destination for each
order
3. Add order initialization
For this step we will take random product for our orders
4. Add a sourcing object from the library
Source for each order will be selected automatically according to the
sourcing policies in the Sourcing object
© The AnyLogic Company | www.anylogic.com 244
7.2 Exercise: Action - Step 2
2. Click on Palette tab to switch to Palette view
1. Double-click here to open Customer_Template agent
© The AnyLogic Company | www.anylogic.com 245
7.2 Exercise: Action - Step 3
2. Change name to orderSource
3. Set Arrival rate to:
one per week 4. Change New agent:
new Order()
1. Drag Source onto the diagram
5. Change Agent type:
Order
© The AnyLogic Company | www.anylogic.com 246
7.2 Exercise: Action - Step 4
1. Drop Function from Agent Palette
2. Change name to prepareOrder
3. Add an argument with name order and type Order
4. Fill order with data with Product, Quantity and Destination and notify ALX about new order:
order.setProduct(ALX.getDemandedProducts(this).get(0));
order.setQuantity(2);
order.setDestination(this);
ALX.statistics().orderStatusUpdate(order, OrderStatus.Created);
© The AnyLogic Company | www.anylogic.com 247
7.2 Exercise: Action - Step 5
1. Add function call into On at exit field of a source object:
prepareOrder(agent);
© The AnyLogic Company | www.anylogic.com 248
7.2 Exercise: Action - Step 6
1. Add Sourcing from ALX library
Connect with orderSource and outgoingOrder
© The AnyLogic Company | www.anylogic.com 249
7.2 Exercise: Action - Step 7
1. Right-click on library object ALX_tempates
3. Select location for the file in your Extensions folder:
C:\Users\<User>\Extensions\ALX_templates.jar
2. Select Export Library...
4. Finish the export
© The AnyLogic Company | www.anylogic.com 250
7.2 Exercise: Action - Step 8
1. Restart anyLogistix
2. Set your type for customer(s) in any scenario
(if you don't have any scenarios yet, try an example)
© The AnyLogic Company | www.anylogic.com 251
Customers loyalty & SC : Stage 2
• Add a loyalty variable
̶ Numerical representation of customer loyalty (0 to 1)
• Add select output, based on loyalty
̶ Less loyal customers will send their orders to other companies
• Add a sink for dropped orders
̶ Each agent should be properly destroyed in AnyLogic models
© The AnyLogic Company | www.anylogic.com 252
7.2 Exercise: Action - Step 9
1.Add loyalty variable with initial value set to 0.8
2. Add SelectOutput from Process Modeling Library
3. Set SelectOutput probability equal to loyalty
4. Add Sink from Process Modeling Library
5. Notify ALX about dropped order:
ALX.statistics().orderStatusUpdate(agent, OrderStatus.Dropped);
6. Change Agent type:
Order
© The AnyLogic Company | www.anylogic.com 253
Customers loyalty & SC : Stage 3
• Add an updateLoyalty event
̶ The loyalty of a customer will change randomly every ten days
• Change source to Demand object from library
̶ With demand object as a source for orders our Customer will generate
orders according to input tables in ALX
• Add order statistics
̶ To analyze customers’ behavior and our network’s performance, we
need to know the number of orders that our customers sent to our
company and how many of them were lost
© The AnyLogic Company | www.anylogic.com 254
7.2 Exercise: Action - Step 10
1. Add Event from Agent palette 2. Set Name to updateLoyalty
3. Set Mode to Cyclic
4. Set First occurrence time to 10 days
5. Set Recurrence time to 10 days
6. Set Action:
loyalty = uniform(0.5, 1);
© The AnyLogic Company | www.anylogic.com 255
7.2 Exercise: Action - Step 11
1. Replace Source with Demand from ALX palette
2. In onAtExit field:
prepareOrder(order);
2. In prepareOrder function body remove first two strings, leave only:
order.setDestination(this);
ALX.statistics().orderStatusUpdate(order, OrderStatus.Created);
© The AnyLogic Company | www.anylogic.com 256
Discussion
• What kind of custom behavior you think will be useful for:
̶ For Customer
̶ For DC
̶ For Factory
• Can we built in ALX huge and very detailed model of a DC? What are
limitations?
© The AnyLogic Company | www.anylogic.com 257
anyLogistix Training
• Introduction to anyLogistix • Section 4: Dynamic Simulation
4.1 Presentation: What is Dynamic Simulation
• ALX Development Environment 4.2 Exercise: Simple Simulation Model
• Section 1: Facilities Location • Section 5: Supply Chain Analysis
1.1 Presentation: GFA 5.1 Exercise: Capacity Estimation
1.2 Exercise: Simple GFA 5.2 Exercise: Service Level Analysis
1.3 Exercise: Multi-Echelon GFA 5.3 Exercise: Risk assessment
• Section 2: Supply Chain Design • Section 6: Inventory Optimization
2.1 Presentation: Supply Chain Design 6.1 Presentation: Inventory Optimization
2.2 Exercise: Beer Distribution 6.2 Exercise: Safety Stock Assessment
6.3 Exercise: Bullwhip Effect Analysis
• Section 3: Master planning
3.1 Presentation: Master Planning • Section 7: Extensions & Inside 4 Walls Logic
3.2 Exercise: Beer Distribution 7.1 Presentation: ALX Extensions
3.3 Exercise: Beer Distribution and Production 7.2 Exercise: Customers loyalty & SC
7.3 Exercise: Transportation cost calculator
• Challenge 1
• Challenge 2
• Practice 1
• Practice 2
• Questions & Answers
• Questions & Answers
© The AnyLogic Company | www.anylogic.com 258
Problem Definition
• Description:
̶ Logistics operator provides three grades of discount for transportation
based on shipped volume
• Goal:
̶ Create custom Transportation Cost Calculator, which allows us to
consider volume discounts
̶ Analyze an impact of transportation discount
© The AnyLogic Company | www.anylogic.com 259
7.3 Exercise: Description
• Stage 1: Create custom Transportation Cost Calculator:
̶ Extend default TransportationCostCalculatorVolumeDistance – add
weight breaks for 10%, 5% and 3% discounts
• Stage 2: Create a scenario with Transportation Cost Calculator with
discount:
̶ Create a copy of scenario from previous exercise and add replace
default Calculator with new one
• Stage 3: Compare two scenarios:
̶ Run a Comparison Experiment for original and modified scenarios
© The AnyLogic Company | www.anylogic.com 260
Transportation cost calculator: Stage 1
• We will extend default Transportation Cost Calculator, based on distance
and volume
• TransportationCostCalculatorVolumeDistance has two fields:
̶ Amount unit – product amount unit (m³, kg, pcs)
̶ Cost per unit – cost to transport one Amount unit for one km (or another
distance unit, specified in Path table)
• For a specific shipment it calculates total amount of product (in units
specified in Amount unit) and than multiplies this amount by Cost per unit
and delivery distance:
public double cost(IShipment shipment, double distance, VehicleType
vehicleType) {
return getTotalVolume(shipment)*distance*costPerUnit;
}
• When we extending a java-class, we can access super-class methods by
usage of “super” call:
super.cost(shipment, distance, vehicleType)
© The AnyLogic Company | www.anylogic.com 261
7.3 Exercise: Action - Step 1
• Open TransportationCostCalculatorTemplate java-class in ALXTemplates
model
• Change class definition:
public class TCCTemplate extends
TransportationCostCalculatorVolumeDistance
• Change exampleParameter to be a weight-break for 10% discount:
@Parameter(name = "Discount 10% volume", type =
EditorType.DoubleEditor, defaultNumericValue = 1000)
private double discount10;
• Add two more parameters a weight-breaks for 5% and 3% discount:
@Parameter(name = "Discount 5% volume", type = EditorType.DoubleEditor,
defaultNumericValue = 500)
private double discount5;
@Parameter(name = "Discount 3% volume", type = EditorType.DoubleEditor,
defaultNumericValue = 100)
private double discount3;
© The AnyLogic Company | www.anylogic.com 262
7.3 Exercise: Action - Step 2
• Change cost() method, used in Simulation-based experiments:
@Override
public double cost(IShipment shipment, double distance,
VehicleType vehicleType) {
double volume =getTotalVolume(shipment);
double k = 1;
if(volume > discount10){
k=0.9;
} else if(volume >discount5){
k=0.95;
} else if(volume >discount3){
k = 0.97;
}
return super.cost(shipment, distance, vehicleType)*k;
}
• We will not use this Calculator for Network optimization, so we do not
have to change flowCost() method
© The AnyLogic Company | www.anylogic.com 263
Transportation cost calculator: Stage 2
• Add new Extension to ALX
• Create a scenario with new Calculator
© The AnyLogic Company | www.anylogic.com 264
7.3 Exercise: Action - Step 3
• Export the model with modified Calculator
• Restart ALX
• Create a copy (as sim) of a scenario from previous exercise
̶ Change copy name to be meaningful for you
• Open Paths table in this scenario
• Select TCCTemplate in Cost Calculation column
• Fill parameters:
̶ Cost per unit: 0.05
̶ Amount unit: m³
̶ Discount 10% volume: 10
̶ Discount 5% volume: 5
̶ Discount 3% volume: 2
© The AnyLogic Company | www.anylogic.com 265
Transportation cost calculator: Stage 3
• Comparison Experiment used to run Simulation for several different
scenarios at once:
̶ Allows to get a side-by-side comparison on a single chart
̶ Animation does not show to provide faster execution time
̶ Resulting dataset could be big, so it is better to turn-on collection of
statistics only if we need it to comparison
̶ By default only Total cost is enabled
© The AnyLogic Company | www.anylogic.com 266
7.3 Exercise: Action - Step 4
• Select Comparison experiment for created copy
• Configure statistics
̶ Turn-on collection of Transportation cost
• Select scenarios to compare:
̶ Original scenario
̶ Modified copy
• Run the experiment
• Compare transportation costs for those scenarios
• Add table for Transportation Cost with all details to analyze the
impact of a discount for different objects
© The AnyLogic Company | www.anylogic.com 267
Discussion
• Which Source-Destination pair gets more value out of discount?
• If our third-party carrier provides different tariffs with different cost
per unit and different discount grades, can we use ALX to find better
one?
• How can we modify our Transportation Cost Calculator to be able to
specify discount amount as well as weight-breaks?
© The AnyLogic Company | www.anylogic.com 268
Summary
• All anyLogistix objects can be extended with AnyLogic:
̶ Site (Suppliers, Factories, DС)
̶ Customer
̶ Sourcing and Inventory policies
̶ Transportation policies
̶ Production policies
̶ Routing policies
̶ …
• Animation developed in AnyLogic can also be integrated with
anyLogistix
• Developing extensions with requires knowledge of AnyLogic
• anyLogistix provides a specific library and a set of templates to
simplify the process of creating extensions
© The AnyLogic Company | www.anylogic.com 269
anyLogistix Training
• Introduction to anyLogistix • Section 4: Dynamic Simulation
4.1 Presentation: What is Dynamic Simulation
• ALX Development Environment 4.2 Exercise: Simple Simulation Model
• Section 1: Facilities Location • Section 5: Supply Chain Analysis
1.1 Presentation: GFA 5.1 Exercise: Capacity Estimation
1.2 Exercise: Simple GFA 5.2 Exercise: Service Level Analysis
1.3 Exercise: Multi-Echelon GFA 5.3 Exercise: Risk assessment
• Section 2: Supply Chain Design • Section 6: Inventory Optimization
2.1 Presentation: Supply Chain Design 6.1 Presentation: Inventory Optimization
2.2 Exercise: Beer Distribution 6.2 Exercise: Safety Stock Assessment
6.3 Exercise: Bullwhip Effect Analysis
• Section 3: Master planning
3.1 Presentation: Master Planning • Section 7: Extensions & Inside 4 Walls Logic
3.2 Exercise: Beer Distribution 7.1 Presentation: ALX Extensions
3.3 Exercise: Beer Distribution and Production 7.2 Exercise: Customers loyalty & SC
7.3 Exercise: Transportation cost calculator
• Challenge 1
• Challenge 2
• Practice 1
• Practice 2
• Questions & Answers
• Questions & Answers
© The AnyLogic Company | www.anylogic.com 270
anyLogistix Training
• Introduction to anyLogistix • Section 4: Dynamic Simulation
4.1 Presentation: What is Dynamic Simulation
• ALX Development Environment 4.2 Exercise: Simple Simulation Model
• Section 1: Facilities Location • Section 5: Supply Chain Analysis
1.1 Presentation: GFA 5.1 Exercise: Capacity Estimation
1.2 Exercise: Simple GFA 5.2 Exercise: Service Level Analysis
1.3 Exercise: Multi-Echelon GFA 5.3 Exercise: Risk assessment
• Section 2: Supply Chain Design • Section 6: Inventory Optimization
2.1 Presentation: Supply Chain Design 6.1 Presentation: Inventory Optimization
2.2 Exercise: Beer Distribution 6.2 Exercise: Safety Stock Assessment
6.3 Exercise: Bullwhip Effect Analysis
• Section 3: Master planning
3.1 Presentation: Master Planning • Section 7: Extensions & Inside 4 Walls Logic
3.2 Exercise: Beer Distribution 7.1 Presentation: ALX Extensions
3.3 Exercise: Beer Distribution and Production 7.2 Exercise: Customers loyalty & SC
7.3 Exercise: Transportation cost calculator
• Challenge 1
• Challenge 2
• Practice 1
• Practice 2
• Questions & Answers
• Questions & Answers
© The AnyLogic Company | www.anylogic.com 271
Practice 2: Problem Definition
• Description
̶ Your network in China consists of 5 warehouses and 200 retail stores in
40 largest cities
̶ Stores order 1000 mobile phones every 5 days
̶ Warehouses use trucks for delivery paying by distance
̶ Capacity of a truck is 30 m3 and one m3 contains 1200 mobile phones
• Goal:
̶ Make a decision on truck Min Load maintaining balance of Lead Time
and Transportation Cost
© The AnyLogic Company | www.anylogic.com 272
Thank you!
www.anylogistix.com
© The AnyLogic Company | www.anylogic.com