External Entity Generation

The "Two Models Talking" example is an illustration of external entity generation in SIMPROCESS. This feature allows the user to develop portions of a model and distribute them to separate computers to share the workload without writing any Java code. The user simply has to use the External Schedules in one model and the RemoteCall feature in the other.

In the "Two Models Talking" example, each model is completely independent even though they are running on the same computer. (Note - the user could run them on the different computers by using their RMI addresses). The "TwoModelsWorkingA" model contains process flows for Companies A and B, and the "TwoModelsWorkingB" model maps out another process flow. Company A receives Hardware and Software orders, and a certain percentage requires additional processing (the order contains some accessories available from Company B). The "TwoModelsWorkingB" model decides which orders contain accessories, and pass them to Company B.

The "TwoModelsWorkingA" model has expression scripts in the "Create SW Invoice" and "Create HW Invoice" activities that do RemoteCalls to the "TwoModelsWorkingB" external schedule in the "Receive Orders" activity. These expression scripts define where the entities are sent in the other model by naming its RMI address and model activity name. Therefore, when software and hardware orders enter these activities, an entity is generated in "TwoModelsWorkingB".

The expression script in the "Create SW Invoice" looks like this:

>> mybool:BOOLEAN;
mybool:=RemoteCall("rmi://localhost/",
"SPServer","generateEntity","TwoModelsTalkingB","Receive Orders","External1",
"Software", -1,1);
<<

The "TwoModelsWorkingB" model has an expression script in the "Send Order to Company B" activity that does a RemoteCall back to the "Receive Orders" for Company B. All of the entities that arrive from "TwoModelsWorkingA" are processed, and a portion of them is returned to Company B (approximately 75%).

DEMONSTRATION MODEL

In order to view the demonstration model you must have SIMPROCESS installed on your computer and you must have a license. If you don’t have SIMPROCESS you may download a trial version.

You must save the demo model file by RIGHT CLICKING on the file below and select "Save Target As". Save the file to your computer. After you launch SIMPROCESS select File and Open. Then navigate to where you saved the demo file and select to open it.

Download Two Models (A & B) in Zip Format: (TwoModelsTalking.zip, 126KB)

To run these models, the user must do the following:
1. Run the "startmireg.bat" file: This file starts the Java RMI registry and listens for calls from other applications.
2. Run the "SPServer.bat" file": This file starts a Java program that holds user-defined methods.
3. Start the "TwoModelsWorkingB" model.
4. Start the "TwoModelsWorkingA" model.

NOTE - the models need to be started in this order! The "TwoModelsWorkingA" model acts as a 'master' model and controls the statistics and the simulation clock. The other model simply performs the activities when it is called.

While these models are not extremely complex, they show illustrate how separate models can be hooked together to form an integrated modeling environment across a network.