Transitioning from LpSolve to Gurobi - Need Help Building Model 4 layers
Hi Team,
I'm transitioning from LpSolve in R to Gurobi in Python because of its computational power and capabilities. I've also convinced some clients to use Gurobi for its advantages.
However, as a Gurobi beginner, I'm facing challenges in building the model despite watching training videos and exploring code examples for the past two days.
Problem Description:
I'm aiming to maximize the net revenue of third-party companies after accounting for advertising spending costs. Their net revenue is based on commissions received from brands/suppliers.
Key Metrics:
- GMV: Gross Merchandising Value
- NMV: Net Merchandising Value (after cancellation/return)
- pct_cms_nmv: Commission percentage (received from brand/suppliers) (calculated on NMV)
- pct_ml_sharing: Proportion of commission received by the company (e.g., 100% for full-time employees)
- pct_ad_gmv: GMV generated through Ads
- roas: Return on Ads Spend
Net Revenue Formula:
Net Revenue = gmv * pct_nmv * pct_cms_nmv * pct_ml_sharing - (pct_ads_gmv * gmv) / roas
Modeling Challenges:
- Structure: I'm having difficulty formulating the problem considering four layers: creator_type, class, content_type, and category. Each combination has different commission rates and other values.
- Objective Function: While I've seen examples using single indices (I, j), I'm unsure how to define the objective function with relevant coefficients for the four-layer structure.
- Constraints: I'm particularly interested in building constraints that focus only on full-time creators (creator_type) and live stream content (class). However, I'm unsure of the syntax for this.
Request for Assistance:
I'd greatly appreciate your help in overcoming this steep learning curve. Specifically, I would be grateful for guidance on:
- Building the model considering the four-layer structure.
- Defining the objective function with relevant coefficients for each layer.
- Constructing constraints to focus on full-time creators and live-stream content. For example: Their total revenue could not exceed 50% of total gmv.
Additional Information:
I've attached the minimal reproducible example here
Thank you for your support!
Please sign in to leave a comment.
Comments
0 comments