cancel
Showing results for 
Search instead for 
Did you mean: 

PaPM - Linear Programming Optimization

olica
Explorer
0 Kudos
553
Hello! I would like to know if it is possible to solve linear programming problems in PaPM?

I need to calculate the optimal Transfer Price given a set of constrains. For reference, this problems are solve in Excel with the Solver Add-in.

Example: What is the optimal TP if the TP can only increase/decrease 20% relatively to the previous period price and the Operation Margin should be 10%.

Accepted Solutions (0)

Answers (2)

Answers (2)

ZYT
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi olica,

There are first two options for your consideration: First one is HANA Optimization Function Library (OFL). Since the optimization problems are commonly linear and they can be derived to solve a matrix problem, HANA Predictive Analysis Library (PAL), e.g. regression, may also help. Both would require you to first create HANA procedures outside PaPM (e.g. in HANA studio), then integrate them in your PaPM model via "Remote Function Adapter - HANA procedures".

More interesting and easier approach would be to leverage the remote function adapter of R Script type: You may use R libraries to solve linear programming problems, for instance LPSolve (free), Gurobi (commercial), etc.

Soon some colleagues of mine will publish a blog to share their experience and insights of the third approach.

I hope this would be hlepful.

Best regards,

Zhiyi Tang

olica
Explorer
0 Kudos

Thank you Zhiyi !!

It is very helpful!

Would love if you can let me know when your colleagues will publish the article. I will have to start implementing this soon also.

Kind regards,

Andres

olica
Explorer
0 Kudos

Dear Novak, thanks for your swift reply!

I attached the photo of an example and the .txt file with the data.

I short question is, does PaPM have a solver integrated?

Answering your questions:

1. Your formula is correct. The example I just provided in simple. I need to achieve a target amount of sales and I can add a Markup % to the sales to increase/decrease them. So my objective function is Price * (1+ Mark up %). Therefore, the decision variable is the Mark Up %.

2. The constrain is that the Mark Up can not be higher than 15%

3. In the previous example that I gave, yes we have info about the previous price. But let's examine first this easy example.

4. This is the dummy data -> papm-optimization-example-1-data.txt

5. I am using PaPM On-Premise

ZYT
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi olica,

I just realized your example might be a little bit trivial, because the total sales is a monotonous function in each mark up decision variable. When the actual price and quantity are fixed, the maximum of total sales lies at the upper boundary of each mark up variable, i.e. 15%.

Best regards,

Zhiyi

olica
Explorer
0 Kudos

Indeed. I made the example very simple. But I actually need to calculate the TP on grade level based of forecast.

Kr,

Andres