Avoiding IF statements and logical tests in LP Solver...

dimat

New Member
Joined
Apr 29, 2013
Messages
1
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!
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top