### Can SAP solve Linear/Integer programming, Or can I use Fiori's Java capability to solve such a prob.

I have a situation where I am looking for solution to solve the Linear Programming /Integer Problem in SAP. For example I have a bunch of Raw materials( chemicals) which can be mixed to to build the final product(mixture).The sales order should be built in a way that it should select the best combinations of the raw materials so that the cost is lowest but still satisfying the customer requirements. Constraints are several attributes of the raw materials as well as the space to store the finished product in sq. feet. I have heard of reuse tools can be used but never used it. Remember some of the value of the finished products will be supplied by the user upfront in the sales orders. The finished product will be created on the fly so MTO situation, however the raw material used to make such a finished product is inventoried and might be sold separately. For example I have Raw Mets ( R1,R2 R3......Rn) with Attributes A1,A2,A3(In %) so raw material will have (R1A1,R1A2,R3A3......R1A10) similarly for R2( R2A1,R2A2,R3A3....R3A10) and R3. All these attributes are stored in material master(Raw materials) as material characteristics and a base cost is maintained say for e.g. R1-\$100 with Attributes A1=2%, A2=5%, A3=7%, R2-\$200 with A2=3%, A4=1% etc. and so on. My input will be total storage space =1000sq ft and attribute A1= 4%,A2=2% and expected the system should produce which material should be picked R1,R2 R3 and how many kgs so that the cost of the order is minimum. The UOM of R1,R2,R3 are in Kgs.

1.Is there any ready made solution in SAP which can solve this type of LPP?

2.As an alternative, Can I code this in Fiori, I mean use Fiori capability to collect the input from users and then using the native Java Ip-Solve and other Java Libraries to solve the LPP.

10|10000 characters needed characters exceeded