on 2023 Jan 19 7:26 AM
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%.
Request clarification before answering.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
6 | |
4 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.