This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/packages/gecode/dev/extractor/xml/cumulative_2basic_8hpp.xml

237 lines
51 KiB
XML
Raw Normal View History

2014-01-22 09:41:47 +00:00
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.6">
<compounddef id="cumulative_2basic_8hpp" kind="file">
<compoundname>basic.hpp</compoundname>
<includedby refid="cumulative_8hh" local="no">/usr/include/gecode/int/cumulative.hh</includedby>
<invincdepgraph>
<node id="12716">
<label>/usr/include/gecode/int/cumulative.hh</label>
<link refid="cumulative_8hh_source"/>
</node>
<node id="12715">
<label>/usr/include/gecode/int/cumulative/basic.hpp</label>
<link refid="cumulative/basic.hpp"/>
<childnode refid="12716" relation="include">
</childnode>
</node>
</invincdepgraph>
<innerclass refid="classGecode_1_1Int_1_1Cumulative_1_1Event" prot="public">Gecode::Int::Cumulative::Event</innerclass>
<innerclass refid="classGecode_1_1Int_1_1Cumulative_1_1TaskByDecCap" prot="public">Gecode::Int::Cumulative::TaskByDecCap</innerclass>
<innernamespace refid="namespaceGecode">Gecode</innernamespace>
<innernamespace refid="namespaceGecode_1_1Int">Gecode::Int</innernamespace>
<innernamespace refid="namespaceGecode_1_1Int_1_1Cumulative">Gecode::Int::Cumulative</innernamespace>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
<programlisting>
<codeline lineno="1"><highlight class="comment">/*<sp/>-*-<sp/>mode:<sp/>C++;<sp/>c-basic-offset:<sp/>2;<sp/>indent-tabs-mode:<sp/>nil<sp/>-*-<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2"><highlight class="normal"></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="3"><highlight class="comment"><sp/>*<sp/><sp/>Main<sp/>authors:</highlight></codeline>
<codeline lineno="4"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>Christian<sp/>Schulte<sp/>&lt;schulte@gecode.org&gt;</highlight></codeline>
<codeline lineno="5"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>Guido<sp/>Tack<sp/>&lt;tack@gecode.org&gt;</highlight></codeline>
<codeline lineno="6"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="7"><highlight class="comment"><sp/>*<sp/><sp/>Copyright:</highlight></codeline>
<codeline lineno="8"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>Christian<sp/>Schulte,<sp/>2010</highlight></codeline>
<codeline lineno="9"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>Guido<sp/>Tack,<sp/>2010</highlight></codeline>
<codeline lineno="10"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="11"><highlight class="comment"><sp/>*<sp/><sp/>Last<sp/>modified:</highlight></codeline>
<codeline lineno="12"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>$Date:<sp/>2012-09-07<sp/>17:31:22<sp/>+0200<sp/>(Fri,<sp/>07<sp/>Sep<sp/>2012)<sp/>$<sp/>by<sp/>$Author:<sp/>schulte<sp/>$</highlight></codeline>
<codeline lineno="13"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>$Revision:<sp/>13068<sp/>$</highlight></codeline>
<codeline lineno="14"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="15"><highlight class="comment"><sp/>*<sp/><sp/>This<sp/>file<sp/>is<sp/>part<sp/>of<sp/>Gecode,<sp/>the<sp/>generic<sp/>constraint</highlight></codeline>
<codeline lineno="16"><highlight class="comment"><sp/>*<sp/><sp/>development<sp/>environment:</highlight></codeline>
<codeline lineno="17"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>http://www.gecode.org</highlight></codeline>
<codeline lineno="18"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="19"><highlight class="comment"><sp/>*<sp/><sp/>Permission<sp/>is<sp/>hereby<sp/>granted,<sp/>free<sp/>of<sp/>charge,<sp/>to<sp/>any<sp/>person<sp/>obtaining</highlight></codeline>
<codeline lineno="20"><highlight class="comment"><sp/>*<sp/><sp/>a<sp/>copy<sp/>of<sp/>this<sp/>software<sp/>and<sp/>associated<sp/>documentation<sp/>files<sp/>(the</highlight></codeline>
<codeline lineno="21"><highlight class="comment"><sp/>*<sp/><sp/>&quot;Software&quot;),<sp/>to<sp/>deal<sp/>in<sp/>the<sp/>Software<sp/>without<sp/>restriction,<sp/>including</highlight></codeline>
<codeline lineno="22"><highlight class="comment"><sp/>*<sp/><sp/>without<sp/>limitation<sp/>the<sp/>rights<sp/>to<sp/>use,<sp/>copy,<sp/>modify,<sp/>merge,<sp/>publish,</highlight></codeline>
<codeline lineno="23"><highlight class="comment"><sp/>*<sp/><sp/>distribute,<sp/>sublicense,<sp/>and/or<sp/>sell<sp/>copies<sp/>of<sp/>the<sp/>Software,<sp/>and<sp/>to</highlight></codeline>
<codeline lineno="24"><highlight class="comment"><sp/>*<sp/><sp/>permit<sp/>persons<sp/>to<sp/>whom<sp/>the<sp/>Software<sp/>is<sp/>furnished<sp/>to<sp/>do<sp/>so,<sp/>subject<sp/>to</highlight></codeline>
<codeline lineno="25"><highlight class="comment"><sp/>*<sp/><sp/>the<sp/>following<sp/>conditions:</highlight></codeline>
<codeline lineno="26"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="27"><highlight class="comment"><sp/>*<sp/><sp/>The<sp/>above<sp/>copyright<sp/>notice<sp/>and<sp/>this<sp/>permission<sp/>notice<sp/>shall<sp/>be</highlight></codeline>
<codeline lineno="28"><highlight class="comment"><sp/>*<sp/><sp/>included<sp/>in<sp/>all<sp/>copies<sp/>or<sp/>substantial<sp/>portions<sp/>of<sp/>the<sp/>Software.</highlight></codeline>
<codeline lineno="29"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="30"><highlight class="comment"><sp/>*<sp/><sp/>THE<sp/>SOFTWARE<sp/>IS<sp/>PROVIDED<sp/>&quot;AS<sp/>IS&quot;,<sp/>WITHOUT<sp/>WARRANTY<sp/>OF<sp/>ANY<sp/>KIND,</highlight></codeline>
<codeline lineno="31"><highlight class="comment"><sp/>*<sp/><sp/>EXPRESS<sp/>OR<sp/>IMPLIED,<sp/>INCLUDING<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO<sp/>THE<sp/>WARRANTIES<sp/>OF</highlight></codeline>
<codeline lineno="32"><highlight class="comment"><sp/>*<sp/><sp/>MERCHANTABILITY,<sp/>FITNESS<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE<sp/>AND</highlight></codeline>
<codeline lineno="33"><highlight class="comment"><sp/>*<sp/><sp/>NONINFRINGEMENT.<sp/>IN<sp/>NO<sp/>EVENT<sp/>SHALL<sp/>THE<sp/>AUTHORS<sp/>OR<sp/>COPYRIGHT<sp/>HOLDERS<sp/>BE</highlight></codeline>
<codeline lineno="34"><highlight class="comment"><sp/>*<sp/><sp/>LIABLE<sp/>FOR<sp/>ANY<sp/>CLAIM,<sp/>DAMAGES<sp/>OR<sp/>OTHER<sp/>LIABILITY,<sp/>WHETHER<sp/>IN<sp/>AN<sp/>ACTION</highlight></codeline>
<codeline lineno="35"><highlight class="comment"><sp/>*<sp/><sp/>OF<sp/>CONTRACT,<sp/>TORT<sp/>OR<sp/>OTHERWISE,<sp/>ARISING<sp/>FROM,<sp/>OUT<sp/>OF<sp/>OR<sp/>IN<sp/>CONNECTION</highlight></codeline>
<codeline lineno="36"><highlight class="comment"><sp/>*<sp/><sp/>WITH<sp/>THE<sp/>SOFTWARE<sp/>OR<sp/>THE<sp/>USE<sp/>OR<sp/>OTHER<sp/>DEALINGS<sp/>IN<sp/>THE<sp/>SOFTWARE.</highlight></codeline>
<codeline lineno="37"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="38"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="39"><highlight class="normal"></highlight></codeline>
<codeline lineno="40" refid="namespaceGecode_1_1Int_1_1Cumulative" refkind="compound"><highlight class="normal"></highlight><highlight class="keyword">namespace<sp/></highlight><highlight class="normal">Gecode<sp/>{<sp/></highlight><highlight class="keyword">namespace<sp/></highlight><highlight class="normal">Int<sp/>{<sp/></highlight><highlight class="keyword">namespace<sp/></highlight><highlight class="normal">Cumulative<sp/>{</highlight></codeline>
<codeline lineno="41"><highlight class="normal"></highlight></codeline>
<codeline lineno="43" refid="classGecode_1_1Int_1_1Cumulative_1_1Event" refkind="compound"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal"><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event" kindref="compound">Event</ref><sp/>{</highlight></codeline>
<codeline lineno="44"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="46" refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172c" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">enum</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172c" kindref="member">Type</ref><sp/>{</highlight></codeline>
<codeline lineno="47" refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172ca9d0cc2375fe99d562a47eae800af3088" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172ca9d0cc2375fe99d562a47eae800af3088" kindref="member">LRT</ref><sp/>=<sp/>0,<sp/></highlight></codeline>
<codeline lineno="48" refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172ca2147820b78626af3e4517bbbb4f0efa7" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172ca2147820b78626af3e4517bbbb4f0efa7" kindref="member">LCT</ref><sp/>=<sp/>1,<sp/></highlight></codeline>
<codeline lineno="49" refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172ca2dd4c0769bd20d1855a039fd9e2b9634" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172ca2dd4c0769bd20d1855a039fd9e2b9634" kindref="member">EST</ref><sp/>=<sp/>2,<sp/></highlight></codeline>
<codeline lineno="50" refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172ca4f4555ca419b05340e1e4fe24459cfc2" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172ca4f4555ca419b05340e1e4fe24459cfc2" kindref="member">ZRO</ref><sp/>=<sp/>3,<sp/></highlight></codeline>
<codeline lineno="51" refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172cab255607798058782db3970c10687b39e" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172cab255607798058782db3970c10687b39e" kindref="member">ERT</ref><sp/>=<sp/>4,<sp/></highlight></codeline>
<codeline lineno="52" refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172ca6ebe654c07a4cdfae7542d10d29d3851" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172ca6ebe654c07a4cdfae7542d10d29d3851" kindref="member">END</ref><sp/>=<sp/>5<sp/><sp/></highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/><sp/><sp/>};</highlight></codeline>
<codeline lineno="54" refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a453c511eb7f69dbbbcd7709987e9bfb9" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172c" kindref="member">Type</ref><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a453c511eb7f69dbbbcd7709987e9bfb9" kindref="member">e</ref>;<sp/></highlight></codeline>
<codeline lineno="55" refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a016f54892fc82584c8d492955ded17b9" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a016f54892fc82584c8d492955ded17b9" kindref="member">t</ref>;<sp/><sp/></highlight></codeline>
<codeline lineno="56" refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a2cc3d960b30f798950597378a7bd29bf" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a2cc3d960b30f798950597378a7bd29bf" kindref="member">i</ref>;<sp/><sp/></highlight></codeline>
<codeline lineno="57"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a0aabb4d768aba09de0fa005994ce1a83" kindref="member">init</ref>(<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172c" kindref="member">Type</ref><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a453c511eb7f69dbbbcd7709987e9bfb9" kindref="member">e</ref>,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a016f54892fc82584c8d492955ded17b9" kindref="member">t</ref>,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a2cc3d960b30f798950597378a7bd29bf" kindref="member">i</ref>);</highlight></codeline>
<codeline lineno="60"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a2a8a241dbba156dda6c317721a58a8a8" kindref="member">operator &lt;</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event" kindref="compound">Event</ref>&amp;<sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a453c511eb7f69dbbbcd7709987e9bfb9" kindref="member">e</ref>)<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="61"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
<codeline lineno="62"><highlight class="normal"></highlight></codeline>
<codeline lineno="64"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal">&lt;</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>Task&gt;</highlight></codeline>
<codeline lineno="65" refid="classGecode_1_1Int_1_1Cumulative_1_1TaskByDecCap" refkind="compound"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal"><ref refid="classGecode_1_1Int_1_1Cumulative_1_1TaskByDecCap" kindref="compound">TaskByDecCap</ref><sp/>{</highlight></codeline>
<codeline lineno="66"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1TaskByDecCap_1a683fbc78dc9075180b8ea9bc41ef371e" kindref="member">operator ()</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>Task&amp;<sp/>t1,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>Task&amp;<sp/>t2)<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
<codeline lineno="70"><highlight class="normal"></highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="72" refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a0aabb4d768aba09de0fa005994ce1a83" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a0aabb4d768aba09de0fa005994ce1a83" kindref="member">Event::init</ref>(<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172c" kindref="member">Event::Type</ref><sp/>e0,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>t0,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i0)<sp/>{</highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a453c511eb7f69dbbbcd7709987e9bfb9" kindref="member">e</ref>=e0;<sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a016f54892fc82584c8d492955ded17b9" kindref="member">t</ref>=t0;<sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a2cc3d960b30f798950597378a7bd29bf" kindref="member">i</ref>=i0;</highlight></codeline>
<codeline lineno="74"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="75"><highlight class="normal"></highlight></codeline>
<codeline lineno="76"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="77" refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a2a8a241dbba156dda6c317721a58a8a8" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a2a8a241dbba156dda6c317721a58a8a8" kindref="member">Event::operator &lt;</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event" kindref="compound">Event</ref>&amp;<sp/>e)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(this-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a016f54892fc82584c8d492955ded17b9" kindref="member">t</ref><sp/>==<sp/>e.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a016f54892fc82584c8d492955ded17b9" kindref="member">t</ref>)</highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>this-&gt;e<sp/>&lt;<sp/>e.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a453c511eb7f69dbbbcd7709987e9bfb9" kindref="member">e</ref>;</highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>this-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a016f54892fc82584c8d492955ded17b9" kindref="member">t</ref><sp/>&lt;<sp/>e.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a016f54892fc82584c8d492955ded17b9" kindref="member">t</ref>;</highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="82"><highlight class="normal"></highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal">&lt;</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>Task&gt;</highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="85" refid="classGecode_1_1Int_1_1Cumulative_1_1TaskByDecCap_1a683fbc78dc9075180b8ea9bc41ef371e" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1TaskByDecCap_1a683fbc78dc9075180b8ea9bc41ef371e" kindref="member">TaskByDecCap&lt;Task&gt;::operator ()</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>Task&amp;<sp/>t1,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>Task&amp;<sp/>t2)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>t1.c()<sp/>&gt;<sp/>t2.c();</highlight></codeline>
<codeline lineno="87"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="88"><highlight class="normal"></highlight></codeline>
<codeline lineno="89"><highlight class="normal"></highlight></codeline>
<codeline lineno="90"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Basic<sp/>propagation</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="91"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal">&lt;</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>Task,<sp/></highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>Cap&gt;</highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5" kindref="member">ExecStatus</ref></highlight></codeline>
<codeline lineno="93" refid="namespaceGecode_1_1Int_1_1Cumulative_1a08c482587a2f2a87afb6fed7058666b3" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="namespaceGecode_1_1Int_1_1Cumulative_1a08c482587a2f2a87afb6fed7058666b3" kindref="member">basic</ref>(<ref refid="classGecode_1_1Space" kindref="compound">Space</ref>&amp;<sp/>home,<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal">&amp;<sp/>subsumed,<sp/>Cap<sp/>c,<sp/><ref refid="classGecode_1_1Int_1_1TaskArray" kindref="compound">TaskArray&lt;Task&gt;</ref>&amp;<sp/>t)<sp/>{</highlight></codeline>
<codeline lineno="94"><highlight class="normal"><sp/><sp/><sp/><sp/>subsumed<sp/>=<sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="95"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ccur<sp/>=<sp/>c.max();</highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>cmax<sp/>=<sp/>ccur;</highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>cmin<sp/>=<sp/>ccur;</highlight></codeline>
<codeline lineno="98"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Sort<sp/>tasks<sp/>by<sp/>decreasing<sp/>capacity</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1TaskByDecCap" kindref="compound">TaskByDecCap&lt;Task&gt;</ref><sp/>tbdc;</highlight></codeline>
<codeline lineno="100"><highlight class="normal"><sp/><sp/><sp/><sp/>Support::quicksort(&amp;t[0],<sp/>t.<ref refid="classGecode_1_1Int_1_1TaskArray_1a699a4634270912ce1853ab89511c8c5e" kindref="member">size</ref>(),<sp/>tbdc);</highlight></codeline>
<codeline lineno="101"><highlight class="normal"></highlight></codeline>
<codeline lineno="102"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Region" kindref="compound">Region</ref><sp/>r(home);</highlight></codeline>
<codeline lineno="103"><highlight class="normal"></highlight></codeline>
<codeline lineno="104"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event" kindref="compound">Event</ref>*<sp/>e<sp/>=<sp/>r.alloc&lt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event" kindref="compound">Event</ref>&gt;(4*t.<ref refid="classGecode_1_1Int_1_1TaskArray_1a699a4634270912ce1853ab89511c8c5e" kindref="member">size</ref>()+1);</highlight></codeline>
<codeline lineno="105"><highlight class="normal"></highlight></codeline>
<codeline lineno="106"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Initialize<sp/>events</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="107"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>assigned=</highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="108"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="109"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>required=</highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="110"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>n=0;</highlight></codeline>
<codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i=t.<ref refid="classGecode_1_1Int_1_1TaskArray_1a699a4634270912ce1853ab89511c8c5e" kindref="member">size</ref>();<sp/>i--;<sp/>)<sp/></highlight></codeline>
<codeline lineno="112"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t[i].assigned())<sp/>{</highlight></codeline>
<codeline lineno="113"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Only<sp/>add<sp/>required<sp/>part</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="114"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t[i].pmin()<sp/>&gt;<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="115"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>required<sp/>=<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="116"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>e[n++].<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a0aabb4d768aba09de0fa005994ce1a83" kindref="member">init</ref>(<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172cab255607798058782db3970c10687b39e" kindref="member">Event::ERT</ref>,t[i].lst(),i);</highlight></codeline>
<codeline lineno="117"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>e[n++].<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a0aabb4d768aba09de0fa005994ce1a83" kindref="member">init</ref>(<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172ca9d0cc2375fe99d562a47eae800af3088" kindref="member">Event::LRT</ref>,t[i].ect(),i);</highlight></codeline>
<codeline lineno="118"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t[i].pmax()<sp/>==<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="119"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>required<sp/>=<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="120"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>e[n++].<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a0aabb4d768aba09de0fa005994ce1a83" kindref="member">init</ref>(<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172ca4f4555ca419b05340e1e4fe24459cfc2" kindref="member">Event::ZRO</ref>,t[i].lst(),i);</highlight></codeline>
<codeline lineno="121"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="122"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="123"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>assigned<sp/>=<sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="124"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>e[n++].<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a0aabb4d768aba09de0fa005994ce1a83" kindref="member">init</ref>(<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172ca2dd4c0769bd20d1855a039fd9e2b9634" kindref="member">Event::EST</ref>,t[i].est(),i);</highlight></codeline>
<codeline lineno="125"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>e[n++].<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a0aabb4d768aba09de0fa005994ce1a83" kindref="member">init</ref>(<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172ca2147820b78626af3e4517bbbb4f0efa7" kindref="member">Event::LCT</ref>,t[i].lct(),i);</highlight></codeline>
<codeline lineno="126"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Check<sp/>whether<sp/>task<sp/>has<sp/>required<sp/>part</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="127"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t[i].lst()<sp/>&lt;<sp/>t[i].ect())<sp/>{</highlight></codeline>
<codeline lineno="128"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>required<sp/>=<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="129"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>e[n++].<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a0aabb4d768aba09de0fa005994ce1a83" kindref="member">init</ref>(<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172cab255607798058782db3970c10687b39e" kindref="member">Event::ERT</ref>,t[i].lst(),i);</highlight></codeline>
<codeline lineno="130"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>e[n++].<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a0aabb4d768aba09de0fa005994ce1a83" kindref="member">init</ref>(<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172ca9d0cc2375fe99d562a47eae800af3088" kindref="member">Event::LRT</ref>,t[i].ect(),i);</highlight></codeline>
<codeline lineno="131"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="132"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="133"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="134"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Check<sp/>whether<sp/>no<sp/>task<sp/>has<sp/>a<sp/>required<sp/>part</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="135"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!required)<sp/>{</highlight></codeline>
<codeline lineno="136"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>subsumed<sp/>=<sp/>assigned;</highlight></codeline>
<codeline lineno="137"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5a13bb69056fb9293e8df98c0e347ba634" kindref="member">ES_FIX</ref>;</highlight></codeline>
<codeline lineno="138"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="139"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="140"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Write<sp/>end<sp/>marker</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="141"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>e[n++].<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a0aabb4d768aba09de0fa005994ce1a83" kindref="member">init</ref>(<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172ca6ebe654c07a4cdfae7542d10d29d3851" kindref="member">Event::END</ref>,<ref refid="namespaceGecode_1_1Int_1_1Limits_1a5a8edf24fe7e29c7159587b7e7d0260a" kindref="member">Int::Limits::infinity</ref>,-1);</highlight></codeline>
<codeline lineno="142"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="143"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Sort<sp/>events</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="144"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>Support::quicksort(e,<sp/>n);</highlight></codeline>
<codeline lineno="145"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="146"><highlight class="normal"></highlight></codeline>
<codeline lineno="147"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Set<sp/>of<sp/>current<sp/>but<sp/>not<sp/>required<sp/>tasks</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="148"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Support_1_1BitSet" kindref="compound">Support::BitSet&lt;Region&gt;</ref><sp/>tasks(r,static_cast&lt;unsigned<sp/>int&gt;(t.<ref refid="classGecode_1_1Int_1_1TaskArray_1a699a4634270912ce1853ab89511c8c5e" kindref="member">size</ref>()));</highlight></codeline>
<codeline lineno="149"><highlight class="normal"></highlight></codeline>
<codeline lineno="150"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Process<sp/>events,<sp/>use<sp/>ccur<sp/>as<sp/>the<sp/>capacity<sp/>that<sp/>is<sp/>still<sp/>free</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="151"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(e-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a453c511eb7f69dbbbcd7709987e9bfb9" kindref="member">e</ref><sp/>!=<sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172ca6ebe654c07a4cdfae7542d10d29d3851" kindref="member">Event::END</ref>)<sp/>{</highlight></codeline>
<codeline lineno="152"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Current<sp/>time</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="153"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>time<sp/>=<sp/>e-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a016f54892fc82584c8d492955ded17b9" kindref="member">t</ref>;</highlight></codeline>
<codeline lineno="154"><highlight class="normal"></highlight></codeline>
<codeline lineno="155"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Process<sp/>events<sp/>for<sp/>completion<sp/>of<sp/>required<sp/>part</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="156"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<sp/>;<sp/>(e-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a016f54892fc82584c8d492955ded17b9" kindref="member">t</ref><sp/>==<sp/>time)<sp/>&amp;&amp;<sp/>(e-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a453c511eb7f69dbbbcd7709987e9bfb9" kindref="member">e</ref><sp/>==<sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172ca9d0cc2375fe99d562a47eae800af3088" kindref="member">Event::LRT</ref>);<sp/>e++)<sp/></highlight></codeline>
<codeline lineno="157"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t[e-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a2cc3d960b30f798950597378a7bd29bf" kindref="member">i</ref>].mandatory())<sp/>{</highlight></codeline>
<codeline lineno="158"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tasks.<ref refid="classGecode_1_1Support_1_1BitSetBase_1afeefe511aa558b1571f91d7de74ee1f6" kindref="member">set</ref>(static_cast&lt;unsigned<sp/>int&gt;(e-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a2cc3d960b30f798950597378a7bd29bf" kindref="member">i</ref>));<sp/>ccur<sp/>+=<sp/>t[e-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a2cc3d960b30f798950597378a7bd29bf" kindref="member">i</ref>].c();</highlight></codeline>
<codeline lineno="159"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="160"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Process<sp/>events<sp/>for<sp/>completion<sp/>of<sp/>task</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="161"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<sp/>;<sp/>(e-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a016f54892fc82584c8d492955ded17b9" kindref="member">t</ref><sp/>==<sp/>time)<sp/>&amp;&amp;<sp/>(e-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a453c511eb7f69dbbbcd7709987e9bfb9" kindref="member">e</ref><sp/>==<sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172ca2147820b78626af3e4517bbbb4f0efa7" kindref="member">Event::LCT</ref>);<sp/>e++)</highlight></codeline>
<codeline lineno="162"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tasks.<ref refid="classGecode_1_1Support_1_1BitSetBase_1afbe1fe7346b3bb27d0cc8cb268819772" kindref="member">clear</ref>(static_cast&lt;unsigned<sp/>int&gt;(e-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a2cc3d960b30f798950597378a7bd29bf" kindref="member">i</ref>));</highlight></codeline>
<codeline lineno="163"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Process<sp/>events<sp/>for<sp/>start<sp/>of<sp/>task</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="164"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<sp/>;<sp/>(e-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a016f54892fc82584c8d492955ded17b9" kindref="member">t</ref><sp/>==<sp/>time)<sp/>&amp;&amp;<sp/>(e-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a453c511eb7f69dbbbcd7709987e9bfb9" kindref="member">e</ref><sp/>==<sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172ca2dd4c0769bd20d1855a039fd9e2b9634" kindref="member">Event::EST</ref>);<sp/>e++)</highlight></codeline>
<codeline lineno="165"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tasks.<ref refid="classGecode_1_1Support_1_1BitSetBase_1afeefe511aa558b1571f91d7de74ee1f6" kindref="member">set</ref>(static_cast&lt;unsigned<sp/>int&gt;(e-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a2cc3d960b30f798950597378a7bd29bf" kindref="member">i</ref>));</highlight></codeline>
<codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Process<sp/>events<sp/>for<sp/>zero-length<sp/>task</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="167"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<sp/>;<sp/>(e-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a016f54892fc82584c8d492955ded17b9" kindref="member">t</ref><sp/>==<sp/>time)<sp/>&amp;&amp;<sp/>(e-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a453c511eb7f69dbbbcd7709987e9bfb9" kindref="member">e</ref><sp/>==<sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172ca4f4555ca419b05340e1e4fe24459cfc2" kindref="member">Event::ZRO</ref>);<sp/>e++)<sp/>{</highlight></codeline>
<codeline lineno="168"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ccur<sp/>-=<sp/>t[e-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a2cc3d960b30f798950597378a7bd29bf" kindref="member">i</ref>].c();</highlight></codeline>
<codeline lineno="169"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ccur<sp/>&lt;<sp/>cmin)<sp/>cmin=ccur;</highlight></codeline>
<codeline lineno="170"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ccur<sp/>&lt;<sp/>0)</highlight></codeline>
<codeline lineno="171"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5a839b40c2e7ccebb2e61e92e274833089" kindref="member">ES_FAILED</ref>;</highlight></codeline>
<codeline lineno="172"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ccur<sp/>+=<sp/>t[e-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a2cc3d960b30f798950597378a7bd29bf" kindref="member">i</ref>].c();</highlight></codeline>
<codeline lineno="173"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="174"><highlight class="normal"></highlight></codeline>
<codeline lineno="175"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>norun<sp/>start<sp/>time<sp/>for<sp/>0-length<sp/>tasks</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="176"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>zltime<sp/>=<sp/>time;</highlight></codeline>
<codeline lineno="177"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Process<sp/>events<sp/>for<sp/>start<sp/>of<sp/>required<sp/>part</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="178"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<sp/>;<sp/>(e-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a016f54892fc82584c8d492955ded17b9" kindref="member">t</ref><sp/>==<sp/>time)<sp/>&amp;&amp;<sp/>(e-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a453c511eb7f69dbbbcd7709987e9bfb9" kindref="member">e</ref><sp/>==<sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a050b9491ba6c775cabdcf9d3ddae172cab255607798058782db3970c10687b39e" kindref="member">Event::ERT</ref>);<sp/>e++)<sp/></highlight></codeline>
<codeline lineno="179"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t[e-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a2cc3d960b30f798950597378a7bd29bf" kindref="member">i</ref>].mandatory())<sp/>{</highlight></codeline>
<codeline lineno="180"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tasks.<ref refid="classGecode_1_1Support_1_1BitSetBase_1afbe1fe7346b3bb27d0cc8cb268819772" kindref="member">clear</ref>(static_cast&lt;unsigned<sp/>int&gt;(e-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a2cc3d960b30f798950597378a7bd29bf" kindref="member">i</ref>));<sp/></highlight></codeline>
<codeline lineno="181"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ccur<sp/>-=<sp/>t[e-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a2cc3d960b30f798950597378a7bd29bf" kindref="member">i</ref>].c();</highlight></codeline>
<codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ccur<sp/>&lt;<sp/>cmin)<sp/>cmin=ccur;</highlight></codeline>
<codeline lineno="183"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>zltime<sp/>=<sp/>time+1;</highlight></codeline>
<codeline lineno="184"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ccur<sp/>&lt;<sp/>0)</highlight></codeline>
<codeline lineno="185"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5a839b40c2e7ccebb2e61e92e274833089" kindref="member">ES_FAILED</ref>;</highlight></codeline>
<codeline lineno="186"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t[e-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a2cc3d960b30f798950597378a7bd29bf" kindref="member">i</ref>].optional()<sp/>&amp;&amp;<sp/>(t[e-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a2cc3d960b30f798950597378a7bd29bf" kindref="member">i</ref>].c()<sp/>&gt;<sp/>ccur))<sp/>{</highlight></codeline>
<codeline lineno="187"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK(t[e-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a2cc3d960b30f798950597378a7bd29bf" kindref="member">i</ref>].excluded(home));</highlight></codeline>
<codeline lineno="188"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="189"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="190"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Exploit<sp/>that<sp/>tasks<sp/>are<sp/>sorted<sp/>according<sp/>to<sp/>capacity</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="191"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<ref refid="classGecode_1_1Iter_1_1Values_1_1BitSet" kindref="compound">Iter::Values::BitSet</ref>&lt;<ref refid="classGecode_1_1Support_1_1BitSet" kindref="compound">Support::BitSet&lt;Region&gt;</ref><sp/>&gt;<sp/>j(tasks);<sp/></highlight></codeline>
<codeline lineno="192"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>j()<sp/>&amp;&amp;<sp/>(t[j.val()].c()<sp/>&gt;<sp/>ccur);<sp/>++j)<sp/></highlight></codeline>
<codeline lineno="193"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Task<sp/>j<sp/>cannot<sp/>run<sp/>from<sp/>time<sp/>to<sp/>next<sp/>time<sp/>-<sp/>1</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="194"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t[j.val()].mandatory())<sp/>{</highlight></codeline>
<codeline lineno="195"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t[j.val()].pmin()<sp/>&gt;<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="196"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK(t[j.val()].norun(home,<sp/>time,<sp/>e-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a016f54892fc82584c8d492955ded17b9" kindref="member">t</ref><sp/>-<sp/>1));</highlight></codeline>
<codeline lineno="197"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="198"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK(t[j.val()].norun(home,<sp/>zltime,<sp/>e-&gt;<ref refid="classGecode_1_1Int_1_1Cumulative_1_1Event_1a016f54892fc82584c8d492955ded17b9" kindref="member">t</ref><sp/>-<sp/>1));</highlight></codeline>
<codeline lineno="199"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="200"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="201"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="202"><highlight class="normal"></highlight></codeline>
<codeline lineno="203"><highlight class="normal"><sp/><sp/><sp/><sp/>GECODE_ME_CHECK(c.gq(home,cmax-cmin));</highlight></codeline>
<codeline lineno="204"><highlight class="normal"></highlight></codeline>
<codeline lineno="205"><highlight class="normal"><sp/><sp/><sp/><sp/>subsumed<sp/>=<sp/>assigned;</highlight></codeline>
<codeline lineno="206"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5ac32341b682bca52b8617a8ad004023ef" kindref="member">ES_NOFIX</ref>;</highlight></codeline>
<codeline lineno="207"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="208"><highlight class="normal"></highlight></codeline>
<codeline lineno="209"><highlight class="normal">}}}</highlight></codeline>
<codeline lineno="210"><highlight class="normal"></highlight></codeline>
<codeline lineno="211"><highlight class="normal"></highlight><highlight class="comment">//<sp/>STATISTICS:<sp/>int-prop</highlight><highlight class="normal"></highlight></codeline>
</programlisting>
<location file="/usr/include/gecode/int/cumulative/basic.hpp"/>
</compounddef>
</doxygen>