# Profit Optimization in Python with Difficult Constraints to Maximize Net Revenue

I am currently trying to work on this problem that determines the best constraints on how to place these 'bids'- please see the second column in the screenshot: The ask at hand is to uncover a model or set of rules on how to place these 'bids' to maximize the amount of net revenue. The way that generating profits is that a bid is placed at a FIXED price- which is either $$\\\3$$, $$\\\35$$, $$\\\50$$, or $$\\\75$$. Revenue is generated when the bid is accepted (when the value in the accepted column is $$1$$). Once the bid is accepted, the revenue is a product of the expected revenue and the expected conversion for each line.

Simply put, here is an example, if we place a bid of $$\\\35$$ and it is accepted the profit would be the $$(expected\_revenue \cdot expected\_conversion) - \\\35$$. Those entries where the bids are not excepted (value of $$0$$) have no revenue nor costs, so here's how the profit would be calculated per bid...

$$(accepted\_bid \cdot expected\_revenue \cdot expected\_conversion) - bid\_price$$.

My problem with figuring out how to tackle these lies in the below constraints/context:

1. The likelihood of a bid being 'accepted' (equal to 1) increases as the bid price increases, and the value of the accepted_bid field can be EITHER $$0$$ or $$1$$
2. This set of data has both leads where bids were placed as well as those that weren't- I'm not exactly sure how to work with these as if no bid is place it automatically isn't accepted (0)
3. The quantity of bids purchased must be within $$\pm 2\%$$ of the quantity of bids in this data set
4. The number of leads we expect to see over time are the same amount in the data set e. The bid NEEDS to be either $$\\\3$$, $$\\\35$$, $$\\\50$$ or $$\\\75$$

I was thinking about building a model with PuLP, but it doesn't look like it is possible with these given constraints (unless it is).

Can PuLP be used to define rules? What model should I employ?

• What is the rule/formula that determines if a bid will be accepted or not? - I might be missing something but it looks like you haven't fully explained how bids will be accepted, which makes it difficult to understand what strategy to employ. Aug 3, 2022 at 21:43