Simulation model defining system for generating a simulation program for a simulator simulating a behavior of economy or society regarded as a system of phenomena and events

An issue to be settled by the present invention is to define a simulation model in accordance with the structure of a causal relation easy to be understood by human and to shorten greatly a simulation program development period. A simulation program is automatically generated by extracting, as nodes, specific items such as phenomenon, events and targets of constituent elements of economy, society or the like regarded as a system, coupling the nodes with arcs to define the structure of the causal relation, and defining a variable necessary for calculating metrics and a calculation formula therefor, relative to a simulation model inheriting the defined structure.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a model defining method for defining a model for simulating a behavior of economy, society or the like regarded as a system, the model representing a relation between phenomena and events between constituent elements of the system, as a causal relation.

2. Description of the Related Art

In order to speed up decision making such as what price is to be set to a new product and whether or not a business system is incorporated, it is important to estimate the effects quickly through simulation. For example, when a price of a new product is to be determined, it is desired to estimate how the number of orders changes with the price set to the new product and influences the final sales. In modeling the phenomenon propagating and changing chains of causal relation such as price, the number of orders, and sales, it is desired to model the structure of causal relation itself.

As a conventional method of simulating the behavior such as social phenomena by using the structure of causal relation, system dynamics are known which have been developed by Forrester at MIT.

DYNAMO is known as a simulation language of system dynamics. A simulation program is configured by using a rate variable representative of a flow rate of articles per unit time and a level variable representative of an accumulation amount of flow rates, and setting an equation to these variables. The causal relation can be expressed by regarding the causal relation as a relation between the rate variable and level variable.

In modeling simulation, the equation has been set conventionally while the structure of causal relation easy to be understood by human is translated into a conventional simulation language. It takes therefore a time to develop a simulation program. Since the simulation program has poor readability, reuse and modification thereof are difficult.

SUMMARY OF THE INVENTION

In order to settle the above-described issue of the present invention, there is provided a simulation model defining system a simulation model defining system for automatically generating a simulation program for simulating a behavior of economy or society regarded as a system, a relation between constituent elements of the system being represented by a causal relation, comprising:

a causal relation diagram defining unit for extracting, as nodes, specific items such as phenomenon, events and targets of the constituent elements, creating a causal relation by coupling the nodes with arcs, and setting metrics quantitatively representing a state amount to each of the nodes, to draw a causal relation diagram;

a node table for storing a node name and drawing coordinates of each of the nodes;

an arc table for storing node information on each of the nodes coupled to each of the arcs;

a simulation model defining unit for adding a variable necessary for calculating the metrics to a simulation base model inheriting a structure of the causal relation of the causal relation diagram, explicitly writing a flow direction of information by extending a link between the metrics and the variable, and setting a calculation formula relative to the metrics and the variable, to define a simulation model;

a variable table for storing information on a variable name, a variable type, a calculation model for identifying a calculation formula to be set, and the calculation formula, for each of the metrics and the variable;

a link table for storing information on the variable connected to each of the link;

a database for storing data of each of the tables and collectively managing the data; and

a simulation program generating unit for automatically generating a simulation program in accordance with the data registered in the database.

According to the present invention, a simulation model can be defined in accordance with the structure of causal relation easy to be understood by human, and a development time of a simulation program can be reduced considerably. Even a novice not having the knowledge of system dynamics can generate a simulation model and simulate various phenomena.

DETAILED DESCRIPTION OF THE EMBODIMENTS

With reference to the accompanying drawings, description will be made on a simulation model defining system according to an embodiment of the present invention. In this embodiment, simulation is performed on how the number of robberies changes if a shop suffering robbery of commodities introduces a commodity tag management system or a shop monitoring system, and description will be made on a sequence of automatically generating a simulation program at a final stage. In this embodiment, although a DYNAMO simulation program is automatically generated, the invention is not necessarily limited to DYNAMO.

First, description will be made on the entire configuration of a simulation model defining system of the present invention.FIG. 1is a block diagram showing an information processing system realizing the simulation model defining system according to an embodiment of the present invention

As shown inFIG. 1, the simulation model defining system1has: a causal relation diagram defining unit11for regarding a shop suffering from robbery of commodities as a system, writing constituent elements of the system as nodes which nodes represent specific items of the concepts such as phenomena, events and targets, creating a causal relation by coupling the nodes with arcs, and setting metrics for quantitatively expressing the state to each node; a simulation model defining unit12for inheriting the structure of the causal relation, adding a variable necessary for calculating the metrics and setting a calculation formula therefor; a simulation program generating unit13for automatically generating a simulation program from the defined simulation model; and a database2for storing execution results of each unit. A simulator4executes the simulation program.

