Handling Collections in Corticon

Use Case

Scenarios

  • Case 1 all items are in one collection; rules separate into two (or more) collections
  • Case 2 items in two collections, rule exchange items according to some rules; Some rules move items out, some move items in
  • Case 3 Items are not in any collection; rules determine what collections are needed and then distribute the items into those collections
  • Case 4 items are in more than two collections; rules move items around; Single feature, Multiple features 

Simple (Unconditional) Move

All items in the origin set are moved to the destination set

  

Conditional Move

Only items with a value greater than 9 are moved to the destination set.

  

Move one in, Take one out

Additionally destination items with value greater than 19 are removed from the set (but NOT removed from memory).

If you want to remove them from memory then use destination.remove

   

Swapping Items (with static criteria)

Suppose we have two collections of items and we want to make sure that one collection has all the small value items and the other has the high value items.

Swapping Items (with static criteria)

I.e. the process of moving items around will change the criteria for subsequent items.

Move an item from one set to another if it increases the average value of both sets.