Hi,
You do not need to create new key figure function.
You can create new order categories for your different types of requirement, and create new key figures to display them. (Which order categories to display in a key figure is controlled by the "category group" setting.)
What optimizer recognize are some key figures like "stock on hand", "supply shortage" or "safety stock" and "reorder point" which are all with standard key figure function.
What you need to do is to add your key figures in the macro that calculate the stock relevant key figures. (Standard macro is "stock balance").
Best Regards,
Ada