Block-Flow: define expected behaviour for Epoch association
...how new Activities are placed into Epochs, incl. overflow
This commit is contained in:
parent
d0fd7f32a9
commit
7167ad6d96
2 changed files with 85 additions and 20 deletions
|
|
@ -205,17 +205,79 @@ namespace test {
|
|||
|
||||
|
||||
/** @test TODO place Activity record into storage
|
||||
* @todo WIP 7/23 ⟶ 🔁define ⟶ implement
|
||||
* @todo WIP 7/23 ⟶ ✔define ⟶ 🔁implement
|
||||
*/
|
||||
void
|
||||
placeActivity()
|
||||
{
|
||||
BlockFlow bFlow;
|
||||
|
||||
Time t1 = Time{ 0,10};
|
||||
Time t2 = Time{500,10};
|
||||
Time t3 = Time{ 0,11};
|
||||
|
||||
auto& a1 = bFlow.until(t1).create();
|
||||
CHECK (watch(bFlow).allEpochs() == "10:200"_expect);
|
||||
CHECK (watch(bFlow).find(a1) == "10:200"_expect);
|
||||
|
||||
auto& a3 = bFlow.until(t3).create();
|
||||
CHECK (watch(bFlow).allEpochs() == "10:200|10:400|10:600|10:800|11:00"_expect);
|
||||
CHECK (watch(bFlow).find(a3) == "11:000"_expect);
|
||||
|
||||
auto& a2 = bFlow.until(t2).create();
|
||||
CHECK (watch(bFlow).allEpochs() == "10:200|10:400|10:600|10:800|11:00"_expect);
|
||||
CHECK (watch(bFlow).find(a2) == "11:600"_expect);
|
||||
|
||||
Time t0 = Time{0,5};
|
||||
|
||||
auto& a0 = bFlow.until(t0).create();
|
||||
CHECK (watch(bFlow).allEpochs() == "10:200|10:400|10:600|10:800|11:00"_expect);
|
||||
CHECK (watch(bFlow).find(a2) == "10:200"_expect);
|
||||
|
||||
BlockFlow::AllocatorHandle allocHandle = bFlow.until(Time{300,10});
|
||||
for (uint i=1; i<Epoch::SIZ(); ++i)
|
||||
allocHandle.create();
|
||||
|
||||
CHECK (allocHandle.currDeadline() == Time(400,10));
|
||||
CHECK (not allocHandle.hasFreeSlot());
|
||||
|
||||
auto a4 = allocHandle.create();
|
||||
CHECK (allocHandle.currDeadline() == Time(600,10));
|
||||
CHECK (allocHandle.hasFreeSlot());
|
||||
CHECK (watch(bFlow).find(a2) == "10:600"_expect);
|
||||
|
||||
for (uint i=1; i<Epoch::SIZ(); ++i)
|
||||
allocHandle.create();
|
||||
|
||||
CHECK (allocHandle.currDeadline() == Time(800,10));
|
||||
|
||||
auto& a5 = bFlow.until(Time{220,10}).create();
|
||||
CHECK (watch(bFlow).find(a5) == "10:600"_expect);
|
||||
|
||||
allocHandle = bFlow.until(Time{900,10});
|
||||
for (uint i=1; i<Epoch::SIZ(); ++i)
|
||||
allocHandle.create();
|
||||
|
||||
CHECK (not allocHandle.hasFreeSlot());
|
||||
auto& a6 = bFlow.until(Time{850,10}).create();
|
||||
CHECK (watch(bFlow).find(a6) == "11:150"_expect);
|
||||
CHECK (watch(bFlow).allEpochs() == "10:200|10:400|10:600|10:800|11:00|11:150"_expect);
|
||||
|
||||
auto& a7 = bFlow.until(Time{500,11}).create();
|
||||
CHECK (watch(bFlow).find(a6) == "11:600"_expect);
|
||||
CHECK (watch(bFlow).allEpochs() == "10:200|10:400|10:600|10:800|11:00|11:150|11:300|11:450|11:600"_expect);
|
||||
|
||||
bFlow.discardBefore (Time{999,10});
|
||||
CHECK (watch(bFlow).allEpochs() == "11:00|11:150|11:300|11:450|11:600"_expect);
|
||||
|
||||
auto& a8 = bFlow.until(Time{500,10}).create();
|
||||
CHECK (watch(bFlow).find(a6) == "11:150"_expect);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** @test TODO load based regulation of Epoch spacing
|
||||
* @todo WIP 7/23 ⟶ define ⟶ implement
|
||||
* @todo WIP 7/23 ⟶ 🔁define ⟶ implement
|
||||
*/
|
||||
void
|
||||
adjustEpochs()
|
||||
|
|
|
|||
|
|
@ -78885,25 +78885,28 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1689199616791" ID="ID_752152349" MODIFIED="1689200031345" TEXT="placeActivity">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1689202512708" ID="ID_101278669" MODIFIED="1689202518059" TEXT="in leeren BlockFlow">
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1689199616791" ID="ID_752152349" MODIFIED="1689303038986" TEXT="placeActivity">
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1689202512708" ID="ID_101278669" MODIFIED="1689303033032" TEXT="in leeren BlockFlow">
|
||||
<icon BUILTIN="pencil"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1689202522354" ID="ID_523714574" MODIFIED="1689303033031" TEXT="für Vergangenheit">
|
||||
<icon BUILTIN="pencil"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1689202560123" ID="ID_827332375" MODIFIED="1689303033031" TEXT="zu bestehenden Epochen">
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1689303110181" ID="ID_97036563" LINK="#ID_1494295782" MODIFIED="1689303132165" TEXT="brauche Diagnostic für die reale Epochen-Zuordnung">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1689202522354" ID="ID_523714574" MODIFIED="1689202553439" TEXT="für Vergangenheit">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1689202560123" ID="ID_827332375" MODIFIED="1689202571882" TEXT="zu bestehenden Epochen">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1689202576227" ID="ID_1382030737" MODIFIED="1689303033031" TEXT="in die Zukunft">
|
||||
<icon BUILTIN="pencil"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1689202576227" ID="ID_1382030737" MODIFIED="1689202581299" TEXT="in die Zukunft">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1689202597977" ID="ID_1853102157" MODIFIED="1689303033030" TEXT="Overflow zu nächster Epoche">
|
||||
<icon BUILTIN="pencil"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1689202597977" ID="ID_1853102157" MODIFIED="1689202608256" TEXT="Overflow zu nächster Epoche">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1689202609159" ID="ID_985814955" MODIFIED="1689202622069" TEXT="Overflow zukünftige Epoche">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1689202609159" ID="ID_985814955" MODIFIED="1689303033030" TEXT="Overflow zukünftige Epoche">
|
||||
<icon BUILTIN="pencil"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1689203745600" ID="ID_838958031" MODIFIED="1689203950019" TEXT="adjustEpochs">
|
||||
|
|
@ -79993,7 +79996,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1688554963598" ID="ID_708490850" MODIFIED="1688554971708" TEXT="Füllstand der Epoche">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node CREATED="1688554972581" ID="ID_278561305" MODIFIED="1688554979689" TEXT="wird auch im EpochGate abgelegt"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1688777569396" ID="ID_1723162290" MODIFIED="1688777606098" TEXT="schwierig... Platz fehlt">
|
||||
<node BACKGROUND_COLOR="#e0ceaa" COLOR="#690f14" CREATED="1688777569396" ID="ID_1723162290" MODIFIED="1689303080773" TEXT="schwierig... Platz fehlt">
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
<node CREATED="1688777608247" ID="ID_459855386" MODIFIED="1688777620049" TEXT="Activities sind bewußt sehr knapp bemessen"/>
|
||||
<node CREATED="1688777622037" ID="ID_900655074" MODIFIED="1688777808298" TEXT="die beiden Felder vom Gate werden hier definitiv benötigt">
|
||||
|
|
@ -80010,13 +80013,13 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
<arrowlink COLOR="#537a8e" DESTINATION="ID_253828146" ENDARROW="Default" ENDINCLINATION="399;21;" ID="Arrow_ID_1328212863" STARTARROW="None" STARTINCLINATION="508;-25;"/>
|
||||
<icon BUILTIN="info"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1688777811931" ID="ID_1249055593" MODIFIED="1688855648245" TEXT="bleibt nur der next-Pointer....">
|
||||
<node COLOR="#435e98" CREATED="1688777811931" ID="ID_1249055593" MODIFIED="1689303078316" TEXT="bleibt nur der next-Pointer....">
|
||||
<linktarget COLOR="#5d59c8" DESTINATION="ID_1249055593" ENDARROW="Default" ENDINCLINATION="-17;-67;" ID="Arrow_ID_246272817" SOURCE="ID_250176571" STARTARROW="None" STARTINCLINATION="115;9;"/>
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<icon BUILTIN="idea"/>
|
||||
<node COLOR="#5b280f" CREATED="1688777836110" ID="ID_526522381" MODIFIED="1688777868460" TEXT="schwierig... soll ich den jetzt »umfunktionieren«?">
|
||||
<icon BUILTIN="button_cancel"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1688777870348" ID="ID_573178945" MODIFIED="1688777913750" TEXT="nein: sauber ist nur ein Pointer (auf den nächsten freien Slot)">
|
||||
<node COLOR="#435e98" CREATED="1688777870348" ID="ID_573178945" MODIFIED="1689303072133" TEXT="nein: sauber ist nur ein Pointer (auf den nächsten freien Slot)">
|
||||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
<node CREATED="1688777914661" ID="ID_1672637364" MODIFIED="1688777925779" TEXT="das läuft auf sowas wie einen Iterator hinaus">
|
||||
|
|
|
|||
Loading…
Reference in a new issue