Next, description will be made on the hardware structure of the simulation model defining system1.FIG. 2is a diagram showing the hardware structure of the simulation model defining system1of the embodiment. The simulation model defining system1runs on a server3, i.e., a computer of the simulation model defining system1. The server3of the simulation model defining system1has a CPU31, a memory32, a communication control unit33and an auxiliary storage device20.

Each unit described with reference toFIG. 1is stored in the auxiliary storage device20as programs of the simulation model defining system, and read to the memory32when necessary and processed by CPU31.

Similarly, the database2is stored as a relational database or a file in the auxiliary storage device20, and data is read to the memory32when necessary and used by each program.

Data of the programs of the simulation model defining system required by the server3can be generated by a computer at a client6of the programs of the simulation model defining system, and can be registered in the auxiliary storage device20via a network5. The client6of the simulation model defining system may be structured integrally with the server3of the simulation model defining system, without involving the network5.

FIG. 3is a time sequential diagram illustrating the information transfer between each unit of the simulation model defining system1described with reference toFIG. 1and the database2.FIGS. 4 to 26are diagrams showing input/output data of each unit described with reference toFIG. 3, screens and various algorithms. Description will now be made with reference toFIG. 3andFIGS. 4 to 26.

First, description will be made on the operation sequence to be executed by the causal relation diagram defining unit11and simulation model defining unit12shown at A inFIG. 3, up to a process of registering data necessary for generating the simulation program in the database2.

The causal relation diagram defining unit11has a function of writing the items such as phenomena and events as nodes, generating the causal relation by coupling the nodes with arcs, and writing a causal relation diagram by setting the metrics to each node.FIG. 4is a diagram showing a screen for the causal relation diagram defining unit11. InFIG. 4, a canvas112is an area where the causal relation diagram is defined. In the left side of the screen, a palette111is disposed which has objects, a node1111and an arc1112. The causal relation diagram is drawn by dragging and dropping the objects on the canvas112with a mouse. For example, when a node “reduce robbery by customer” written at A inFIG. 4is drawn, the node object on the palette111is dragged and dropped at the position A. After drag and drop, a node setting screen is displayed.FIG. 5is a diagram showing the node setting screen. The image at A inFIG. 4is drawn by setting “reduce robbery by customer” and “number of robberies” to the items of a node name and a metrics. The operation is repeated to couple the causal relation among nodes1111with arcs1112.

FIG. 6shows an example of a created causal relation diagram. A node1111contacting the head of an arc1112is called an effect node, and a node1111contacting the root of an arc is called a cause node.

As a node is double-clicked with the mouse, a node setting screen is displayed corresponding to the node. It is therefore possible to change the names of a node and a metrics once set.

As a register button115is depressed, data generated up to this point can be stored in the database2.FIG. 7is a diagram showing a registration confirmation screen to be displayed when the register button115is depressed. When a model name is input and an OK button is depressed, the system stores the data generated up to this point in tables shown inFIGS. 8 and 9.

FIG. 8is a diagram showing a node table201for storing node information of a causal relation diagram. The table has fields including model names and node names registered, coordinate values, widths and heights of drawing areas.

FIG. 9is a diagram showing an arc table202for storing arc information coupling nodes. The table has fields including arc ID's for uniquely identifying arcs, cause node names and effect node names. For example, a record having an arc ID “1” corresponds to an arc extending from a node “abandon robbery” to a node “reduce robbery by customer”.

Next, description will be made on the simulation model defining unit12shown inFIG. 3. The simulation model defining unit12has a function of adding a variable necessary for calculating the metrics to the model inheriting the structure of the causal relation diagram drawn by the causal relation diagram defining unit11, and setting a calculation formula relative to the variable and metrics.

FIG. 10is a diagram showing a screen for the simulation model defining unit12. A canvas119is an area where a simulation model is drawn. Drawn in this area as a default are the causal relation between the nodes1111and arcs1112drawn by the causal relation diagram defining unit11, and the items of the metric1113set to the nodes1111. In the left side of the screen, a palette118is disposed for adding variables necessary for calculating the metrics1113. The palette118has a rate variable1182representative of a flow amount of articles, information or the like per unit time, a level variable1181representative of an accumulation amount of flow rates, a constant1183, a variable object of the type like an auxiliary variable1184, and a link object1185representative of a flow direction of information. These objects are dragged and dropped at the canvas119to add variables necessary for calculating the matrix. For example, when a “robbery rate” constant1183at A inFIG. 10is to be added, the constant1183on the palette118is dragged and dropped at the position A. After drag and drop, a calculation model defining screen is displayed.

