Skip to content
Snippets Groups Projects
Commit e39d10a1 authored by Peter Sherwood's avatar Peter Sherwood Committed by Frank Winklmeier
Browse files

Start work on optimizing of how job groups propagate up a hypo tree.

Job group propagation is correct but inefficient in the presence of identical  conditions.

Jet group propagation is currently handled in the following manner.

Let a parent condition P have n siblings: S_1... S_n
Let J_1... J_2 be the jet groups that pass each  of the n siblings.
JetGroupProduct finds all the distinct job groups formed by selecting one jet group from is taken fron each of
the J_i. Only distinct jet groups are retained. Distinct job groups are those obtained by flattening the JobGroup
calculated by the combination process, and discounting differences due to the order of the jets.

When the siblings are identical Conditions, the same jets pass each of the conditions. The combination process
can be optimized. The optimazation exploits the repetion that is _always_ present for identical Conditions.

As an example, let J_1 = J_2 = J_3 = {1,2,3}. Then the combinations are	- excluding repeated jets - {1,2,3}, {1,3,2},
{2, 1, 3}, {2, 3, 1}, {3, 1, 2}, {3, 2, 1}. After repetition removal, we are left with {1,2,3}. Further we only need to
look at jets passing C_1.

This optimatiztion replaces n repeated Conditions of capacity = 1 by a single Condition of capacity n.
After initially allocating jets to Conditions, a further test needs now to be made: were there enough distinct
jets to satisfy the n conditions - i.e. were there at least n jets fulfilling the condition.

To this end, the IConditionMT interface is extended by ICheckedCapacityCondition. This PABC provides a checking function:

bool capacitySatisfied(const HypoJetVector&,..)

 which will be passed the selected jets as an argument.

Currently, the sole implementation is CheckedCapacityCondition.

This commit uses this CheckedCapacityCondition. However the hypo trees remain as before, and no checks are made.
It is therefor expected that they will be no visible effects at this stage.
parent d4b3d15e
No related branches found
No related tags found
No related merge requests found
Showing
with 1682 additions and 915 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment