Absolute value to linear program

gdespont

New Member
Joined
Mar 29, 2013
Messages
3
Hi,

I have to convert the first to the second program, but i don't know how to do this:
MAD.png

ABStolinear.xlsx: the first sheet is the first program which is correct (i think), the second sheet is a failed attempt to write the second program
Can somebody please help me out?

Gilles
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Not that i exactly understand your problem. If ABS is correct why would you want to do it in another way?

In sheet linear, is it only about the values with an arrow next to them? Why not use the ABS() function? Else you need
=if(h12<0, -h12,h12) in I12
 
Upvote 0
That's the frustrating thing, it works with ABS but I can't use it because i need the program to be linear (comparison between a quadratic and a linear program for my thesis).
It's not clear in excel, but the arrows mean "smaller or equal". The cells H12:K16 represent the constraints:
Yt >= sum (Ait*x)
Yt >= -sum (Ait*x)

To simply explain what i try to do: I know that i can change a non-linear program with an absolute value to a linear program in the following way:

min abs (b)

to

min a

with constraints:
a >= b
a >= -b

where in my model a = Yt and b = Ait*x.
But i don't know how to apply this to my model in excel.
 
Last edited:
Upvote 0
min a

with constraints:
a >= b
a >= -b
Are you sure about your constraints? Are they meant to be applied at the same time? If so, then I would point out that if a >= b then by definition it is also automatically greater than (or equal to if b=0) -b. Did you perhaps switch the comparison operator symbol in that first one and actually meant these for your constraints?

a <= b
a >= -b
 
Upvote 0
Sorry, but this type of math was too long ago for me.
 
Upvote 0
Are you sure about your constraints? Are they meant to be applied at the same time? If so, then I would point out that if a >= b then by definition it is also automatically greater than (or equal to if b=0) -b. Did you perhaps switch the comparison operator symbol in that first one and actually meant these for your constraints?

a <= b
a >= -b
No, because b can also be negative.
The result of these constraints is that a >= abs (b), but since we minimize it, it is actually equivalent to min abs (b).

@sijpie: Thanks anyway.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,221,556
Messages
6,160,476
Members
451,649
Latest member
fahad_ibnfurjan

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