FIG. 11is a diagram showing the calculation model defining screen. The screen displays items including a variable name, a type of the variable (level variable1181, rate variable1182, constant1183, auxiliary variable1184and metrics1113), a calculation model for determining a calculation method for the variable, the definition contents for setting a specific calculation formula for the variable, and a cause variable list.

The “calculation formula” for the calculation model is used when a calculation formula or a numerical value is set to the variable. The calculation formula and numerical value are set to the item of the definition contents. For example, if the robbery rate is to be set to “1.0”, “robbery rate” is set to the item of the variable name, and “1.0” is set to the item of the definition contents as shown to thereby draw a “robbery rate” constant1183at A inFIG. 10. For example, if the “robbery rate” constant1183is required to calculate the “number of robberies” metrics1113, an arrow link1185is extended from the “robbery rate” to “number of robberies”. A variable contacting the head of the arrow link1185is called an effect variable, and a variable connecting the root is called a cause variable.

InFIG. 10, when the register button115is depressed, information on the defined simulation model is stored in tables shown inFIGS. 12 and 13.

FIG. 12is a diagram showing a variable table203for storing variable information of the simulation model. The table has fields including model names and node names registered, coordinate values, widths and heights of drawing areas, node names, calculation models and definition contents using the variable.

FIG. 13is a diagram showing a link table204for storing information on links coupling variables. The table has fields including model names registered, link ID's for uniquely distinguishing links, cause variable names and effect variable names. For example, data corresponding to a link extending from a “robbery rate” constant1183to a “number of robberies” metrics1113corresponds to a record having a link ID field of “3”.

FIG. 14is a diagram showing an example wherein the simulation model shown inFIG. 10is added with a “number of incoming customers” constant1183, a “accumulated number of robberies” rate variable1181, a “rate 1” rate variable1182and various links1185. By double-clinking an object of each variable, a corresponding calculation model defining screen is displayed.

FIG. 15is a diagram showing the calculation model defining screen using the “number of robberies” metrics1113as an example. Cause variables “robbery suppression rate”, “number of incoming customers” and “robbery rate” having links extended to the metrics are displayed in the item of a cause variable list. In the definition contents item, if all the variables in the cause variable list are not incorporated in the calculation formula, an error occurs. If a variable not contained in the cause variable list is incorporated in the calculation formula, an error occurs also.

Next, with reference toFIG. 16, description will be made on the calculation model for a graph function which is used if the calculation model can be defined as a tendency although it is difficult to define as a calculation formula and numerical value.

FIG. 16is a diagram showing a calculation model defining screen using the “robbery suppression rate” metrics1113as an example. The screen includes a graph area where a graph is drawn by plotting the relation between an input variable x (number of cameras) and an output variable y (robbery suppression rate), and a table for setting coordinate values of plots. Since the cause variable list is displayed in a list of the x-axis, a proper variable is selected from the list to set each y value for each x value. A step width of each x value is set to the step value. A definition range is set by entering numerical values in the items of a lower limit and a higher limit, and a value range is set by entering numerical values in the items of a Y lower limit and a Y higher limit. Description will be made on the format of each y value set for each x value when the values are registered in the database, by using the record at B inFIG. 12. All values set on the screen are registered in the definition contents field. In the registration format, the items including the X-axis variable, definition range lower limit, definition range higher limit, step for the x-axis step width, and Y coordinate values of each plot is delimited by a comma, whereas the Y coordinate values are delimited by a slash. As a line surrounding variables registered as a graph function, a bold line is used to allow also the simulation model defining screen to distinguish whether the calculation model set to each variable is a calculation formula or a graph function.

Level variables1181and rate variables1182may be serially connected in the simulation model defining screen.FIG. 17shows an example of a serial connection. Information on the structure of a serial connection is registered as a record having a model name field of “model 2” in the link table204ofFIG. 13. The simulation model defining screen and causal relation diagram defining screen can be freely switched by selecting the fields of “simulation model” and “causal relation diagram” in the definition contents113.

By depressing an open button114, a simulation model registered in the past can be read. As the open button114is depressed, a read screen such as shown inFIG. 18is displayed. A model to be read is selected from a model name list, and an OK button is depressed. The model name list displays a collection of various records in the model name field of the node table201.

Next, description will be made on the simulation program generating unit13shown inFIG. 3. The simulation program generating unit13has a function of automatically generating a simulation program in accordance with the data registered in the database2. With reference to the flow chart ofFIG. 19, description will be made on the operation sequence of generating the simulation program.

