Constructor to FML Translation

Subscribe to Constructor to FML Translation 3 posts, 2 voices

 
?path=bbsim&height=32 Basic Busine... 173 posts Trying to understand the FML syntax...

Constructor equations is:

ProductClass=Good,Better,Best)
i=ProductClass
ActualCompletedSales*AdjProductPurchasesByClass(i)*MeanItemsPerCustomerForSalesMade

Corresponding FML equation (after being imported) is:

FOREACH(i, ProductClass, IF((ActualCompletedSales * AdjProductPurchasesByClass[i] * MeanItemsPerCustomerForSalesMade)<0, (ActualCompletedSales * AdjProductPurchasesByClass[i] * MeanItemsPerCustomerForSalesMade, 1), (ActualCompletedSales * AdjProductPurchasesByClass[i] * MeanItemsPerCustomerForSalesMade)))

How did the IF function make its way in there, and what purpose does it serve?

Thank you,

Bill
 
?path=wglass&height=32 Will Glass-H... Administrator 207 posts Hi Bill,

I'm not sure off hand.  If you email the complete Constructor model (text equations) to support@forio.com we can take a look.  There's a couple of cases where IF is introduced -- for example if you use the INT function.  (because Forio rounds down for negative numbers and Constructor rounds up).  Another is if the Constructor expression uses guards (specific functions for specific values).  I don't see either of those here.
 
?path=bbsim&height=32 Basic Busine... 173 posts Thanks, Will, that hits the nail on the head. For different reasons I had already removed the INT and CEIL and FLOOR functions, which explains why they are not there. The round up/round down issue explains why the IF statement is introduced. That should do it.

Bill

Please log in to reply to topics.

Forums Support