The present invention relates to a method and an architecture to create and run simulations more efficiently. It is particularly, though not exclusively, related to simulating complex enterprises having multiple interactions between and iterations of elements.
Modelling of parts of an enterprise to simulate scenarios is known. Typically, a monolithic model is coded by an experienced programmer. The model may include pre-coded blocks or elements that are replicated in the code. To simulate multiple scenarios, the model is cloned and parameters are configured differently in each model.
One disadvantage of this method is that if one of the pre-coded blocks is changed it is necessary to find all the models into which it has been copied and update them accordingly. Another disadvantage is that the models can generally only be updated or run by an experienced programmer. Furthermore, any programmer except the original programmer is likely to lack a sufficiently deep understanding of how the model was coded to be able to easily amend or add to it.
Another disadvantage of such models is that they are large and unwieldy. This militates against modelling whole enterprises. Furthermore, because the owners of the process being modelled do not directly input into the model, there is a risk of modelling inaccuracies and poor assumptions which decrease the accuracy of the simulations.
The present invention seeks to provide a method of simulation and a simulation architecture that seeks to address the aforementioned problems.
Accordingly the present invention provides a method of simulation comprising: selecting program elements from a library to use in a simulation model; defining a network comprising the program elements and interactions therebetween; defining configuration data for each program element; storing the simulation model comprising the network, the configuration data and a link to each selected program element in the library; dividing the simulation model into portions each comprising at least one program element, wherein the portions are dependent on the number of interactions for each program element; and running each portion on a processing core and collating the results.
Advantageously, the creation of the simulation model is more efficient and the model can be maintained more easily, keeping the model relevant and avoiding significant effort to maintain legacy models. It can also be updated without extensive detailed programming knowledge. Another advantage is that the portions of the model are allocated to the processor cores at run time, based on the interactions between and iterations of program elements so the running of the simulation model is quicker and more computationally efficient.
Each program element may be agent-based, discrete event, system dynamic or a hybrid of these. The simulation may model an enterprise.
The method may further comprise, before the first step: selecting a generic program element from a library; customising attributes of the generic program element; and writing the customised program element to the library.
The step of dividing the simulation model into portions may be dynamically repeated to compensate for changes in the availability and capacity of the processing cores during the running step. Advantageously this may increase efficiency and compensate for availability and capacity problems.
Each portion may be run iteratively. For example, each may be run forty times. Each portion may be run on more than one processor core to obtain the required number of iterations.
The present invention also provides a simulation architecture comprising: a first library containing program elements, each program element comprising customisable attributes and configurable inputs and outputs; a second library containing a simulation model network that defines interactions between program elements and links to selected program elements in the first library; the second library also containing data to configure the inputs and outputs of the selected program elements; a plurality of processing cores to run portions of the simulation model wherein the portions each comprise one or more program elements and the interactions therebetween; and a controller to allocate portions of the simulation model to each of the plurality of processing cores dependent on the number of interactions between program elements.
Advantageously, the simulation architecture enables more efficient creation of the simulation model. It also creates a model that can be maintained more easily, keeping the model relevant and avoiding significant effort to maintain legacy models. The model can also be updated without extensive detailed programming knowledge. Another advantage is that the portions of the model are allocated to the processor cores based on the interactions between and iterations of program elements so the running of the simulation model is quicker and more computationally efficient.
The first library may comprise generic program elements and customised program elements, each customised program element being customised from a generic program element. The first library and the second library may be subsets of one library.
The controller may be arranged to dynamically reallocate portions of the simulation model to each of the plurality of processing cores to compensate for changes in the availability and capacity of the processing cores. Advantageously, this enables dynamic reallocation in the event that a processor core becomes unavailable through reallocation to other tasks or through faults or damage.
The simulation model may comprise an enterprise simulation model.
The present invention will be more fully described by way of example with reference to the accompanying drawings, in which:
The exemplary program element 10 illustrated in
The skilled reader will understand that the flow chart 42 illustrated is a highly simplified example. Typically a program element 10 will encode the ability to receive and process many types of information from multiple sources, to analyse all the information as necessary and to make determinations in response thereto. The communication traffic across some interfaces 14 will be significant, for example where the program element 10 represents a designer who must create a draft drawing, consult with engineers about its feasibility, rework the drawing, consult again (and perhaps iterate these steps), produce a prototype, present to a project manager for approval and support a build process. Alternatively the program element 10 may represent a fleet planner who must establish the future availability of spare engines before deciding on suitable action (such as replace with a spare engine and schedule the engine for overhaul or do a minor repair to keep an engine on-wing when there is no spare available). The fleet planner must consult an engine operator to establish the available budget, a lease engine manager to determine if there are lease engines available, a workshop to establish their resource availability and an inventory manager to see if all parts required are in stock, or can be obtained in time. The interfaces 14 are configurable for the tasks 44 and inputs 48 mapped to them for a particular scenario to be simulated.
Each program element 10 may comprise features that are customisable. These features may be the inputs 48, tasks 44, actions 48 and questions 50 comprising the flow chart 42 or the whole flow chart 42.
A library 32, a subset of which is shown in
The library 32 comprises at least all the program elements 10 required to build the simulation model. Additional program elements 10 can be added to the library 32, for example if there is a need to expand a simulation model or to create a new model with different features or characteristics. Where a generic program element 24 is provided, a user can access the customisation data block 28, input customised data 30 and write the newly customised program element 26 to the library 32. This customised program element 26 is then available for the user to reference in a simulation model or for later use in the same or another model. Similarly, extant program elements 10 in the library 32 may be updated by a user, to improve functionality or efficiency. The improved program element 10 is written to the library 32 to replace the original program element 10. As will become apparent, this means that each simulation model that uses that particular program element 10 will automatically be using the most up-to-date version of it and will benefit from any improvements therein. Similarly, a program element 10 in the library 32 may be copied and extended, for example by adding another interface 14, and then written back to the library 32. The program element 10 may be linked to the program element 10 from which it was derived so that changes to the original program element 10 are updated automatically in the extended program element 10.
An exemplary network 12 is illustrated in
Crucially, the simulation models 34 do not replicate or import the code of each program element 10. Instead, the simulation model 34 comprises a link to the library 32, and to the selected program elements 10 in the library 32, and the configuration data to apply to each program element 10. Thus, the simulation models 34 are smaller than the known monolithic models and are guaranteed to use the current version of each program element 10. To update a program element 10 simply requires a user to update one copy, the library copy, and every simulation model 34 will immediately use the new code.
In an enterprise simulation model 34 this is particularly advantageous because it enables distribution of responsibility for program elements 10 or subsets of program elements 10. Thus, for example, a machine build shop may take responsibility for creating and maintaining a machine build shop program element 10 whereas a design office may take responsibility for creating and maintaining a program element 10 for designing and a program element 10 for validating the finished article against the design.
The present invention also provides efficiency gains in running simulation models 34.
The controller 38 is also arranged to assess the interactions between portions 40. It may be efficient to arrange those portions 40 that have high mutual communication density on adjacent processing cores 36 and those that have little or no communication (low communication density) on distant processing cores 36. Referring back to
The controller 38 then allocates portions 40 of the simulation model 34 to each processing core 36 and allocates how many iterations each is to perform. In the illustrated example, the simulation model 34 is divided into three portions 40 comprising: program elements A and C3, which have multiple interactions therebetween; program element B1; and program element Z6. The first portion is allocated to the first processing core 36 for thirty iterations and to the fourth processing core 36 for the other ten iterations. The second portion 40 is allocated to the second processing core 36 for thirty iterations and to the fourth processing core 36 for the other ten iterations. The third portion 40 is allocated to the third processing core 36 for all forty iterations. The controller 38 can allocate the portions 40 so that the load on the processing cores 36 is approximately equal. Alternatively it can asymmetrically allocate the portions 40 to compensate for differences in availability and capacity, for example where one or more of the processing cores 36 is also used for other tasks allocated by other controllers 38.
Advantageously, the controller 38 can dynamically re-allocate some or all of the portions 40 to some or all of the same or additional processing cores 36 during running of the simulation model 34. This may be required if one of the processing cores 36 becomes unexpectedly unavailable, through failure or reprioritisation. Alternatively, it may be efficient to distribute processing of the portions 40 more widely if one or more additional processing cores 36 become available so that the final result of the simulation model 34 is obtained more quickly.
Advantageously one or more user interfaces can be provided for the modelling architecture. For example, an analyst may use a graphical user interface, or another form of abstracted, high level user interface. A programmer can use a different user interface that allows him/her to access and manipulate the code directly.
Although the program elements 10 of the present invention have been described as agent-based they may alternatively be discrete event, system dynamics or a hybrid of two or more of these types.
Number | Date | Country | Kind |
---|---|---|---|
1200498.2 | Jan 2012 | GB | national |