It improves over PagePool/Math by introducing a compound page model. By a compound page we mean a page which consists of a main text page and a number of embedded objects, e.g., GIFs. We model a compound page as a main page and several component objects. The main page is always assigned with ID 0. All component pages have the same size; both the main page size and component object size is fixed, but adjustable through OTcl-bound variables main_size_ and comp_size_, respectively. The number of component objects can be set using the OTcl-bound variable num_pages_.
PagePool/CompMath has the following major OTcl methods:
rX
gen-size pageID & If pageID is 0, return
main
_size
_, otherwise return comp
_size
_.
ranvar-main-age rv & Set random variable for main page
lifetime. Another one, ranvar-obj-age, set that for component
objects.
gen-pageid & Always returns 0, which is the main page ID.
gen-modtime pageID mt & Returns the next modification time
of the given page pageID. If the given ID is 0, it uses the
main page lifetime random variable; otherwise it uses the component
object lifetime random variable.
An example of using PagePool/CompMath is available at ns/tcl/ex/simple-webcache-comp.tcl.
Tom Henderson 2011-11-05