i'm needing help with a problem in non linear programming and i would appreciate if you could help me.
In the problem, i have the price per unit of a product i (i have four types of products) and i know they are constant. I also have a restriction on the quantity of material that i can use to produce each type i of product. That takes me to think that my variables are quantity of each product to produce. The proble is on the cost. The problem gives me the cost of producing xi units, which is ki*xi^2, where ki is known. So, i don't know how to proceed, because if i define the variables as quantity to produce, and my objective function as maximize (price-cost)*quantity then that means that the cost would be multiplied by xi, but is already a function of xi, and also is ^2.
I think i should just put the cost as it is in the objective function, but i'm not sure. Thanks very much for the help guys.
The objective would become $$\max \sum_i \left( p_i \cdot x_i - k_i\cdot x_i^2 \right)$$ Add capacity constraints, non-negativity restrictions etc. Solve with a QP or general NLP solver.