First, after a simulation model name, a simulation period and a time bucket are obtained, these are set as parameters to a program template131, and an equation for setting a simulation period is generated (Steps1and2).FIG. 20is a diagram showing the program template131. For example, the equation is generated in the output field when “30” and “1” are set as the parameters of the simulation period and time bucket.

A record whose model name field is coincident with the simulation model name obtained at Step1is acquired from the variable table203shown inFIG. 12having the fields including the model name, variable name, variable type, calculation model, definition contents and the like (Step3). If the variable field type of the obtained record is the level variable, a record whose cause variable name is coincident with the subject variable name is extracted from the link table204shown inFIG. 13(Steps4and5). Similarly, a record whose effect variable name is coincident with the subject variable name is extracted from the link table204shown inFIG. 13to obtain a corresponding cause variable name (Step6). The cause variable name, effect variable name, definition contents and subject variable name are set as parameters to a program template132, to additionally write the level equation to the simulation program40.FIG. 21is a diagram showing the program template132. This program template is a template for the simulation program constituted of an equation for setting an initial variable (first row) and a level equation for calculating the value of a next simulation time step (second row). When the level equation is generated by using this template, for example, by setting an initial value “0” to “L1” shown inFIG. 17, the parameter values of the subject variable name, definition contents, cause variable name and effect variable name become “L1”, “0”, “R1” and “R2” as shown in an input column shown inFIG. 21to thereby automatically generate the program such as shown in an output column.

If the variable type is not the level variable at Step4, it is checked whether the value of the calculation model is coincident with the “calculation formula” (Step8). If coincident, the parameters constituted of the subject variable name, definition contents, and variable type of the subject variable are set to a program template133to thereafter additionally write the equation for the calculation formula to the simulation program40(Step9).

FIG. 22is a diagram showing the program template133. This template is a template for converting the calculation formula or numerical value set as the parameter of the definition contents into a simulation program. For example, if the parameters of the subject variable name, definition contents and variable type are “R1”, “3” and “rate variable”, the subject variable name and the definition contents value are set to the program template133. As the parameters of the equation type and suffix, the values of the equation type and suffix in a record having a coincident variable type are acquired from a variable type correspondence table shown inFIG. 23. In this example having the “rate variable” as the variable type, the values of the equation type and suffix are “R” and “.KL”. Thereafter, the simulation program is generated in an output column shown inFIG. 22.

If the calculation model is not coincident with the “calculation formula” at Step8, i.e., if the calculation model is the “graph function”, the values of the definition contents are decoded into the parameters constituted of the “x-axis variable”, “definition range lower limit”, “definition range upper limit”, “step” representative of an x-axis step width, and “each Y coordinated value”, as in the record at B in the variable table203shown inFIG. 12(Step10). These parameters and subject variable name are set to a program template134, and an equation for the graph function is additionally written (Step11).

FIG. 24is the diagram showing the program template134. This program template134is a template for a program for defining the relation between an input x and an output y by directly setting the values x and y if the values x and y are difficult to be expressed by a calculation formula. The relation definition between x and y is realized by using a TABLE function which is a built-in function of DYNAMO. For example, if the parameters are those in an input column ofFIG. 24, a program is generated in an output column.

At the last Step12, if data satisfying the conditions of Step3contains the next record, then the flow returns to a process at Step3, whereas if the next record is not contained, the flow is terminated.

With the above-described operation sequence, a simulation program can be generated automatically.

Next, description will be made on an example of an automatically generated simulation program. It is assumed that a simulation model to be automatically generated has the structure shown inFIG. 14and that the contents set to each variable are registered as a record of the “model 1” in the variable table203shown inFIG. 12and the link table204shown inFIG. 13.FIG. 25shows an example of a corresponding simulation program40.

It is assumed that a simulation model to be automatically generated has the structure shown inFIG. 17and that the contents set to each variable are registered as a record of the “model 2” in the variable table203shown inFIG. 12and the link table204shown inFIG. 13.FIG. 26shows an example of a corresponding simulation program40.

Lastly, as a simulation button117on the simulation model defining screen is depressed, the simulator4executes the simulation program40automatically generated by the simulation program generating unit13shown inFIG. 3, and outputs simulation results.

In this embodiment, as described so far, simulation becomes possible by defining the structure of a causal relation, defining a variable necessary for calculating the metrics and a calculation formula for the variable and metrics, relative to a simulation model inheriting the defined causal relation structure, and automatically generating a simulation program.

Since a simulation model can be defined in accordance with the structure of a causal relation easy to be understood by human, a development period for the simulation program can be shortened greatly. Even a novice not having the knowledge of system dynamics can generate the simulation model and simulate various phenomena.