Hello all,
I've got a tricky problem for you that requires a clever solution.
I am using the LP Solver to maximize the financial outcome of a factory.
The quantity produced, Q, is the variable.
Constraint: Q >= 0 and Q <= 200
The Revenue, R, is to be maximized.
Very simple, but here's the added difficulty:
The price, P, paid for each unit produced in the market is dependent on the quantity produced.
P1 = $5 for Q <= 100
P2 = $10 for Q >100
The problem I am trying to solve involves many factories with many buyers, each with different costs and willingness to pay, depending on the quantity traded.
But the underlying difficulty I am having with the linear LP solver comes down to how my revenue is calculated.
1st attempt:
used IF statement R=IF(Q<=100,Q*P1,100*P1+(Q-100)*P2)
but LP solver cannot handle IF statements.
2nd attempt:
used logic test instead
A1=(Q<=100) --> returns TRUE or FALSE
A2=(Q>100)
R=A1*Q*P1+A2*(100*P1+(Q-100)*P2) ---> A1 & A2 become 1 or 0 in the formula.
but LP solver does not return the right answer. I suspect it cannot perform the logical test.
This is where I'm at. I know that using the evolutionary solver would give me a good answer. But I want to use the LP Solver.
I've searched all over the internet but cannot seem to find a way around this.
Thank you in advance!
I've got a tricky problem for you that requires a clever solution.
I am using the LP Solver to maximize the financial outcome of a factory.
The quantity produced, Q, is the variable.
Constraint: Q >= 0 and Q <= 200
The Revenue, R, is to be maximized.
Very simple, but here's the added difficulty:
The price, P, paid for each unit produced in the market is dependent on the quantity produced.
P1 = $5 for Q <= 100
P2 = $10 for Q >100
The problem I am trying to solve involves many factories with many buyers, each with different costs and willingness to pay, depending on the quantity traded.
But the underlying difficulty I am having with the linear LP solver comes down to how my revenue is calculated.
1st attempt:
used IF statement R=IF(Q<=100,Q*P1,100*P1+(Q-100)*P2)
but LP solver cannot handle IF statements.
2nd attempt:
used logic test instead
A1=(Q<=100) --> returns TRUE or FALSE
A2=(Q>100)
R=A1*Q*P1+A2*(100*P1+(Q-100)*P2) ---> A1 & A2 become 1 or 0 in the formula.
but LP solver does not return the right answer. I suspect it cannot perform the logical test.
This is where I'm at. I know that using the evolutionary solver would give me a good answer. But I want to use the LP Solver.
I've searched all over the internet but cannot seem to find a way around this.
Thank you in advance!