Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88075

How can I write down all replications result of Arena sim via Excel VBA [closed]

$
0
0

My aim is to run Arena simulation via Excel VBA and get results of simulation to Excel. I wrote some codes.

As you can see, my codes start Arena simulation. And parameter "j" holds the solution of simulation. What I want is that write down all replications result. For example, j1 (result of first replication), j2, j3 ... etc. How can I do that?

Sub Test()

Dim oArenaApp As Arena.Application
Dim oModel As Arena.Model, oSIMAN As Arena.SIMAN
Dim oModule As Arena.Module

Set oArenaApp = CreateObject("Arena.application")
ModName = "D:\Model2.doe"
Set oModel = oArenaApp.Models.Open(ModName)
Set oSIMAN = oModel.SIMAN
oArenaApp.Activate
oArenaApp.Visible = True

oModel.BatchMode = True
oModel.QuietMode = True
oModel.Go (smGoWait)

i = oSIMAN.SymbolNumber("Entity 1")
j = oSIMAN.EntitiesNumberOutOfType(i)

oModel.End
oArenaApp.Visible = False

End Sub

Viewing all articles
Browse latest Browse all 88075

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>