Generic Allocator - Gel
                    
                    
                    
                    
                    Scheduling an Imaginary Vaccination Center
                    
                    
                    
                    By Mārtiņš Avots 
On 
splitcells.net
                 
                
             
        
        
            Thought Experiment - Modelling A Vaccine Center
            
                - Simplified Model For Understanding
 
                - Conceptional Introduction To Model
 
                - No Intro To Technical Details
 
            
        
        
            Vaccine Center
            
                - We want to ensure, that the center has enough workers
                    during the working hours.
                    During each hour, there have to be enough workers to be present,
                    in order to be able to serve all patients.
                 
                - Each patient has to make
its appointment in advance. 
            
        
        
            Simplified Model
            Solution = Demand + Supply
            
            
                Problems are modeled like markets.
                
                
                For optimal solutions
                
                all concerns need to be considered
                
                (i.e. the tragedy of the commons).
            
        
        
            Simplified Data Model
            Demand + Supply
            
            
                
                    
                        | Time | 
                        Patient | 
                    
                    
                        | 2021.09.14 11:00:00 | 
                        Alice | 
                    
                    
                        | 2021.10.14 11:00:00 | 
                        Alice | 
                    
                    
                        | 2021.09.14 11:00:00 | 
                        Bob | 
                    
                    
                        | 2021.10.14 11:00:00 | 
                        Bob | 
                    
                    
                        | .. | 
                        .. | 
                    
                
                
                    
                        | Doctor | 
                        Checker | 
                        Assistant | 
                    
                    
                        | Carol | 
                        Carlos | 
                        Charlie | 
                    
                    
                        | Chuck | 
                        Craig | 
                        Dan | 
                    
                    
                        | Carol | 
                        Carlos | 
                        Charlie | 
                    
                    
                        | Chuck | 
                        Craig | 
                        Dan | 
                    
                    
                        | .. | 
                        .. | 
                        .. | 
                    
                
             
            = Solution
            
                
                    | Time | 
                    Patient | 
                    Doctor | 
                    Checker | 
                    Assistant | 
                
                
                    | 2021.09.14 11:00:00 | 
                    Alice | 
                    Carol | 
                    Carlos | 
                    Charlie | 
                
                
                    | 2021.09.14 11:00:00 | 
                    Alice | 
                    Chuck | 
                    Craig | 
                    Dan | 
                
                
                    | 2021.09.14 11:00:00 | 
                    Bob | 
                    Carol | 
                    Carlos | 
                    Charlie | 
                
                
                    | 2021.09.14 11:00:00 | 
                    Bob | 
                    Chuck | 
                    Craig | 
                    Dan | 
                
                
                    | .. | 
                    .. | 
                    .. | 
                    .. | 
                    .. | 
                
            
        
        
            Simplified Constraint Model
            
            
                
                    Solution
                    
                        
                            | Time | 
                            Patient | 
                            Doctor | 
                            Checker | 
                            Assistant | 
                        
                        
                            | 2021.09.14 11:00:00 | 
                            Alice | 
                            Carol | 
                            Carlos | 
                            Charlie | 
                        
                        
                            | 2021.10.14 11:00:00 | 
                            Alice | 
                            Chuck | 
                            Craig | 
                            Dan | 
                        
                        
                            | 2021.09.14 11:00:00 | 
                            Bob | 
                            Carol | 
                            Carlos | 
                            Charlie | 
                        
                        
                            | 2021.10.14 11:00:00 | 
                            Bob | 
                            Chuck | 
                            Craig | 
                            Dan | 
                        
                        
                            | .. | 
                            .. | 
                            .. | 
                            .. | 
                            .. | 
                        
                    
                 
                     
                
                
                    Constraint
                    
                        - Process one appointment at a time.
 
                        - People need breaks.
 
                        - Distribute workloads evenly.
 
                        - ...
 
                    
                 
             
        
        
            Query Based Constraints
            
            
            
                
                    Solution
                    
                        
                            | Time | 
                            Patient | 
                            Doctor | 
                            Checker | 
                            Assistant | 
                        
                        
                            | 2021.09.14 11:00:00 | 
                            Alice | 
                            Carol | 
                            Carlos | 
                            Charlie | 
                        
                        
                            | 2021.10.14 11:00:00 | 
                            Alice | 
                            Chuck | 
                            Craig | 
                            Dan | 
                        
                        
                            | 2021.09.14 11:00:00 | 
                            Bob | 
                            Carol | 
                            Carlos | 
                            Charlie | 
                        
                        
                            | 2021.10.14 11:00:00 | 
                            Bob | 
                            Chuck | 
                            Craig | 
                            Dan | 
                        
                        
                            | .. | 
                            .. | 
                            .. | 
                            .. | 
                            .. | 
                        
                    
                 
                
                    Constraint
                    
                        - 
                            For All
                            Doctors
                        
 
                        - 
                            For All
                            Times
                        
 
                        - 
                            Then
                            Only One
                        
 
                    
                 
             
            
            
            
            
            
        
        
            Query Based Constraints
            
            
            
                
                    Solution
                    
                        
                            | Time | 
                            Patient | 
                            Doctor | 
                            Checker | 
                            Assistant | 
                        
                        
                            | 2021.09.14 11:00:00 | 
                            Alice | 
                            Carol | 
                            Carlos | 
                            Charlie | 
                        
                        
                            | 2021.10.14 11:00:00 | 
                            Alice | 
                            Carol | 
                            Carlos | 
                            Charlie | 
                        
                        
                            | 2021.09.14 11:00:00 | 
                            Bob | 
                            Chuck | 
                            Craig | 
                            Dan | 
                        
                        
                            | 2021.10.14 11:00:00 | 
                            Bob | 
                            Chuck | 
                            Craig | 
                            Dan | 
                        
                        
                            | .. | 
                            .. | 
                            .. | 
                            .. | 
                            .. | 
                        
                    
                 
                
                    Constraint
                    
                        - 
                            For All
                            Doctors
                        
 
                        - 
                            For All
                            Times
                        
 
                        - 
                            Then
                            Only One
                        
 
                    
                 
             
            
            
            ⥤ Constraint Based Repair
            
            
        
        
            Gel's Version History
            
                - Attempt first draft during internship in University.
 
                - 
                    Implement school scheduling
                    
                    during master thesis.
                 
                - Experimenting for a more generalized platform.
 
                - Making experimental platform more mature.
 
            
        
        
            
                
                    
                    Hope you learned something!
                    
                    
                    
                    Further Questions?
                    
                    
                    More Info 
On 
splitcells.net