Message Boards Message Boards

0
|
5781 Views
|
4 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Optimization of Matrix-valued function

Posted 11 years ago
Is there any way that I can optimize (Minimize) to solve a problem which might contain matrix as an input. e.g. in the figure equation number 9 is a relation which depends upon K and other matrices. K (matrix) further is scalled by some other values of P_i. is it possible to find minimum values of p_i which may satisfy the relation in 9. in short to minimize equation 9.
Attachments:
POSTED BY: Usman Rauf
4 Replies
Posted 11 years ago
In[1]:= Timing[ NMinimize[{Abs[
...all of your expression unchanged until I change the last line to...
   a>0 && b>0 && c>0 && d>0 && e>0 && f>0}, {a, b, c, d, e, f}, Method -> "RandomSearch"]]

Out[1]= {2.074813, {7.76376, {a -> 1., b -> 2., c -> 3., d -> 4., e -> 3.16253, f -> 5.4614}}}
So in two seconds on a modest machine NMinimize and RandomSearch provides you an approximate solution.

Is this sufficient?

If I try it without the RandomSearch option then it returns
Out[2]= {0.608404, {9.25992, {a -> 1., b -> 2., c -> 3., d -> 4., e -> 0.794416, f -> 1.40992}}}
More than three times faster, but with a substantially worse minimum. You can explore the other options if you look behind Details and Options on the help page.
POSTED BY: Bill Simpson
Posted 11 years ago
I have tried it earlier. NMinimize provides local minima. I need to find the Global minimum value of the function is it possible? to solve it with Minimize. I left it running for 5 hours and it never came back. My system specs are: core i 7, Quad Core, 16gb memory. Is there any other way arround to find global minima of this relation ?
POSTED BY: Usman Rauf
Posted 11 years ago
Could you show a small example with your matricies?

Write a little code and post it in a code block or attach a notebook, showing what are given constants and what are parameters to be minimized. Describe what the solution should look like or even give the solution for the example.

Thank you
POSTED BY: Bill Simpson
Posted 11 years ago
This is the result which I computed by manipulating some metrices and I am trying to Minimize a very simple relation as follows (although the expression is long):
but Mathematica never comes back. If there is any thing which can be done?
  Minimize[{Abs[((3608946673948233*d)/
          4503599627370496 + (274464355232027*e)/
          2251799813685248 - (274464355232027*
            e^2)/(4*(562949953421312*e + 562949953421312*f -
              5536725273124715)) -
         1519633732185043491981133247305/
          1267650600228229401496703205376)] +
      Abs[((4636666003778669*b)/9007199254740992 + (1118552746194141*c)/
          2251799813685248 + (29870012493936382538794142709149*
           b)/(9007199254740992*(9007199254740992*b +
             9007199254740992*c -
             6442131581095921)) + (7205863971378845991234609198861*
           c)/(2251799813685248*(9007199254740992*b +
             9007199254740992*c -
             6442131581095921)) - (4636666003778669*
           b*(b + c))/(9007199254740992*b + 9007199254740992*c -
           6442131581095921) - (4474210984776564*
           c*(b + c))/(9007199254740992*b + 9007199254740992*c -
           6442131581095921))] +
     Abs[((274464355232027*e)/
         2251799813685248 + (1519633732185043491981133247305*
           e)/(2251799813685248*(562949953421312*e +
             562949953421312*f - 5536725273124715)) - (274464355232027*
          
           e*(e + f))/(4*(562949953421312*e + 562949953421312*f -
             5536725273124715)))] +
     Abs[((792979490709637*b)/1125899906842624 - (901702497811663*c)/
         2251799813685248 + (4891864612675574504296157138923*
           b)/(1125899906842624*(2251799813685248*b +
             2251799813685248*c -
             6168967381864879)) - (5562573297146236482969456283777*
           c)/(2251799813685248*(2251799813685248*b +
             2251799813685248*c -
             6168967381864879)) - (1585958981419274*
           b*(b + c))/(2251799813685248*b + 2251799813685248*c -
           6168967381864879) + (901702497811663*
           c*(b + c))/(2251799813685248*b + 2251799813685248*c -
           6168967381864879))] +
     Abs[((8431533077325893*b)/18014398509481984 - (708586604185451*c)/
         4503599627370496 + (54368167798740930523060826625213*
           b)/(18014398509481984*(1125899906842624*b +
             1125899906842624*c -
             6448194806345241)) - (4569104460954436146783095288691*
           c)/(4503599627370496*(1125899906842624*b +
             1125899906842624*c -
             6448194806345241)) - (8431533077325893*
          
           b*(b + c))/(16*(1125899906842624*b + 1125899906842624*c -
             6448194806345241)) + (708586604185451*
           c*(b + c))/(4*(1125899906842624*b + 1125899906842624*c -
             6448194806345241)))] +
     Abs[((4474210984776564*c^2)/(9007199254740992*b +
           9007199254740992*c - 6442131581095921) - (177126692422487*
           d)/1125899906842624 - (1118552746194141*c)/
         2251799813685248 + (4636666003778669*b*
           c)/(9007199254740992*b + 9007199254740992*c -
           6442131581095921) +
        7205863971378845991234609198861/
         20282409603651670423947251286016)] +
     Abs[((2035957719017013*
           b^2)/(1024*(140737488355328*b + 140737488355328*c -
             2249387656040967)) - (2035957719017013*b)/
         144115188075855872 - (2035957719017013*a)/
         144115188075855872 + (2939179565022695*b*
           c)/(64*(140737488355328*b + 140737488355328*c -
             2249387656040967)) +
        4579658161378192576066497971571/
         20282409603651670423947251286016)] +
     Abs[((5056216978909333*b)/
         36028797018963968 + (3060017963484179*c)/
         4503599627370496 + (27994884333529598097197586465095*
           b)/(36028797018963968*(562949953421312*b +
             562949953421312*c -
             5536725273124715)) + (16942478794638475145271796383985*
           c)/(4503599627370496*(562949953421312*b +
             562949953421312*c -
             5536725273124715)) - (5056216978909333*
           b*(b + c))/(64*(562949953421312*b + 562949953421312*c -
             5536725273124715)) - (3060017963484179*
           c*(b + c))/(8*(562949953421312*b + 562949953421312*c -
             5536725273124715)))] +
     Abs[((2939179565022695*
           c^2)/(64*(140737488355328*b + 140737488355328*c -
             2249387656040967)) - (2230056655377591*d)/
         2251799813685248 - (2939179565022695*c)/
         9007199254740992 + (2035957719017013*b*
           c)/(1024*(140737488355328*b + 140737488355328*c -
             2249387656040967)) +
        6611354232449908862093204746065/
         1267650600228229401496703205376)] +
     Abs[((3860418273669689*e)/
         9007199254740992 + (24892729062597149834655331100049*
           e)/(9007199254740992*(1125899906842624*e +
             1125899906842624*f -
             6448194806345241)) - (3860418273669689*
           e*(e + f))/(8*(1125899906842624*e + 1125899906842624*f -
             6448194806345241)))] +
     Abs[((4636666003778669*b^2)/(9007199254740992*b +
           9007199254740992*c - 6442131581095921) - (4636666003778669*
          b)/9007199254740992 - (4636666003778669*a)/
        9007199254740992 + (4474210984776564*b*
          c)/(9007199254740992*b + 9007199254740992*c -
          6442131581095921) +
       29870012493936382538794142709149/
        81129638414606681695789005144064)] +
    Abs[((8431533077325893*a)/
        18014398509481984 + (8431533077325893*b)/
        18014398509481984 - (8431533077325893*
          b^2)/(16*(1125899906842624*b + 1125899906842624*c -
            6448194806345241)) + (708586604185451*b*
          c)/(4*(1125899906842624*b + 1125899906842624*c -
            6448194806345241)) -
       54368167798740930523060826625213/
        20282409603651670423947251286016)] +
    Abs[((5981047056487669*e)/
        9007199254740992 + (13453693419063522919576994335923*
          e)/(9007199254740992*(140737488355328*e +
            140737488355328*f -
            2249387656040967)) - (5981047056487669*
          e*(e + f))/(64*(140737488355328*e + 140737488355328*f -
            2249387656040967)))] +
    Abs[((792979490709637*a)/1125899906842624 + (792979490709637*b)/
        1125899906842624 - (1585958981419274*
          b^2)/(2251799813685248*b + 2251799813685248*c -
          6168967381864879) + (901702497811663*b*
          c)/(2251799813685248*b + 2251799813685248*c -
          6168967381864879) -
       4891864612675574504296157138923/
        2535301200456458802993406410752)] +
    Abs[((4461181249195911*e)/
        9007199254740992 + (27520881610876789415202401309769*
          e)/(9007199254740992*(2251799813685248*e +
            2251799813685248*f -
            6168967381864879)) - (4461181249195911*
          e*(e + f))/(4*(2251799813685248*e + 2251799813685248*f -
            6168967381864879)))] +
    Abs[((708586604185451*c)/4503599627370496 + (5277591482040591*d)/
        9007199254740992 - (708586604185451*
          c^2)/(4*(1125899906842624*b + 1125899906842624*c -
            6448194806345241)) + (8431533077325893*b*
         
          c)/(16*(1125899906842624*b + 1125899906842624*c -
            6448194806345241)) -
       4569104460954436146783095288691/
        5070602400912917605986812821504)] +
    Abs[((2035957719017013*b)/
        144115188075855872 + (2939179565022695*c)/
        9007199254740992 + (4579658161378192576066497971571*
          b)/(144115188075855872*(140737488355328*b +
            140737488355328*c -
            2249387656040967)) + (6611354232449908862093204746065*
          c)/(9007199254740992*(140737488355328*b +
            140737488355328*c -
            2249387656040967)) - (2035957719017013*
          b*(b + c))/(1024*(140737488355328*b + 140737488355328*c -
            2249387656040967)) - (2939179565022695*
          c*(b + c))/(64*(140737488355328*b + 140737488355328*c -
            2249387656040967)))] +
    Abs[((2230056655377591*d)/2251799813685248 + (5981047056487669*e)/
        9007199254740992 - (5981047056487669*
          e^2)/(64*(140737488355328*e + 140737488355328*f -
            2249387656040967)) -
       13453693419063522919576994335923/
        1267650600228229401496703205376)] +
    Abs[((854371257949259*d)/9007199254740992 + (4461181249195911*e)/
        9007199254740992 - (4461181249195911*
          e^2)/(4*(2251799813685248*e + 2251799813685248*f -
            6168967381864879)) -
       27520881610876789415202401309769/
        20282409603651670423947251286016)] +
    Abs[((854371257949259*d)/9007199254740992 - (901702497811663*c)/
        2251799813685248 + (901702497811663*
          c^2)/(2251799813685248*b + 2251799813685248*c -
          6168967381864879) - (1585958981419274*b*
          c)/(2251799813685248*b + 2251799813685248*c -
          6168967381864879) +
       5562573297146236482969456283777/
        5070602400912917605986812821504)] +
    Abs[((3060017963484179*
          c^2)/(8*(562949953421312*b + 562949953421312*c -
            5536725273124715)) - (3608946673948233*d)/
        4503599627370496 - (3060017963484179*c)/
        4503599627370496 + (5056216978909333*b*
          c)/(64*(562949953421312*b + 562949953421312*c -
            5536725273124715)) +
       16942478794638475145271796383985/
        2535301200456458802993406410752)] +
    Abs[((177126692422487*d)/1125899906842624 - (764299361349167*e)/
        2251799813685248 + (3057197445396668*
          e^2)/(9007199254740992*e + 9007199254740992*f -
          6442131581095921) +
       4923717053158911857783000447807/
        20282409603651670423947251286016)] +
    Abs[((5277591482040591*d)/9007199254740992 + (3860418273669689*e)/
        9007199254740992 - (3860418273669689*
          e^2)/(8*(1125899906842624*e + 1125899906842624*f -
            6448194806345241)) -
       24892729062597149834655331100049/
        10141204801825835211973625643008)] +
    Abs[((5056216978909333*
          b^2)/(64*(562949953421312*b + 562949953421312*c -
            5536725273124715)) - (5056216978909333*b)/
        36028797018963968 - (5056216978909333*a)/
        36028797018963968 + (3060017963484179*b*
          c)/(8*(562949953421312*b + 562949953421312*c -
            5536725273124715)) +
       27994884333529598097197586465095/
        20282409603651670423947251286016)] +
    Abs[((764299361349167*e)/
        2251799813685248 + (4923717053158911857783000447807*
          e)/(2251799813685248*(9007199254740992*e +
            9007199254740992*f -
            6442131581095921)) - (3057197445396668*
          e*(e + f))/(9007199254740992*e + 9007199254740992*f -
          6442131581095921))], a > 0, b > 0, c > 0, d > 0, e > 0,
   f > 0}, {a, b, c, d, e, f}] // N
POSTED BY: Usman Rauf
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract