简体   繁体   中英

pulp interdependent constraints

Trying to solve the following problem using PuLP package, but don't know how to add interdependent constraints between Adwords and SEO channels.

Maximize total revenue. We are to allocate funds to 4 marketing campaigns: a TV ad, SEO,Adwords and Facebook. ROI on each campaign is: 9% on TV 14% on SEO 10% on Adwords 5% on Facebook. The total budget is $1,000,000. Search Engine Marketing (SEO + Adwords) is the primary focus and spend must exceed 60% of the total budget. Social media campaign on Facebook should cost no more than 20% of the budget. Production and airing of a TV ad will cost a minimum of $200,000. Minimal contract with a social agency for Facebook advertising is $80,000. An SEO content creation agency needs between 60,000and60,000and 220,000. The marketing strategy says that Adwords cost should be no more 3 times the SEO costs. Channels have varying reach. It has been estimated using the number of customers you can reach by spending $1 in each channel: TV – 2.5 customers-per-dollar SEO – 2.1 customers-per-dollar Adwords – 0.9 customers-per-dollar Facebook – 3.0 customers-per-dollar The number of customers in the market base is estimated to be around 1.3 million people. You should allocate spend to match that number with campaign reach.

When I add the non-numeric constraint, it replaces my objective function. How can I add interdependent constraints in PuLP?

adwords = LpVariable("adwords", 0, 1000)
SEO = LpVariable("SEO", 0, 1000)

prob = LpProblem("problem", LpMaximize)

prob += adwords <= 3*SEO

This shouldn't replace your objective function as it contains the '<='. Fill in the rest as usual.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM