I need to add a number from a bundle until it gets to a certain point then stop. Say I have 4 bundles with 1,2,4,8 and I need to make the number equal to 7. How would I add each bundle one by one and move on to the next step when the combined value equals 7, aka only the first 3 bundles pass through while the last gets discarded
1st bundle
1 !>= 7
2nd bundle
1+2 !>= 7
3rd bundle
1+2+4 >= 7
Since equal or greater stop accepting bundles and move to next step
Here is a coding example
Output:
Solved! Go to Solution.
Views
Replies
Total Likes
(Reposting here, as it's a more applicable forum)
While I have about a million questions about this, I'll refrain myself.
Assuming that your fusion is structured like your code snippet...
1. Iterate thru your bundles
2. Have a get variable module, variable = {testValue}
3. Have a filter for {testValue} <= 7
4. Do whatever needs doing
5. Have a set variable module, variable = {testValue}, value = {testValue from 2} + {value from iterator}
6. Aggregator linked to your iterator
(Reposting here, as it's a more applicable forum)
While I have about a million questions about this, I'll refrain myself.
Assuming that your fusion is structured like your code snippet...
1. Iterate thru your bundles
2. Have a get variable module, variable = {testValue}
3. Have a filter for {testValue} <= 7
4. Do whatever needs doing
5. Have a set variable module, variable = {testValue}, value = {testValue from 2} + {value from iterator}
6. Aggregator linked to your iterator
I'm not so sure that I understand your implementation. What questions do you have? I basically need to find a combination of hours from an hours object that totals to a certain number. In the example I gave it was 1,2,3.
Ex.
{testValue} = 0
Bundle 1
{testValue} 1 >= 7
Bundle 2
{testValue} 1+2 >= 7
Bundle 3
{testValue} 1+2+4 >= 7
Bundle 4
{testValue} 1+2+4+8 !>= 7
It doesn't matter to me that all of the bundles get executed I just need to know how to stop at bundle 3 in the execution
Views
Replies
Total Likes
Right, the process that I put in (the numbered list) will do that.
Views
Replies
Total Likes
Disregard my last post, I got your solution working with some tweaking. Thank you so much, you're such a big help! I wasn't very familiar with the get variable module, I had no idea that it would be able to store states between bundles!
Excellent, glad you got it working!
Views
Likes
Replies
Views
Likes
Replies