SlideShare a Scribd company logo
1 of 55
Download to read offline
The Uncertain Enterprise: Achieving Adaptation
through Digital Twins and Machine Learning
Tony Clark
Aston University, UK
tony.clark@aston.ac.uk
November 25, 2020
Overview
Enterprise System Project Failures
Digital Twins: New Approach for Design and Control
A Digital Twin Design Method
Research Challenges
Resources
Adaptation Through Digital Twins
First introduced in Grieves, M., Digital Twin:
Manufacturing excellence through virtual factory
replication. White paper (2002).
Working Definition:
An agent-based architecture where
each product item has a correspond-
ing virtual counterpart or agent as-
sociated with it.
Fr¨amling et al, 2003. Product agents for han-
dling information about physical objects.
Survey: Barricelli, B.R., Casiraghi, E. and Fogli, D., 2019. A Survey on Digital
Twin: Definitions, Characteristics, Applications, and Design Implications. IEEE
Access, 7
www.gartner.com/smarterwithgartner/
gartner-top-10-strategic-technology-trends-for-2019/
Adaptation Through Digital Twins
How to Develop Digital Twins for Uncertain Systems
Unlikely to have top-down behaviour.
Bottom-up information is partial.
Need a point-wise approach.
Unlikely to have good quality historical data.
Need to dynamically adapt.
Goals may change over time.
Environment may change over time.
Conceptual Model
Barat, S. Enterprise Digital Twin: An Approach to Construct Digital Twin for
Complex Enterprises. In Advanced Digital Architectures for Model-Driven Adaptive
Enterprises. IGI Global, 2020
Approach
Problem Domain
Platoons: www.acea.be/uploads/publications/Platooning_roadmap.pdf
Case Study
Orders arrive at the hub. Trucks
wait at the hub and are allocated
orders. Trucks may form platoons
before leaving to deliver the or-
der. Orders are required on spe-
cific dates, any earlier and the
product will perish, and later and
the customer is unhappy. Pla-
toons use less fuel than individual
trucks. There is a single route.
Goal Model
Decompose Until Measurable
Categorize Domain
Complete Pro-Forma
Use Goals as the Source
Domain Model: Method
Platoon Domain
Annotate Platoon Domain
Agent Model
Agent Model: Method
Agent Model
Agent Model: Invariant Example
Represent knowledge that never
changes about the domain as OCL
invariants. These will then need to
be encoded in the execution rules of
the machine.
Example: All the trucks are uniquely
allocated to the platoons.
1 context Platoon::trucks():[Truck] = Seq{head | tail}
2
3 context Hub inv: uniqueTrucks
4 platoons→forall(p1 p2 | p1.trucks()→intersection(p2.trucks())→isEmpty)
Agent Model: Behaviour Example
Represent behaviour as OCL pre and
post conditions for message handlers.
These will then need to be encoded
in the execution rules of the machine.
Example: Platoons can optionally
merge.
1 merged(Platoon(_,h,t+[hh]+tt),Platoon(_,h,t),Platoon(_,hh ,tt))
2 merged(Platoon(_,hh ,tt+[h]]+t),Platoon(_,h,t),Platoon(_,hh ,tt))
3
4 context Hub::tick ()
5 pre : true
6 post : platoons→select(p | !p.isMoving)→forall(p |
7 platoons@ pre→select(p | !p.isMoving)→forall(p1 p2 |
8 p = p1 or p = p2 or merged(p,p1 ,p2)))
Note that the specification of tick leaves open the choice of
whether to merge and by how much.
Machine Model
Machine Model: Method
Machine Definition: Representation
Aim: produce an execution function over states. Define the goal
over sequences of states. Agent-model is non-deterministic
(stochastic). Translate the agent-model into a single machine.
Platoon Machine
(t, h, [ph, . . .], [pm, . . .], [o, . . .]) where t is the current time, h is a special location
called the Hub, p is a platoon of the form (˜v, l) being a sequence of trucks and a
current location. ph are the platoons in the hub and pm are the platoons on the
move. A truck v is a pair (f, o) containing fuel usage and the order. An order
is (d, l) containing delivery time and target location. A location is (n, l) with a
name an the next location.
Order: (t,h,˜p+[([( ,⊥)],h)]+˜p ,˜pm,(d,l):˜o) −→(t,h,˜p+[([(0,(d,l))],h)]+˜p ,˜pm,˜o)
Return: (t,h,˜ph,˜pm+[(˜v,h)]+˜pm,˜o) −→(t,h,˜ph+[([v],h) | v∈˜v],˜pm+˜pm,˜o)
Create: (t,h,˜ph+[(˜v,h)]+˜ph+[(˜v ,h)+˜ph,˜pm,˜o) −→(t,h,˜ph+[(˜v+˜v ,h)]+˜ph+˜ph,˜o)
(t,h,˜ph+[(˜v,h)]+˜ph+[(˜v ,h)+˜ph,˜pm,˜o) −→(t,h,˜ph+[(˜v +˜v,h)]+˜ph+˜ph,˜o)
Starting: (t,h,˜ph+˜ph+˜ph,˜pm,˜o) −→(t,h,˜ph+˜ph,˜ph+˜pm,˜o)
Moving: (t,h,˜ph,˜pm,˜o) −→(t+1,h,˜ph,move(t,˜pm),˜o)
move(t, ˜p) changes the location in an order to ⊥ when it arrives, increases the
fuel usage, decreases the order time, and advances the location for each hub.
Non-Deterministic Computation
Goal Definition
The machine allows us to precisely define the goals over sequences
of machine states.
Goal Definition
We now have a precise description of computation: sequences of
machine states. It is possible to define goals. Here is a projection
on on aspect of goals. When delivering to locations, if no platoons
are moving then we are OK:
( , , , [], )
We are also OK when any truck delivers on time:
( , , , [([( , (d, l)], l )], ) such that l = l ⇒ d = 0
This must apply throughout the structure:
( , , , ˜pm, )
( , , , ˜pm, )
( , , , ˜pm + ˜pm, )
( , , , [(˜v, l)], )
( , , , [(˜v , l)], )
( , , , [(˜v + ˜v , l)], )
Adaptation
Non-Determinism: The Enemy of Computation
Non-Determinism: Need to Remove It!
Reinforcement Learning
Non-Determinism: Projection onto Sub-Machines
ESL Agents
How can OO Languages accommodate Reinforcement Learning?
agent [best] name(args)::Agent[S,M,A] extends parent {
...learning parameters...
...local values and operations...
states::[S] = ...
messages::[M] = ...
actions::[A] = ...
init ()::S = ...
terminalState(history::[S])::Bool = ...
reward(history::[S]):: Float = ...
// The non -deterministic state transitions...
pi
m, pi
s when b → {
ai
1 : ei
1
| ai
2 : ei
2
| ...
}
}
http://www.esl-lang.org
A Counter
A Counter in ESL
1 data Move;
2 data Actions = Inc | Dec | Noop;
3
4 agent [-] counter(limit:: I n t )::Agent[ Int ,Move, Actions ] {
5 explorationFactor::Float = 0.9;
6 explorationDecay::Float = 0.9995;
7 states::[ I n t ] = -1.. limit +1;
8 messages::[Move] = [Move];
9 actions::[ Actions ] = [ Inc ,Dec,Noop];
10 init ():: I n t = 0;
11 terminalState ([][ I n t ]::[ I n t ])::Bool = false;
12 terminalState (n:s::[ I n t ])::Bool = n = limit;
13 reward(s:ss::[ I n t ])::Float = length[ I n t ](ss); when s = limit
14 reward(ss::[ I n t ])::Float = 40.0;
15 Move,n when n < 0 → { Inc : n + 1 }
16 Move,n when n > limit → { Dec: n - 1}
17 Move,n when n < limit → { Inc : n + 1 | Noop: n | Dec: n - 1 }
18 Move,n when n = limit → { Noop: n }
19 }
20
21 counter (10);
22 counter (15);
23 counter (20);
Counter Training
Counter Q-Table
Platoons in ESL
1 data Truck(location::Str , deliveryTime:: I n t );
2 data State (others::[[ Truck]], platoon::[Truck ]);
3 data Action = Skip | Merge;
4 data Tick ;
5 agent platoon ()::Agent[ State ,Tick , Action ] {
6 explorationFactor::Float = 0.999;
7 explorationDecay::Float = 0.9995;
8 states::[ State ] = [];
9 messages::[ Tick ] = [];
10 actions::[ Action ] = [ Skip ,Merge];
11 init ()::State = State (availableTrucks ,[]);
12 run(time::Int ,trucks::[Truck],route::[ Str ])::Float =
13 case route {
14 [] → 1.0;
15 n:route → deliverTo(trucks ,n,time) * run(time+1,trucks ,route);
16 }
17 terminalState (ps::[ State ])::Bool =
18 case ps {
19 State ([],_):_ → true;
20 _ → false;
21 }
22 reward(h::[ State ])::Float =
23 case h {
24 [] → 0.0;
25 State (_,trucks):_ → length[Truck ]( trucks) * run(maxTime ,trucks ,route);
26 }
27 Tick , State (ts:tss ,trucks) → {
28 Merge: State (tss ,trucks+ts)
29 | Skip : State (tss ,trucks)
30 }
31 }
Platoon Training data
1 maxTime:: I n t = 17;
2
3 availableTrucks::[[ Truck ]] = [
4 [Truck(’A’ ,20)],
5 [Truck(’A’ ,17)],
6 [Truck(’B’ ,18)],
7 [Truck(’A’,9)],
8 [Truck(’B’ ,10)],
9 [Truck(’A’ ,18)],
10 [Truck(’C’ ,19)],
11 [Truck(’A’ ,16)],
12 [Truck(’B’ ,18)],
13 [Truck(’C’ ,15)],
14 [Truck(’A’,2)],
15 [Truck(’C’ ,19)],
16 [Truck(’A’,2)],
17 [Truck(’B’ ,14)],
18 [Truck(’A’,2)],
19 [Truck(’B’ ,18)],
20 [Truck(’C’ ,19)]
21 ];
22
23 l e t a::Agent[ State ,Tick , Action ] = platoon ();
24 actions::[ Action ] = [ Skip ,Merge];
25 i n {
26 trainAgt[ State ,Tick , Action ](a ,15000 , maxTime ,Tick ,true ,70,’Platoon ’);
27 runAgt[ State ,Tick , Action ](a,maxTime ,Tick , fun (p::State )::Str p+’’);
28 edb ← Show(label , agentTableToDisplay [ State ,Tick , Action ](a,actions , ’#.### ’));
29 }
Platoon Training Results
Deep Reinforcement Learning
Deep Reinforcement Learning: Method
The Uncertain Enterprise: Challenges
Validation: Check you have the right simulation.
Verification: Checking the simulation is right.
Modelling Expertise: agents, machines, levers, goals, rewards,
NN.
Ethical Considerations: trust, values.
Intelligence, collaboration, conflict, game theory.
Efficiency: training, distributed AI and ML.
Explainability, traceability.
Unknown unknowns.
Acknowledgements
Balbir Barn
Middlesex University, UK
Vinay Kulkarni
TCS Research, India
Souvik Barat
TCS Research, India
Sreedhar Reddy
TCS Research, India
Adaptive Enterprise Book
IEEE Software Special Issue
www.computer.org/digital-library/magazines/so/call-for-papers-special-issue-on-digital-twins-2

More Related Content

What's hot

What's hot (20)

Lecture 7 Derivatives
Lecture 7   DerivativesLecture 7   Derivatives
Lecture 7 Derivatives
 
HMPC for Upper Stage Attitude Control
HMPC for Upper Stage Attitude ControlHMPC for Upper Stage Attitude Control
HMPC for Upper Stage Attitude Control
 
Python grass
Python grassPython grass
Python grass
 
A* Algorithm
A* AlgorithmA* Algorithm
A* Algorithm
 
Atomic algorithm and the servers' s use to find the Hamiltonian cycles
Atomic algorithm and the servers' s use to find the Hamiltonian cyclesAtomic algorithm and the servers' s use to find the Hamiltonian cycles
Atomic algorithm and the servers' s use to find the Hamiltonian cycles
 
Fast parallelizable scenario-based stochastic optimization
Fast parallelizable scenario-based stochastic optimizationFast parallelizable scenario-based stochastic optimization
Fast parallelizable scenario-based stochastic optimization
 
Tensorflowで五目並べの思考アルゴリズムを作る
Tensorflowで五目並べの思考アルゴリズムを作るTensorflowで五目並べの思考アルゴリズムを作る
Tensorflowで五目並べの思考アルゴリズムを作る
 
Oracle-based algorithms for high-dimensional polytopes.
Oracle-based algorithms for high-dimensional polytopes.Oracle-based algorithms for high-dimensional polytopes.
Oracle-based algorithms for high-dimensional polytopes.
 
Cyclic code systematic
Cyclic code systematicCyclic code systematic
Cyclic code systematic
 
Lec 3-mcgregor
Lec 3-mcgregorLec 3-mcgregor
Lec 3-mcgregor
 
Fast Identification of Heavy Hitters by Cached and Packed Group Testing
Fast Identification of Heavy Hitters by Cached and Packed Group TestingFast Identification of Heavy Hitters by Cached and Packed Group Testing
Fast Identification of Heavy Hitters by Cached and Packed Group Testing
 
CS 210 Project UML
CS 210 Project UMLCS 210 Project UML
CS 210 Project UML
 
The Ring programming language version 1.3 book - Part 48 of 88
The Ring programming language version 1.3 book - Part 48 of 88The Ring programming language version 1.3 book - Part 48 of 88
The Ring programming language version 1.3 book - Part 48 of 88
 
Jsr310 - Java 8 Date and Time API
Jsr310 - Java 8 Date and Time APIJsr310 - Java 8 Date and Time API
Jsr310 - Java 8 Date and Time API
 
Computer Graphics Lab
Computer Graphics LabComputer Graphics Lab
Computer Graphics Lab
 
1
11
1
 
Memory efficient pytorch
Memory efficient pytorchMemory efficient pytorch
Memory efficient pytorch
 
Pythran: Static compiler for high performance by Mehdi Amini PyData SV 2014
Pythran: Static compiler for high performance by Mehdi Amini PyData SV 2014Pythran: Static compiler for high performance by Mehdi Amini PyData SV 2014
Pythran: Static compiler for high performance by Mehdi Amini PyData SV 2014
 
Amortized complexity
Amortized complexityAmortized complexity
Amortized complexity
 
Gentlest Introduction to Tensorflow - Part 2
Gentlest Introduction to Tensorflow - Part 2Gentlest Introduction to Tensorflow - Part 2
Gentlest Introduction to Tensorflow - Part 2
 

Similar to The Uncertain Enterprise

Templates in C++
Templates in C++Templates in C++
Templates in C++
Tech_MX
 

Similar to The Uncertain Enterprise (20)

Actors for Behavioural Simulation
Actors for Behavioural SimulationActors for Behavioural Simulation
Actors for Behavioural Simulation
 
Gentle Introduction to Functional Programming
Gentle Introduction to Functional ProgrammingGentle Introduction to Functional Programming
Gentle Introduction to Functional Programming
 
Monads - Dublin Scala meetup
Monads - Dublin Scala meetupMonads - Dublin Scala meetup
Monads - Dublin Scala meetup
 
A scrupulous code review - 15 bugs in C++ code
A scrupulous code review - 15 bugs in C++ codeA scrupulous code review - 15 bugs in C++ code
A scrupulous code review - 15 bugs in C++ code
 
Intro to Python (High School) Unit #3
Intro to Python (High School) Unit #3Intro to Python (High School) Unit #3
Intro to Python (High School) Unit #3
 
Python hmm
Python hmmPython hmm
Python hmm
 
Code optimization
Code optimization Code optimization
Code optimization
 
Code optimization
Code optimization Code optimization
Code optimization
 
Operating system labs
Operating system labsOperating system labs
Operating system labs
 
chapter1.ppt
chapter1.pptchapter1.ppt
chapter1.ppt
 
chapter1.ppt
chapter1.pptchapter1.ppt
chapter1.ppt
 
Basic_analysis.ppt
Basic_analysis.pptBasic_analysis.ppt
Basic_analysis.ppt
 
Go vs C++ - CppRussia 2019 Piter BoF
Go vs C++ - CppRussia 2019 Piter BoFGo vs C++ - CppRussia 2019 Piter BoF
Go vs C++ - CppRussia 2019 Piter BoF
 
chapter1.ppt
chapter1.pptchapter1.ppt
chapter1.ppt
 
Declare Your Language: Transformation by Strategic Term Rewriting
Declare Your Language: Transformation by Strategic Term RewritingDeclare Your Language: Transformation by Strategic Term Rewriting
Declare Your Language: Transformation by Strategic Term Rewriting
 
Go ahead, make my day
Go ahead, make my dayGo ahead, make my day
Go ahead, make my day
 
Cloud PARTE: Elastic Complex Event Processing based on Mobile Actors
Cloud PARTE: Elastic Complex Event Processing based on Mobile ActorsCloud PARTE: Elastic Complex Event Processing based on Mobile Actors
Cloud PARTE: Elastic Complex Event Processing based on Mobile Actors
 
Arrays
ArraysArrays
Arrays
 
Building Machine Learning Algorithms on Apache Spark: Scaling Out and Up with...
Building Machine Learning Algorithms on Apache Spark: Scaling Out and Up with...Building Machine Learning Algorithms on Apache Spark: Scaling Out and Up with...
Building Machine Learning Algorithms on Apache Spark: Scaling Out and Up with...
 
Templates in C++
Templates in C++Templates in C++
Templates in C++
 

More from ClarkTony

Context-Aware Content-Centric Collaborative Workflow Management for Mobile De...
Context-Aware Content-Centric Collaborative Workflow Management for Mobile De...Context-Aware Content-Centric Collaborative Workflow Management for Mobile De...
Context-Aware Content-Centric Collaborative Workflow Management for Mobile De...
ClarkTony
 
LEAP A Language for Architecture Design, Simulation and Analysis
LEAP A Language for Architecture Design, Simulation and AnalysisLEAP A Language for Architecture Design, Simulation and Analysis
LEAP A Language for Architecture Design, Simulation and Analysis
ClarkTony
 
A Common Basis for Modelling Service-Oriented and Event-Driven Architecture
A Common Basis for Modelling Service-Oriented and Event-Driven ArchitectureA Common Basis for Modelling Service-Oriented and Event-Driven Architecture
A Common Basis for Modelling Service-Oriented and Event-Driven Architecture
ClarkTony
 
Context Aware Reactive Applications
Context Aware Reactive ApplicationsContext Aware Reactive Applications
Context Aware Reactive Applications
ClarkTony
 
Model Slicing
Model SlicingModel Slicing
Model Slicing
ClarkTony
 
Patterns 200711
Patterns 200711Patterns 200711
Patterns 200711
ClarkTony
 
Kings 120711
Kings 120711Kings 120711
Kings 120711
ClarkTony
 
Iswim for testing
Iswim for testingIswim for testing
Iswim for testing
ClarkTony
 
Iswim for testing
Iswim for testingIswim for testing
Iswim for testing
ClarkTony
 
Kiss at oopsla 09
Kiss at oopsla 09Kiss at oopsla 09
Kiss at oopsla 09
ClarkTony
 
Mcms and ids sig
Mcms and ids sigMcms and ids sig
Mcms and ids sig
ClarkTony
 
Reverse engineering and theory building v3
Reverse engineering and theory building v3Reverse engineering and theory building v3
Reverse engineering and theory building v3
ClarkTony
 
Onward presentation.en
Onward presentation.enOnward presentation.en
Onward presentation.en
ClarkTony
 
Formalizing homogeneous language embeddings
Formalizing homogeneous language embeddingsFormalizing homogeneous language embeddings
Formalizing homogeneous language embeddings
ClarkTony
 
Filmstrip testing
Filmstrip testingFilmstrip testing
Filmstrip testing
ClarkTony
 
Dsm as theory building
Dsm as theory buildingDsm as theory building
Dsm as theory building
ClarkTony
 
Dsl overview
Dsl overviewDsl overview
Dsl overview
ClarkTony
 

More from ClarkTony (20)

Context-Aware Content-Centric Collaborative Workflow Management for Mobile De...
Context-Aware Content-Centric Collaborative Workflow Management for Mobile De...Context-Aware Content-Centric Collaborative Workflow Management for Mobile De...
Context-Aware Content-Centric Collaborative Workflow Management for Mobile De...
 
LEAP A Language for Architecture Design, Simulation and Analysis
LEAP A Language for Architecture Design, Simulation and AnalysisLEAP A Language for Architecture Design, Simulation and Analysis
LEAP A Language for Architecture Design, Simulation and Analysis
 
A Common Basis for Modelling Service-Oriented and Event-Driven Architecture
A Common Basis for Modelling Service-Oriented and Event-Driven ArchitectureA Common Basis for Modelling Service-Oriented and Event-Driven Architecture
A Common Basis for Modelling Service-Oriented and Event-Driven Architecture
 
Context Aware Reactive Applications
Context Aware Reactive ApplicationsContext Aware Reactive Applications
Context Aware Reactive Applications
 
Model Slicing
Model SlicingModel Slicing
Model Slicing
 
Patterns 200711
Patterns 200711Patterns 200711
Patterns 200711
 
Kings 120711
Kings 120711Kings 120711
Kings 120711
 
Iswim for testing
Iswim for testingIswim for testing
Iswim for testing
 
Iswim for testing
Iswim for testingIswim for testing
Iswim for testing
 
Kiss at oopsla 09
Kiss at oopsla 09Kiss at oopsla 09
Kiss at oopsla 09
 
Mcms and ids sig
Mcms and ids sigMcms and ids sig
Mcms and ids sig
 
Ocl 09
Ocl 09Ocl 09
Ocl 09
 
Scam 08
Scam 08Scam 08
Scam 08
 
Reverse engineering and theory building v3
Reverse engineering and theory building v3Reverse engineering and theory building v3
Reverse engineering and theory building v3
 
Onward presentation.en
Onward presentation.enOnward presentation.en
Onward presentation.en
 
Hcse pres
Hcse presHcse pres
Hcse pres
 
Formalizing homogeneous language embeddings
Formalizing homogeneous language embeddingsFormalizing homogeneous language embeddings
Formalizing homogeneous language embeddings
 
Filmstrip testing
Filmstrip testingFilmstrip testing
Filmstrip testing
 
Dsm as theory building
Dsm as theory buildingDsm as theory building
Dsm as theory building
 
Dsl overview
Dsl overviewDsl overview
Dsl overview
 

Recently uploaded

Recently uploaded (20)

WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
WSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAMWSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAM
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
WSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in UgandaWSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in Uganda
 
WSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million PeopleWSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million People
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
 
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
Driving Innovation: Scania's API Revolution with WSO2
Driving Innovation: Scania's API Revolution with WSO2Driving Innovation: Scania's API Revolution with WSO2
Driving Innovation: Scania's API Revolution with WSO2
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
WSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital BusinessesWSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital Businesses
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AI
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
 

The Uncertain Enterprise

  • 1. The Uncertain Enterprise: Achieving Adaptation through Digital Twins and Machine Learning Tony Clark Aston University, UK tony.clark@aston.ac.uk November 25, 2020
  • 2. Overview Enterprise System Project Failures Digital Twins: New Approach for Design and Control A Digital Twin Design Method Research Challenges Resources
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9. Adaptation Through Digital Twins First introduced in Grieves, M., Digital Twin: Manufacturing excellence through virtual factory replication. White paper (2002). Working Definition: An agent-based architecture where each product item has a correspond- ing virtual counterpart or agent as- sociated with it. Fr¨amling et al, 2003. Product agents for han- dling information about physical objects. Survey: Barricelli, B.R., Casiraghi, E. and Fogli, D., 2019. A Survey on Digital Twin: Definitions, Characteristics, Applications, and Design Implications. IEEE Access, 7 www.gartner.com/smarterwithgartner/ gartner-top-10-strategic-technology-trends-for-2019/
  • 11. How to Develop Digital Twins for Uncertain Systems Unlikely to have top-down behaviour. Bottom-up information is partial. Need a point-wise approach. Unlikely to have good quality historical data. Need to dynamically adapt. Goals may change over time. Environment may change over time.
  • 12. Conceptual Model Barat, S. Enterprise Digital Twin: An Approach to Construct Digital Twin for Complex Enterprises. In Advanced Digital Architectures for Model-Driven Adaptive Enterprises. IGI Global, 2020
  • 16. Case Study Orders arrive at the hub. Trucks wait at the hub and are allocated orders. Trucks may form platoons before leaving to deliver the or- der. Orders are required on spe- cific dates, any earlier and the product will perish, and later and the customer is unhappy. Pla- toons use less fuel than individual trucks. There is a single route.
  • 21. Use Goals as the Source
  • 28. Agent Model: Invariant Example Represent knowledge that never changes about the domain as OCL invariants. These will then need to be encoded in the execution rules of the machine. Example: All the trucks are uniquely allocated to the platoons. 1 context Platoon::trucks():[Truck] = Seq{head | tail} 2 3 context Hub inv: uniqueTrucks 4 platoons→forall(p1 p2 | p1.trucks()→intersection(p2.trucks())→isEmpty)
  • 29. Agent Model: Behaviour Example Represent behaviour as OCL pre and post conditions for message handlers. These will then need to be encoded in the execution rules of the machine. Example: Platoons can optionally merge. 1 merged(Platoon(_,h,t+[hh]+tt),Platoon(_,h,t),Platoon(_,hh ,tt)) 2 merged(Platoon(_,hh ,tt+[h]]+t),Platoon(_,h,t),Platoon(_,hh ,tt)) 3 4 context Hub::tick () 5 pre : true 6 post : platoons→select(p | !p.isMoving)→forall(p | 7 platoons@ pre→select(p | !p.isMoving)→forall(p1 p2 | 8 p = p1 or p = p2 or merged(p,p1 ,p2))) Note that the specification of tick leaves open the choice of whether to merge and by how much.
  • 32. Machine Definition: Representation Aim: produce an execution function over states. Define the goal over sequences of states. Agent-model is non-deterministic (stochastic). Translate the agent-model into a single machine.
  • 33. Platoon Machine (t, h, [ph, . . .], [pm, . . .], [o, . . .]) where t is the current time, h is a special location called the Hub, p is a platoon of the form (˜v, l) being a sequence of trucks and a current location. ph are the platoons in the hub and pm are the platoons on the move. A truck v is a pair (f, o) containing fuel usage and the order. An order is (d, l) containing delivery time and target location. A location is (n, l) with a name an the next location. Order: (t,h,˜p+[([( ,⊥)],h)]+˜p ,˜pm,(d,l):˜o) −→(t,h,˜p+[([(0,(d,l))],h)]+˜p ,˜pm,˜o) Return: (t,h,˜ph,˜pm+[(˜v,h)]+˜pm,˜o) −→(t,h,˜ph+[([v],h) | v∈˜v],˜pm+˜pm,˜o) Create: (t,h,˜ph+[(˜v,h)]+˜ph+[(˜v ,h)+˜ph,˜pm,˜o) −→(t,h,˜ph+[(˜v+˜v ,h)]+˜ph+˜ph,˜o) (t,h,˜ph+[(˜v,h)]+˜ph+[(˜v ,h)+˜ph,˜pm,˜o) −→(t,h,˜ph+[(˜v +˜v,h)]+˜ph+˜ph,˜o) Starting: (t,h,˜ph+˜ph+˜ph,˜pm,˜o) −→(t,h,˜ph+˜ph,˜ph+˜pm,˜o) Moving: (t,h,˜ph,˜pm,˜o) −→(t+1,h,˜ph,move(t,˜pm),˜o) move(t, ˜p) changes the location in an order to ⊥ when it arrives, increases the fuel usage, decreases the order time, and advances the location for each hub.
  • 35. Goal Definition The machine allows us to precisely define the goals over sequences of machine states.
  • 36. Goal Definition We now have a precise description of computation: sequences of machine states. It is possible to define goals. Here is a projection on on aspect of goals. When delivering to locations, if no platoons are moving then we are OK: ( , , , [], ) We are also OK when any truck delivers on time: ( , , , [([( , (d, l)], l )], ) such that l = l ⇒ d = 0 This must apply throughout the structure: ( , , , ˜pm, ) ( , , , ˜pm, ) ( , , , ˜pm + ˜pm, ) ( , , , [(˜v, l)], ) ( , , , [(˜v , l)], ) ( , , , [(˜v + ˜v , l)], )
  • 38. Non-Determinism: The Enemy of Computation
  • 42. ESL Agents How can OO Languages accommodate Reinforcement Learning? agent [best] name(args)::Agent[S,M,A] extends parent { ...learning parameters... ...local values and operations... states::[S] = ... messages::[M] = ... actions::[A] = ... init ()::S = ... terminalState(history::[S])::Bool = ... reward(history::[S]):: Float = ... // The non -deterministic state transitions... pi m, pi s when b → { ai 1 : ei 1 | ai 2 : ei 2 | ... } } http://www.esl-lang.org
  • 44. A Counter in ESL 1 data Move; 2 data Actions = Inc | Dec | Noop; 3 4 agent [-] counter(limit:: I n t )::Agent[ Int ,Move, Actions ] { 5 explorationFactor::Float = 0.9; 6 explorationDecay::Float = 0.9995; 7 states::[ I n t ] = -1.. limit +1; 8 messages::[Move] = [Move]; 9 actions::[ Actions ] = [ Inc ,Dec,Noop]; 10 init ():: I n t = 0; 11 terminalState ([][ I n t ]::[ I n t ])::Bool = false; 12 terminalState (n:s::[ I n t ])::Bool = n = limit; 13 reward(s:ss::[ I n t ])::Float = length[ I n t ](ss); when s = limit 14 reward(ss::[ I n t ])::Float = 40.0; 15 Move,n when n < 0 → { Inc : n + 1 } 16 Move,n when n > limit → { Dec: n - 1} 17 Move,n when n < limit → { Inc : n + 1 | Noop: n | Dec: n - 1 } 18 Move,n when n = limit → { Noop: n } 19 } 20 21 counter (10); 22 counter (15); 23 counter (20);
  • 47. Platoons in ESL 1 data Truck(location::Str , deliveryTime:: I n t ); 2 data State (others::[[ Truck]], platoon::[Truck ]); 3 data Action = Skip | Merge; 4 data Tick ; 5 agent platoon ()::Agent[ State ,Tick , Action ] { 6 explorationFactor::Float = 0.999; 7 explorationDecay::Float = 0.9995; 8 states::[ State ] = []; 9 messages::[ Tick ] = []; 10 actions::[ Action ] = [ Skip ,Merge]; 11 init ()::State = State (availableTrucks ,[]); 12 run(time::Int ,trucks::[Truck],route::[ Str ])::Float = 13 case route { 14 [] → 1.0; 15 n:route → deliverTo(trucks ,n,time) * run(time+1,trucks ,route); 16 } 17 terminalState (ps::[ State ])::Bool = 18 case ps { 19 State ([],_):_ → true; 20 _ → false; 21 } 22 reward(h::[ State ])::Float = 23 case h { 24 [] → 0.0; 25 State (_,trucks):_ → length[Truck ]( trucks) * run(maxTime ,trucks ,route); 26 } 27 Tick , State (ts:tss ,trucks) → { 28 Merge: State (tss ,trucks+ts) 29 | Skip : State (tss ,trucks) 30 } 31 }
  • 48. Platoon Training data 1 maxTime:: I n t = 17; 2 3 availableTrucks::[[ Truck ]] = [ 4 [Truck(’A’ ,20)], 5 [Truck(’A’ ,17)], 6 [Truck(’B’ ,18)], 7 [Truck(’A’,9)], 8 [Truck(’B’ ,10)], 9 [Truck(’A’ ,18)], 10 [Truck(’C’ ,19)], 11 [Truck(’A’ ,16)], 12 [Truck(’B’ ,18)], 13 [Truck(’C’ ,15)], 14 [Truck(’A’,2)], 15 [Truck(’C’ ,19)], 16 [Truck(’A’,2)], 17 [Truck(’B’ ,14)], 18 [Truck(’A’,2)], 19 [Truck(’B’ ,18)], 20 [Truck(’C’ ,19)] 21 ]; 22 23 l e t a::Agent[ State ,Tick , Action ] = platoon (); 24 actions::[ Action ] = [ Skip ,Merge]; 25 i n { 26 trainAgt[ State ,Tick , Action ](a ,15000 , maxTime ,Tick ,true ,70,’Platoon ’); 27 runAgt[ State ,Tick , Action ](a,maxTime ,Tick , fun (p::State )::Str p+’’); 28 edb ← Show(label , agentTableToDisplay [ State ,Tick , Action ](a,actions , ’#.### ’)); 29 }
  • 52. The Uncertain Enterprise: Challenges Validation: Check you have the right simulation. Verification: Checking the simulation is right. Modelling Expertise: agents, machines, levers, goals, rewards, NN. Ethical Considerations: trust, values. Intelligence, collaboration, conflict, game theory. Efficiency: training, distributed AI and ML. Explainability, traceability. Unknown unknowns.
  • 53. Acknowledgements Balbir Barn Middlesex University, UK Vinay Kulkarni TCS Research, India Souvik Barat TCS Research, India Sreedhar Reddy TCS Research, India
  • 55. IEEE Software Special Issue www.computer.org/digital-library/magazines/so/call-for-papers-special-issue-on-digital-twins-2