/usr/share/mozart/doc/cpitut/node15.html is in mozart-doc 1.4.0-8ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Determining Wake-up Events for Real-Interval Constraints</TITLE><LINK href="ozdoc.css" rel="stylesheet" type="text/css"></HEAD><BODY><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node14.html#ct.casestudy.impl.ridef"><< Prev</A></TD><TD><A href="node13.html">- Up -</A></TD><TD><A href="node16.html#ct.casestudy.impl.constraint">Next >></A></TD></TR></TABLE><DIV id="ct.casestudy.impl.profilewakeup"><H4><A name="ct.casestudy.impl.profilewakeup">Determining Wake-up Events for Real-Interval Constraints</A></H4><P> Instances of classes derived from <CODE>OZ_CtWakeUp</CODE> indicate to the runtime system which wake-up event occurred. Therefore, member functions to initialize an <CODE>RIWakeUp</CODE> instance according to a possible event are defined. They will be used to determine the wake-up event of a propagator upon a certain parameter when imposing a propagator(see <A href="node18.html#ct.casestudy.impl.expect">Section ``Extending <CODE>OZ_Expect</CODE>''</A>). </P><BLOCKQUOTE class="linenumbers"><PRE><SPAN class="keyword">class</SPAN> <SPAN class="type">RIWakeUp</SPAN> : <SPAN class="keyword">public</SPAN> <SPAN class="type">OZ_CtWakeUp</SPAN> {<BR><SPAN class="keyword">public</SPAN>:<BR> <SPAN class="keyword">static</SPAN> <SPAN class="type">OZ_CtWakeUp</SPAN> <SPAN class="functionname">wakeupMin</SPAN>(<SPAN class="type">void</SPAN>) {<BR> <SPAN class="type">OZ_CtWakeUp</SPAN> <SPAN class="variablename">ri_wakeup_min</SPAN>;<BR> ri_wakeup_min.init();<BR> ri_wakeup_min.setWakeUp(0);<BR> <SPAN class="keyword">return</SPAN> ri_wakeup_min;<BR> }<BR> <SPAN class="keyword">static</SPAN> <SPAN class="type">OZ_CtWakeUp</SPAN> <SPAN class="functionname">wakeupMax</SPAN>(<SPAN class="type">void</SPAN>) {<BR> <SPAN class="type">OZ_CtWakeUp</SPAN> <SPAN class="variablename">ri_wakeup_max</SPAN>;<BR> ri_wakeup_max.init();<BR> ri_wakeup_max.setWakeUp(1);<BR> <SPAN class="keyword">return</SPAN> ri_wakeup_max;<BR> }<BR> <SPAN class="keyword">static</SPAN> <SPAN class="type">OZ_CtWakeUp</SPAN> <SPAN class="functionname">wakeupMinMax</SPAN>(<SPAN class="type">void</SPAN>) {<BR> <SPAN class="type">OZ_CtWakeUp</SPAN> <SPAN class="variablename">ri_wakeup_minmax</SPAN>;<BR> ri_wakeup_minmax.init();<BR> ri_wakeup_minmax.setWakeUp(0);<BR> ri_wakeup_minmax.setWakeUp(1);<BR> <SPAN class="keyword">return</SPAN> ri_wakeup_minmax;<BR> }<BR>};<BR></PRE></BLOCKQUOTE><P> </P><P>An instance of <CODE>RIWakeUp</CODE> is computed from an instance of <CODE>RI</CODE> and a profile (stored before the constraint has be modified) by </P><BLOCKQUOTE class="code"><CODE>OZ_CtWakeUp RI<SPAN class="keyword">::</SPAN>getWakeUpDescriptor(OZ_CtProfile <SPAN class="keyword">*</SPAN> p)</CODE></BLOCKQUOTE><P> (see <A href="node16.html#ct.casestudy.impl.constraint">Section ``The Actual Real-Interval Constraint''</A>). The definition of the profile class <CODE>RIProfile</CODE> for real-intervals is given below. </P><BLOCKQUOTE class="linenumbers"><PRE><SPAN class="keyword">class</SPAN> <SPAN class="type">RIProfile</SPAN> : <SPAN class="keyword">public</SPAN> <SPAN class="type">OZ_CtProfile</SPAN> {<BR><SPAN class="keyword">private</SPAN>:<BR> <SPAN class="type">ri_float</SPAN> <SPAN class="variablename">_l</SPAN>, <SPAN class="variablename">_u</SPAN>;<BR> <BR><SPAN class="keyword">public</SPAN>:<BR> <SPAN class="functionname">RIProfile</SPAN>(<SPAN class="type">void</SPAN>) {}<BR> <SPAN class="keyword">virtual</SPAN> <SPAN class="type">void</SPAN> <SPAN class="functionname">init</SPAN>(<SPAN class="type">OZ_Ct</SPAN> * <SPAN class="variablename">c</SPAN>) {<BR> <SPAN class="type">RI</SPAN> * <SPAN class="variablename">ri</SPAN> = (<SPAN class="type">RI</SPAN> *) c;<BR> _l = ri->_l;<BR> _u = ri->_u;<BR> }<BR>};<BR></PRE></BLOCKQUOTE><P> </P><P>The function <CODE>RIProfile<SPAN class="keyword">::</SPAN>init(OZ_Ct <SPAN class="keyword">*</SPAN> c)</CODE> takes a snapshot of <CODE>c</CODE> to enable the detection of the abovementioned wake-up events, i. e., modified lower/upper bound resp. both. </P></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node14.html#ct.casestudy.impl.ridef"><< Prev</A></TD><TD><A href="node13.html">- Up -</A></TD><TD><A href="node16.html#ct.casestudy.impl.constraint">Next >></A></TD></TR></TABLE><HR><ADDRESS><A href="http://www.ps.uni-sb.de/~tmueller/">Tobias Müller</A><BR><SPAN class="version">Version 1.4.0 (20110908185330)</SPAN></ADDRESS></BODY></HTML>
|