Hello,
I am trying to work through a scenario, where an entity can order "sets" of items, but I cannot figure out how to multiply the demand by the sets ordered. I am working with the following example as attached, but I have written an explanation below:
Entity "Order" with the following properties:
* Set (String)
* Sets Ordered (Number)
* Demand (ArrayList)
Stored on the Assign object we have the following attributes:
{ SetBOMs '{"SetA"={"Steel"=5,"Copper"=10},"SetB"={"Steel"=10,"Bronze"=20}}' }
{ AllSets '{"SetA", "SetB"}' }
The assign block that the Order Entity passes through assigns in the order:
Set (1 - "SetA" | 2 - "SetB")
SetsOrdered (random number 1-5)
Demand (this.SetBOMs(this.obj.Set))
However, I cannot figure out any way to multiply each entry in Demand by SetsOrdered - any method using a lambda function only returns a map, and not an ArrayList.
My question is if it is even possible to implement this behavior with ArrayLists- if not the other option would be to store demands as a 2D matrix, or two separate properties (like DemandQty and DemandPart).
Any insight is appreciated.