INTERFACE GDProgressPlot; IMPORT PSPlot, CPUTime; FROM PSPlot IMPORT Color; IMPORT GDScore; (* Progress plots of evolutionary computations. *) TYPE T <: PublicT; PublicT = OBJECT METHODS open( name: TEXT; (* File name (without the ".eps" extension). *) maxTime: Time; (* Maximum time (for scaling). *) maxScore: Score; (* Maximum score values (for scaling). *) stepWidth: REAL; (* Width of `step' lines (mm). *) lifeWidth: REAL; (* Width of `life' lines (mm). *) ): T; (* Must be called before any other method. Opens a progress plot file (Encapsulated Postscript format) with the given name. The Y axis will be scaled assuming scores vary from 0 to the given "maxScore". The X axis will extend to the specified "maxTime". *) close(); (* Closes the plot file. *) plotStep( READONLY color: Color; ck0: Time; sc0: Score; ck1: Time; sc1: Score; ck2: Time; ); (* Plots a visible record of an heuristic step that started at time "ck0" with an item scored "sc0" and ended at time "ck1" with an item scored "sc1". Also plots the time spent scoring the item (between "ck1" and "ck2"). If either "sc0" or "sc1" are "GDScore.Huge", the procedure assumes that the corresponding item does not exist, and will indicate that by an appropriate device. *) plotLife( READONLY color: Color; ck0: Time; sc: Score; ck1: Time; ); (* Plots a visible record of the lifetime of a solution with score "sc" that entered the scene at time "ck0" and exited at time "ck1". If "sc" is "GDScore.Huge", the procedure assumes that the corresponding item does not exist, and will indicate that by an appropriate graphical symbol. *) END; TYPE Time = CPUTime.T; Score = GDScore.T; CONST HugeScore = GDScore.Huge; END GDProgressPlot. (* Last edited on 2000-01-12 07:44:54 by stolfi *)