HOW TO RUN DISTRIBUTED SIMULATION DEMO


INSTALLATION

1. Create a directory (c:\temp\son)
2. Into this directory, download ALL the following files: 
    a. Assembly  - It is an Arena model file.
    b. init_assembly.txt  - It is the initialization file for assembly.
    c. Supplier1  - It is a ProModel file.
    d. init_suppliera.txt - it is the initialization file for supplier1.
    e. proSupplier1.dll - it is the DLL for supplier1. 
    f. Supplier2 - It is Arena model file.
    g. init_supplierB.txt - it is the initialization file for supplier2.
    h. Transporter  - It is a ProModel file.
    i.  init_transporter.txt - it is the initialization file for transporter
    j. proTransAdapter.dll - it is the DLL for transporter
3. Open windows explorer and proceed on to the c:\temp\son directory

4. Open Supplier1.mod file using ProModel.
5. When the Supplier1 file is open, use the menu and select, from menu, the options Build>>More Elements>>External Files 
6. In the external file name, change the file name to the current directory of the associated DLL file. Change it so that it is now - c:\temp\son\proSupplier1.dll.
7. Click, using menu, Build>>General Information
8. In the General Information popup window, click 'Initialization Logic' button.
9. Now you would see a WAIT XSUB statement with a path as one of its arguments. Change that path to read "c:\\temp\\son\\init_suppliera.txt". Ensure that you put double slash (\\) instead of single slash.
10. Save the Supplier1 model.

11. Open another instance of ProModel.
12 In this, open the transport.mod whihc you have downloaded.
13. Use the menu and select the options Build>>More Elements>>External Files 
14. In the external files, change the file name to the current directory of the associated DLL file. Change it so that it is now - c:\temp\son\proTransAdapter.dll.
15. Click, using menu, Build>>General Information
16. In the General Information popup window, click 'Initialization Logic' button.
17. Now you would see a WAIT XSUB statement with a path as one of its arguments. Change that path to read "c:\\temp\\son\\init_transporter.txt". Ensure that you put double slash (\\) instead of single slash.
18. Save the transport model

19. Open 2 instances of Arena (using the -multinst command). In one Arena, open the Assembly.doe file from c:\temp\son directory. In another, open the Supplier2.doe file from c:\temp\son directory.
20. The key 'A' has been defined as the hot key for the animation for both the models.

RUNNING THE DEMO

21. You should have now completed the installation. You must have 2 windows of ProModel (Supplier1 and Transporter) and 2 windows of Arena (Assembly and Supplier2)

22. Run the rtiexec.bat file located in that computer.

23. Now first run the Arena model Assembly.doe. Wait till a Message box saying "Assembly has connected" shows up. DO NOT CLICK 'OK ON THAT MESSAGE BOX.

24. Now connect the SupplierB Arena model. Wait till a Message box saying "SupplierB has connected" shows up. DO NOT CLICK 'OK' ON THAT MESSAGE BOX.

25. Run the Promodel Transporter. When you run, there might get an complier warning saying that "WAITs are not valid in the current context. This expression's return value will be ignored." Just click CONTINUE. 
Wait till a Message box saying "Transporter has connected" shows up. DO NOT CLICK 'OK' ON THAT MESSAGE BOX.

26. Run the ProModel Supplier1. When you run, there might get an complier warning saying that "WAITs are not valid in the current context. This expression's return value will be ignored." Just click CONTINUE. 
Wait till a Message box saying "SupplierB has connected" shows up. DO NOT CLICK 'OK' ON THAT MESSAGE BOX.

27. Now you should have 4 models running and a message box in each of these models. Click OK for all the Message Boxes. 

28. The simulation should now run for 1000 minutes. 

NOTE: There is no specific order we need to follow to connect the model. I gave the above order just to make the things clear.

To see all the files, click here.