SimulationwithArena,3rded.Chapter10–ArenaIntegrationandCustomizationSlide1of54ArenaIntegrationandCustomizationChapter10LastrevisionJuly14,2003SimulationwithArena,3rded.Chapter10–ArenaIntegrationandCustomizationSlide2of54WhatWe’llDo...•ReadingandWritingDataFiles(ReadWrite)•ActiveX™andVisualBasic®forApplications(VBA)•CreatingModuleswithArenaProfessionalEditionSimulationwithArena,3rded.Chapter10–ArenaIntegrationandCustomizationSlide3of54ReadingandWritingDataFiles•Readingentityarrivalsfromatextfile•ReadingandwritingMicrosoftAccessandExcelfiles•AdvancedreadingandwritingSimulationwithArena,3rded.Chapter10–ArenaIntegrationandCustomizationSlide4of54ReadingEntityArrivalsFromaTextFile•Whydata-drivensimulations?ModelvalidationEvaluatinghowaparticularscenarioishandledModelingaspecificarrivalpatternAssumeshistoricaldataexistandcanbetransformedforuseinsimulationSimulationwithArena,3rded.Chapter10–ArenaIntegrationandCustomizationSlide5of54SimpleCallCenterModel•Singlecallstream•Singleagentresource•RandomcallprocessingtimeSimulationwithArena,3rded.Chapter10–ArenaIntegrationandCustomizationSlide6of54ExternalCallCenterData•Historicalcallarrivaltimes•Model10-02Input.txtASCIIfile(e.g.,Notepad,savedastextfromExcel)Absolutesimulationarrivaltimes1.0384572.3741204.7494439.89966110.52589717.098860SimulationwithArena,3rded.Chapter10–ArenaIntegrationandCustomizationSlide7of54ModelLogictoReadData•Can’tusesimpletimebetweenarrivals•ControlentityCreateonlyoneDuplicatetosendactual“call”entityintomodelControlEntityActual“Call”EntitySimulationwithArena,3rded.Chapter10–ArenaIntegrationandCustomizationSlide8of54ModelLogictoReadData(cont’d.)•ReadWritemodule(AdvancedProcess)ArenaFileName:description(actualdiskfilenameisspecifiedinFilemodule)Assignments:modelvariables/attributestobeassignedbasedondatareadfromfile(CallStartTimeattribute)•Delay/DuplicateLogicFilecontains“absolute”times;DelaymoduleholdsentityforatimeintervalDelaycontrolentityforintervaluntilactualarrivaltimeofcall(CallStartTime-TNOW)Createaduplicate(Separatemodule)todispatchactualcallintomodel.Originalentityloopsbacktoreadnexttime.SimulationwithArena,3rded.Chapter10–ArenaIntegrationandCustomizationSlide9of54ModelLogictoReadData(cont’d.)•Filedatamodule(AdvancedProcess)Name:NamereferencedinotherArenamodules.AccessType:Sequentialindicatestoreadinorder.OperatingSystemFileName:Thenameusedbyfilesystem.Mayberelativeorfullyqualified.EndofFileAction:Whattodowhenallrecordsareread.SimulationwithArena,3rded.Chapter10–ArenaIntegrationandCustomizationSlide10of54RunTermination•RunSetupoptionsMaximumreplications/simulationendtimealwaysterminatesthesimulationrun.•SystememptiesIfnoentitiesoncalendarandnoothertime-basedcontrols,runmayterminateearlierthansetupoptionsdictate.Thecontrolentityisdisposedafteritreadsthelastdatavalue.SimulationwithArena,3rded.Chapter10–ArenaIntegrationandCustomizationSlide11of54ReadingAccessFiles•SampleAccessdataModel10-03Input.mdbTable:ArrivalTimesSimulationwithArena,3rded.Chapter10–ArenaIntegrationandCustomizationSlide12of54ReadingAccessFiles•Filedatamodule(AdvancedProcess)AccessType:MicrosoftAccess(*.mdb)OperatingSystemFileName:Model10-03Input.mdbRecordsets:ClicktoloadtheRecordsetsEditor•Important:Nevernameanaccessfilethesameasthemodelnameoritwillconflictwiththeautomaticoutputdatabasefile.SimulationwithArena,3rded.Chapter10–ArenaIntegrationandCustomizationSlide13of54ReadingAccessFiles•RecordsetsEditorAssociatesarecordsetnamewithatableTablemustalreadyexistViewallowsyoutoseeasampleoftherealdataSimulationwithArena,3rded.Chapter10–ArenaIntegrationandCustomizationSlide14of54ReadingAccessFiles•ReadWritemodule(AdvancedProcess)RecordsetID:SameasdefinedinRecordsetsEditorSimulationwithArena,3rded.Chapter10–ArenaIntegrationandCustomizationSlide15of54ReadingExcelFiles•Excelisnotarelationaldatabasebuthasmanysimilarities:AnExcelworkbookissimilartoanAccessdatabasefile.TherowsandcolumnsinarectangularnamedrangeinanExcelworksheetaresimilartotherowsandcolumnsofanAccesstable.SimulationwithArena,3rded.Chapter10–ArenaIntegrationandCustomizationSlide16of54ReadingExcelFiles•SampleExceldataModel10-03Input.xlsNamedRange:ArrivalTimesSimulationwithArena,3rded.Chapter10–ArenaIntegrationandCustomizationSlide17of54ReadingExcelFiles•Filedatamodule(AdvancedProcess)AccessType:MicrosoftExcel(*.xls)OperatingSystemFileName:Model10-03Input.xlsRecordsets:ClicktoloadtheRecordsetsEditorSimulationwithArena,3rded.Chapter10–ArenaIntegrationandCustomizationSlide18of54ReadingExcelFiles•RecordsetsEditorAssociatesarecordsetnamewithanamedrangeNamedrangemustalreadyexistViewallowsyoutoseeasampleoftherealdataSimulationwithArena,3rded.Chapter10–ArenaIntegrationandCustomizationSlide19of54WritingAccessandExcelFiles•Thefile:Thetableornamedrangemustalreadyexist.AnExcelnamedrangeshouldbeformattedasnumeric.•ReadWritemodule:Addnewmoduletospecifywhichdatatowrite.SimulationwithArena,3rded.Chapter10–ArenaIntegrationandCustomizationSlide20of54WritingAccessandExcelFiles•ReadWritemodule:UseTyp