Node-Overlap-Removal

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

FastNodeOverlapRemoval—AddendumTechnicalReport∗,January2006TimDwyer1,KimMarriott1,andPeterJ.Stuckey21SchoolofComp.Science&Soft.Eng.,MonashUniversity,Australia{tdwyer,marriott}@mail.csse.monash.edu.au2NICTAVictoriaLaboratoryDept.ofComp.Science&Soft.Eng.,UniversityofMelbourne,Australiapjs@cs.mu.oz.auAbstract.Thisdocumenthighlightsanoversightinourrecentpaperonamethodfornodeoverlapremoval[1,2].Theerror,basedonanin-completedspecifiedinvariant,occursinthealgorithmsatisfyVPSCandleadstoararelyoccurringcasewherenotallconstraintsaresatisfied.Wegivetherequiredadditionstothealgorithmtoobtaincorrectbehaviour,revisetheworstcasecomplexitytheoremandreproducetheexperimen-talperformancedata.WhiletheworstcasecomplexityisO(n2)weshowthatfortypicalinputtheperformanceisO(nlogn)andthisisreflectedbythenewexperimentalresults.Keywords:graphlayout,constrainedoptimization,separationconstraints1IntroductionOurrecentpaper[1]detailsanalgorithmforremovingoverlapbetweenrect-angles,whileattemptingtodisplacetherectanglesbyaslittleaspossible.Thealgorithmisprimarilymotivatedbythenode-overlapremovalproblemingraphdrawing.Thatis,manygraphdrawingalgorithmstreatnodesaspointswithzerowidthandheightsothat,afteralayoutisfound,ifthenodeshavelabelsorassociatedgraphicsthelayoutmustbeadjustedtoremoveanyoverlaps.Theal-gorithmtreatsx-andy-dimensionsseparately,eachasaninstanceofthevariableplacementwithseparationconstraints(VPSC)problemasdetailedbelow.ThemethodforsolvingtheVPSCproblemtooptimalityisdescribedintwoparts.TheSatisfyVPSCprocedurefindsasolutioninwhichalloverlapisremoved,butwhichmaynotnecessarilybeoptimal.TheSolveVPSCalgorithmusesSat-isfyVPSCtofindaninitialfeasiblesolution,andthenrefinesthearrangementuntilanoptimalsolutionisfound.TheproblemdescribedandcorrectedinthispaperoccursinSatisfyVPSCwherethealgorithm,asoriginallydescribed,couldpotentiallyproduceinfeasiblesolutions.Theproblemstemsfromanerroneousassumptionthat,sincevariableswerebeingprocessedlefttoright(whilesolvinginthex-dimension)inapartialorderdeterminedbythedirectedacyclicgraphofseparationconstraints,onceavari-ablewasplacednoothervariablesuponwhichitsconstraintsweredependantwouldbemovedagain.Thealgorithmreliedonthisassumedinvarianttomain-tainheapdatastructuresofincomingconstraintstoblocksofvariables.Thatis,theheapsrequiredthattheorderofrelativeslacknessofincomingconstraintstoeachblockbepreservedsothatthetopmostconstraintoneachheapwouldalwaysbethemostviolated.Theactualsituationturnsouttobeslightlymorecomplicated.Therevisedinvariant,uponwhichthemodifiedalgorithmdepends,isstatedandprovenbelow.Thecomplete,correctsatisfyVPSCalgorithmisalsogivenandthestatementofcomplexitymodified.Finally,wecompareexperimen-talresultsforthenewversionofthealgorithmwiththosefromtheoriginalpaperandfindthatpracticalperformanceisnotadverselyaffected.2TheSatisfyVPSCAlgorithmIneachpassofthenode-overlapremovalprocesswemustsolvethefollowingconstrainedoptimizationproblemforeachdimension:Variableplacementwithseparationconstraints(VPSC)problem.Givennvariablesv1,...,vn,aweightvi.weight≥0andadesiredvaluevi.des1foreachvariableandasetofseparationconstraintsCoverthesevariablesfindanassignmenttothevariableswhichminimizesPni=1vi.weight×(vi−vi.des)2subjecttoC.WecantreatasetofseparationconstraintsCovervariablesVasaweighteddirectedgraphwithanodeforeachv∈Vandanedgeforeachc∈Cfromleft(c)toright(c)withweightgap(c).Wecallthistheconstraintgraph.Wedefineout(v)={c∈C|left(c)=v}andin(v)={c∈C|right(c)=v}.Notethatedgesinthisgrapharenottheedgesintheoriginalgraph.WerestrictattentiontoVPSCproblemsinwhichtheconstraintgraphisacyclicandforwhichthereisatmostoneedgebetweenanypairofvariables.ItispossibletotransformanarbitrarysatisfiableVPSCproblemintoaproblemofthisformandourgenerationalgorithmwillgenerateconstraintswiththisproperty.Sincetheconstraintgraphisacyclicitimposesapartialorderonthevari-ables:wedefineuCviffthereisa(directed)pathfromutovusingtheedgesinseparationconstraintsetC.Wewillmakeuseofthefunctionto-talorder(V,C)whichreturnsatotalorderingforthevariablesinV,i.e.itreturnsalist[v1,...,vn]s.t.forallji,vj6Cvi.Figure1liststhebasicalgorithmforfindingasolutiontotheVPSCproblemsuchthattheseparationconstraintsaresatisfiedandthevariableplacementis“close”tooptimal.IttakesasinputasetofseparationconstraintsCandasetofvariablesV.Thealgorithmworksbymergingvariablesintolargerandlarger“blocks”ofcontiguousvariablesconnectedbyaspanningtreeofactiveconstraints,whereaseparationconstraintu+a≤visactiveif,forthecurrentpositionforuandv,u+a=v.1vi.desissettox0viory0viforeachdimension,asusedingenerateCno{x|y}.2proceduresatisfyVPSC(V,C)timeCtr←0[v1,...,vn]←totalorder(V,C)fori∈1...ndomergeleft(block(vi))endforreturn[v1←posn(v1),...,vn←posn(vn)]procedureblock(v)letbbeanewblocks.t.b.vars←{v}b.nvars←1b.posn←v.desb.wposn←v.weight×v.desb.weight←v.weightb.active←∅b.in←newQueue()b.time←timeCtr←timeCtr+1forc∈in(v)dotime(c)←timeCtradd(b.in,c)endforblock[v]←boffset[v]←0returnbproceduremergeleft(b)whileviolation(top(b.in))0doc←top(b.in)removeTop(b.in)bl←block[left(c)]ifbl.in=nullthensetupinconstraints(bl)

1 / 9
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功