GPSS - Wikipedia
文章推薦指數: 80 %
General Purpose Simulation System (GPSS) is a discrete time simulation general-purpose programming language, where a simulation clock advances in discrete ... GPSS FromWikipedia,thefreeencyclopedia Jumptonavigation Jumptosearch General-purposeprogramminglanguage Thisarticleisaboutaprogramminglanguage.Forotheruses,seeGPSS(disambiguation). GeneralPurposeSimulationSystem(GPSS)isadiscretetimesimulationgeneral-purposeprogramminglanguage,whereasimulationclockadvancesindiscretesteps.Asystemismodelledastransactionsenterthesystemandarepassedfromoneservice(representedbyblocks)toanother.Itisusedprimarilyasaprocessfloworientedsimulationlanguage;[1]thisisparticularlywell-suitedforproblemssuchasafactory. Contents 1History 1.1JGPSS 2Languagedescription 3Samplecode 4Seealso 5References 6Externallinks History[edit] GPSSwasdevelopedbyIBM'sGeoffreyGordonatthebeginningofthe1960s.HenameditGordon'sProgrammableSimulationSystem.ThenamewaschangedwhenIBMdecidedtoreleaseitasaproduct.[2] The"GeneralPurpose"partofthenewnamewastocreateastandardinwaiting-linesimulations. TheoriginalreleaseswereforIBM's7044&7090mainframes.Subsequently, therewerereleasesforIBM360,[3] Univac1108andCDC.[4] [5] [6] Overtime,otherimplementations,inotherlanguagesandtargetedatdifferentsizesystems,weredeveloped,includingDEC'sVAX,aspecializedAPLversionforlarge-scaleUnivacsystems,[7]andMacintosh,amongothers.[8] JGPSS[edit] JGPSS(JavaGeneralPurposeSimulationSystem)isaJava-basedtoolthatwasdevelopedtoteachtheGPSSsimulationlanguage.[2][9] Languagedescription[edit] GPSSresemblesaLEGOstructurewhereblocksarechosenbythemodellerforspecificfunctionstoimitateaparticularsystem.[10] Thelanguageisneitherprocedural,object-orientedorfunctionalprogramming.Theworldissimulatedwithentitiesmovingthroughthemodel.[11]Theseentities,calledTransactions,areenvisionedasmovingfromBlocktoBlock,whereaBlockisalineofcodeandrepresentsunitactionsthataffectstheTransactionitselforotherentities. Blockscanbefacility-oriented(suchasmachinesinajobshop)ortransaction-oriented(suchpartsofwork-in-process,signalsinelectroniccomponentsordocumentsinabureaucraticprocedure).GPSSautomaticallykeeptrackofstatisticswhichbringsinfixedformattheendofasimulationasstandardreport.GPSSisoneoftheoldestlanguagecandidateoffirstobject-orientedapproachbecausewhiletransactionsaretrulyinstancesofmodelobjects,blocksaremethodsinthemodernconceptofOOP. EntitiescanbebroadlyclassifiedinResources,ComputationalentitiesandStatisticalentities.[11]Resources,likeFacilitiesandStoragesrepresentlimitedcapacityresources.Computationalentities,likeAmpervariables(variables),FunctionsandrandomgeneratorsareusedtorepresentthestateofTransactionsorelementsoftheirenvironment.Statisticalentities,likeQueuesorTables(histograms)collectstatisticalinformationofinterest. Samplecode[edit] Thefollowingexample,takenfromSimulationusingGPSS,[12]isthe"Helloworld!"ofGPSSandwillillustratethemainconcepts. Theaimistosimulateonedayofoperationofabarbershop.Customersarriveinarandomconstantflow,entertheshop,queueifthebarberisbusy,gettheirhaircutonafirst-comefirst-servedbasis,andthenleavetheshop.Wewishtoknowtheaverageandmaximumwaitingline,aswellasthenumberofcustomers. SIMULATE ;Definemodel * *Modelsegment1 * GENERATE18,6 ;Customerarriveevery18±6mn QUEUEChairs ;Entertheline SEIZEJoe ;Capturethebarber DEPARTChairs ;Leavetheline ADVANCE16,4 ;Getahaircutin16±4mn RELEASEJoe ;Freethebarber TERMINATE ;Leavetheshop * *Modelsegment2 * GENERATE480 ;Timerarrivesattime=480mn TERMINATE1 ;Shutofftherun * *Controlcards * START1 ;Startonerun END ;Endmodel The"program"iscomprisedbetweentheSIMULATEandENDstatements,andisdividedinto"modelsegments"and"controlcards". Thefirstsegmentmodelscustomers.TheGENERATEblockcreatesaflowofTransactionsandschedulesthemtoenterthemodelwithaninter-arrivaltimeuniformlydistributedovertherange18±6.Itistheprogrammer'sresponsibilitytointerpretthesetransactionascustomersandtounderstandthatthetimeistobecountedinminutes.TheTransactionsstarttheirexistenceintheGENERATEblockandprogressfromBlocktoBlock,accordingtocertainrules,untiltheyreachaTERMINATEwhichremovethemfromthemodel. Normallytransactionsprogressfromoneblocktothenextone,sothecustomertransactionswillleavetheGENERATEblocktoentertheQUEUEChairsblock.Thisblocksimulatesawaitingline,andcollectsstatisticsaccordingly.Intheexample,itmaterializealineofchairsand,attheendofthesimulation,wewillknow,amongotherthings,themaximumqueuesize(howmanychairsareneeded)andtheaveragewaitingtime.TheQUEUEblockrequiresthenameofthequeueasaparameter,becausemorethanonequeuemayexistinthemodel.EachoneisassociatedwithaDEPARTblock,whichistriggeredwhenthetransactionleavesthequeue.GPSSrememberswhichtransactionsareinthequeue,sothatitpossibletoknowtheaveragetimespent,andtocheckthatnobuggytransactionisleavingaqueuewithoutpreviouslyenteringinit. AftertheQUEUEchairsblock,thetransactionwilltrytoproceedtotheSEIZEJoeblock,ablocksimulatingthecaptureoftheFacilitynamedJoe.Facilitiesmodelsingleserversofcapacityone.Ifthefacilityisbusy,theSEIZEwilldenytheattemptingtransactiontherighttoenter.Intheexample,thecustomerwillwaitintheQUEUEblock.Ifitisfree,orassoonasitbecomesavailable,thetransactionwillbeallowedtocapturethefacility,markitasbusytootherstransactionsandstarttocounttheservicetimeandotherstatistics,untilthesametransactionpassesthecorrespondingRELEASEJoeblock. TheSEIZE/RELEASEpairsarelinkedbythefacilityname,becausemanyindependentfacilitiesmayexistinthemodel.Theycanmodeloperators,likeabarber,arepairman,anagent,butalsopiecesofequipment,likeacrane,agasstation,anauthorizationdocument,etc.,infactanythingwithcapacityone.Tosimulatemultipleparallelservers,likeateamoffivebarbers,oranovenwithacapacityof10,GPSSusesentitiesnamedSTORAGEs. AfteracustomerseizesJoe,sheproceedstothenextstatementwhichisADVANCE16,4,whosetaskistofreezetheentityforaprescribedlengthoftime,herearandomnumberpickedbetween16-4=12and16+4=20mn.OtherservicetimedistributionsareavailablethroughGPSSFUNCTION(asomehowdifferentnotionthanfunctioninotherprogramminglanguages).Duringthattime,othertransactionswillbeallowedtomovethroughthemodel,blockingsomeotherfacilitiesthatmayexistinthemodel,butnotJoebecausethisfacilityisbusywiththefrozencustomer.Aftertheprescribedtime,thecustomerwillwakeup,proceedtothenextstatement,whichwillfreeJoe,andTERMINATE. Thenthenexttransactiononthepreviousblock,thatisacustomersittingonachair,willbeabletoSEIZEJoe.Toselectthe"next"transaction,GPSSusesthefirst-comefirst-servedbasis,withpriority.Otherselectionpoliciescanbeprogrammedbydirectmanipulationofthefutureeventchainentity. Inparalleltothisfirstsegment,simulatingthecustomerbehavior,asecondmodelsegmentsimulatestheendoftheday.Attime480mn=8hanentityisGENERATEd,whichwillTERMINATEonthenextblock.Thistime,theTERMINATEasaparameterof1,meaningaspecialcounterisdecreasedby1.Whenthatcounterreaches0,theprogramstopsandtheoutputisprinted.ThisspecialcounterissetupwiththeSTARTstatement.Intheexample,itissettoone,thusthesimulationwillfinishafteronerunof480mninsimulatedtime. Theoutputcontains: FACILITYAVERAGENUMBERAVERAGESEIZINGPREEMPTING UTILIZATIONENTRIESTIME/TRANTRANS.NO.TRANS.NO. Joe.8602615.88426 QUEUEMAXIMUMAVERAGETOTALZEROPERCENTAVERAGE$AVERAGETABLECURRENT CONTENTSCONTENTENTRIESENTRIESZEROSTIME/TRANSTIME/TRANSNUMBERCONTENTS Chairs1.160271244.42.8515.1331 $AVERAGETIME/TRANS=AVERAGETIME/TRANSEXCLUDINGZEROENTITIES ItindicatesthatJoewasbusy86.0%ofthetime,gaveahaircutto26customersandthathaircuttook15.88minutesontheaverage.Incidentally,Joewascuttingthehairofcustomernumber26whenthesimulationwasclosed.Noprogrammingprovisionsweretakenforthebarbertofinishthehaircutbeforeclosingtheshop. Itindicatesalsothatamaximumof1customerwasobservedwaitinghisturn,infactthenumberofwaitingcustomerwasontheaverage0.160.Atotalof27customersdidenterthequeue,sothatcustomernumber27wasstillsitting,waitinghisturn,whenJoeclosedtheshop.Outofthese27customers,12wereservedwithouthavingtowait.Infact,thequeuewasempty44.4%ofthetime.Theaveragewaitingtimewas2.851min,andtheaveragewaitingtimeforthe15=27-12customerswhodidreallywaitwas5.133min. Seealso[edit] CSMPIII Simscript References[edit] ^ArneThesen;J.WilliamSchmidt(2014).ComputerMethodsinOperationsResearch.ISBN 978-1483260747.GPSSisaprocessfloworientedsimulationlanguage ^abP.FonsecaCasas(2009)."jgpss,anopensourcegpssframeworktoteachsimulation"(PDF).simplifythedevelopmentofacompletesimulationtoolfollowingtheGPSSsyntax.Thispaperpresents...Intheoriginal,GPSSmeantGordon'sProgrammableSimulationSystem,inhonorofGeoffreyGordon,itscreator. ^(GPSS/360,onMFT/MVTbutnotDOS) ^D.C.Div(1968)."TechnicalNote".IEEETransactionsonSystemsScienceandCybernetics.4(4):446–447.doi:10.1109/TSSC.1968.300174.IBMhasavailableGPSSIIIforthe7044and7090seriesandGPSS/360forthelarger360...GPSSIIhasalsobeenavailableontheUNIVAC1108 ^"IntroductiontoGPSS"(PDF).aboutthesimulationmodelinglanguageGPSS....summarized;sourcescomparingGPSSandother....Corporation'sGPSSforUnivac1108hardware) ^B.Liskov(1981)."GPSSSession".HistoryofProgrammingLanguages.ScienceDirect.pp. 403–437.doi:10.1016/B978-0-12-745040-7.50013-2.ISBN 9780127450407.Background:TheGeneralPurposeSimulationSystem(GPSS)isa...manufacturersthathaveproducedversionsofGPSSareUNIVAC(Gorchow,1968),CDC ^NabilR.Adam;AliDogramaci(2014).CurrentIssuesinComputerSimulation.p. 25.ISBN 978-1483258034.GPSS-like...intheAPLversionofGPSS,althoughAPLhappenstobeaninterpretivelanguage....UnivacCorporation,GPSS1100forUNIVAC1108system. ^Ståhl,Ingolf(1990).IntroductiontoSimulationWithGpssonthePc,MacIntoshandVax.ISBN 0-1348-323-10. ^"JavaGeneralPurposeSimulationSystem".Learnsimulationbuildingasimulationengine.JGPSSisanimplementationoftheGPSSsystembasedinJava. ^"GPSS50yearsold,butstillyoung".ResearchGate.net.August1,2018.In2011,GPSS,theGeneralPurposeSimulationSystem,...classroomthestudentscanstudyaverysimpleLegorailroadmodel ^abStanleyGreenberg(1972).GPSSPrimer.NewYork:Wiley-Interscience.ISBN 0471324906. ^Schriber,Thomas(1974).SimulationusingGPSS.Wiley.ISBN 9780471763109. Externallinks[edit] WolverineSoftwareGPSS/Hversion MinutemanSoftware,acompanythatprovidessomeimplementations aGPSS:PC&Mac:Targetedforeducationandprofessionals JGPSSJavaGeneralPurposeSimulationSystem. GPSS360OnlineGPSS360-DescendantoftheoriginalGPSS Authoritycontrol:Nationallibraries Israel UnitedStates Retrievedfrom"https://en.wikipedia.org/w/index.php?title=GPSS&oldid=1105952341" Categories:SimulationprogramminglanguagesHiddencategories:ArticleswithshortdescriptionShortdescriptionmatchesWikidataArticleswithJ9UidentifiersArticleswithLCCNidentifiers Navigationmenu Personaltools NotloggedinTalkContributionsCreateaccountLogin Namespaces ArticleTalk English Views ReadEditViewhistory More Search Navigation MainpageContentsCurrenteventsRandomarticleAboutWikipediaContactusDonate Contribute HelpLearntoeditCommunityportalRecentchangesUploadfile Tools WhatlinkshereRelatedchangesUploadfileSpecialpagesPermanentlinkPageinformationCitethispageWikidataitem Print/export DownloadasPDFPrintableversion Languages AzərbaycancaCatalàDeutschEspañolPolskiРусскийТоҷикӣУкраїнська Editlinks
延伸文章資訊
- 1全球專利檢索系統
登入網址︰https://gpss.tipo.gov.tw/ 使用者可免費註冊, 登入後可進行全文檢索並提供統計分析、圖表分析、新訊通知、個人喜好設定等加值功能,後續年度亦會依據產業 ...
- 2管理系統模擬與GPSS(第2版) - 博客來
書名:管理系統模擬與GPSS(第2版),語言:簡體中文,ISBN:9787302312215,頁數:199,出版社:清華大學出版社,作者:姜海虹(主編),出版日期:2013/02/01, ...
- 3全球專利檢索系統 - 資策會科技法律研究所
https://gpss.tipo.gov.tw/gpsskmc/gpssbkm. 上稿時間. 2019年03月05日. 本網站由智慧財產局(TIPO)建置,係於2018年1月1日上線服務。專利...
- 4GPSS Taiwan
GPSS.TW. Grid Parity for Sustainable Society ... 熱門職缺. GPSS集團將根據事業發展狀況招聘多元化的人才,想了解更多,請參閱本公司職缺資訊。.
- 5全球專利檢索系統