从总成本计算投标价格

编程入门 行业动态 更新时间:2024-10-23 09:24:27
本文介绍了从总成本计算投标价格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有以下问题需要解决。我有一个总价格来计算投标价格。例如,一个客户愿意支付2000 $的总价格,但是从这个价格,有增加的成本:

I have to following problem to solve. I have to calculate the bidding price from a total price. For example, a client wants to pay 2000$ as a total price, but from this price, there are added costs:

-usage价格是10%,从投标价格以最小的10 $的和最多50 $的

-usage price which is 10% from the bidding price with a minimum of 10$ and a maximum of 50$

-seller价格:2%的投标价格

-seller price: 2% from bidding price

- 增加了价格:5 $ 1和500之间的出价               $ 10为501和1000之间的出价               $ 15 1001和3000之间的出价               20 $的出价超过3000 $

-added price: 5$ for a bid between 1 and 500 10$ for a bid between 501 and 1000 15$ for a bid between 1001 and 3000 20$ for a bid over 3000$

-storing费用:$ 100

-storing cost: 100$

从所有这一切,我要计算的投标价,共计2000 $,例如。我有点不知道如何可以做到这一点。任何人都可以给我一些提示或什么样的算法应该是答案的作品?

from all this, I have to calculate the bidding price for a total of 2000$, for example. I kind of have no clue of how this can be done. Can anyone give me some hints or pieces of answer of what the algorithm should be?

编辑:好我如何计算代数,现在在那里我卡住是如何写的算法,code或伪code。任何人有一个提示?

ok I got how to calculate the algebra, now where i'm stuck is how to write the algorithm in code or pseudo-code. Anyone got a hint?

推荐答案

您可以EX preSS所有这些成本作为投标价格的函数。产生一个巨大的方程也就是所有这些函数的和,解决对于特定最终值,例如:

You can express all those costs as a function of the bid price. Generate a giant equation that is the sum of all those functions and solve for a particular final value, e.g.:

usage cost(bid) = PIN(bid*0.10, 10, 50) seller cost(bid) = bid*.02 added cost(bid) = PIN(ceiling(bid/500)*5, 5, 10) + PIN(ceiling((bid - 1000)/2000)*5, 0, 10) storing cost(bid) = 100

所以最终的成本是一样的东西:

So the final cost is something like:

final cost(bid) = PIN(bid*.1, 10, 50) + pin(ceiling(bid/500)*5, 5, 20) + PIN(ceiling((bid - 1000)/2000)*10, 0, 20) + bid*.02 + 100 + bid

解决一个特定的值,你就大功告成了。

Solve for a particular value and you're done.

例如,如果你想要的总成本为$ 2000中:

For example, if you want the total cost to be $2000:

2000 = PIN(bid*.1, 10, 50) + pin(ceiling(bid/500)*5, 5, 10) + PIN(ceiling((bid - 1000)/2000)*5, 0, 10) + bid*.02 + 100 + bid.

出价必须至少> 1500和< 2000年,工作地非常好,因为我们可以让那些PIN段恒:

Bid must be at least > 1500 and < 2000, which works out nicely since we can make those PIN sections constant:

2000 = 50 + 10 + 5 + 100 + bid*1.02 1835 = bid*1.02 bid = 1799.0196078431372549019607843137

PIN码EX pressions是最难分解出,所以你可能有,直到你得到的东西,缩小了出价要计算的范围内猜测几次。

The PIN expressions are the hardest to factor out, so you might have to guess a few times until you get something that narrows down the range of bids you want to calculate.

更多推荐

从总成本计算投标价格

本文发布于:2023-11-22 05:35:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1616162.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:总成本   价格

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!