diff --git a/AlgebraicDataflowArchitectureModel/models/InventoryManagement.model b/AlgebraicDataflowArchitectureModel/models/InventoryManagement.model index 31bcdad..424e589 100644 --- a/AlgebraicDataflowArchitectureModel/models/InventoryManagement.model +++ b/AlgebraicDataflowArchitectureModel/models/InventoryManagement.model @@ -4,7 +4,7 @@ } channel ReceivingOrShipping(itemId:Str) { - out inventory.{itemId}.count(prev_quantity:Int, receiveOrShip(quantity:Int)) = if(prev_quantity + quantity >= 0, + out inventory.{itemId}.count(prev_quantity:Int, receiveOrShip(quantity:Int)) = if((prev_quantity + quantity) >= 0, prev_quantity + quantity, prev_quantity) }