+ Reply to Thread
Results 1 to 3 of 3

Getting RAND() value but NOT function?!?

  1. #1
    Mike
    Guest

    Getting RAND() value but NOT function?!?

    Hi everyone,

    Say I am using a linear term such as " b * X "; where "b" is a
    parameter while "X" is a variable...


    Now, assume that "b" is RAND() value and assume I am using an excel
    optimizer. When I run the optimizer, it complains that the problem
    doesn't satisfy linearity conditions; because RAND() is a function so
    it turns "b * X" to become non-linear!!!


    I tried to go around this by creating another cell which copy and
    value-paste the RAND() value into it. It solves the problem, but now I
    have different problem: when RAND() value is copied and value-pased
    and, by the time it is put in the new cell, the original cell which has

    RAND() function changes its value.....and so on!!


    How can I go around this correctly, so I keep the model linear and keep

    RAND() values in both cells same?


    Thanks,
    Mike


  2. #2
    Bernie Deitrick
    Guest

    Re: Getting RAND() value but NOT function?!?

    Mike,

    If you want to optimize a function, then you could put a random number in that cell as a seed, but
    you need to use constants otherwise. It really doens't make sense to optimize a randomized
    function, since the optimization would be (perhaps) different for every random number.

    So, copy the cell with b, and pastespecial values, then run the optimizer.

    HTH,
    Bernie
    MS Excel MVP


    "Mike" <[email protected]> wrote in message
    news:[email protected]...
    > Hi everyone,
    >
    > Say I am using a linear term such as " b * X "; where "b" is a
    > parameter while "X" is a variable...
    >
    >
    > Now, assume that "b" is RAND() value and assume I am using an excel
    > optimizer. When I run the optimizer, it complains that the problem
    > doesn't satisfy linearity conditions; because RAND() is a function so
    > it turns "b * X" to become non-linear!!!
    >
    >
    > I tried to go around this by creating another cell which copy and
    > value-paste the RAND() value into it. It solves the problem, but now I
    > have different problem: when RAND() value is copied and value-pased
    > and, by the time it is put in the new cell, the original cell which has
    >
    > RAND() function changes its value.....and so on!!
    >
    >
    > How can I go around this correctly, so I keep the model linear and keep
    >
    > RAND() values in both cells same?
    >
    >
    > Thanks,
    > Mike
    >




  3. #3
    Peter Aitken
    Guest

    Re: Getting RAND() value but NOT function?!?

    "Mike" <[email protected]> wrote in message
    news:[email protected]...
    > Hi everyone,
    >
    > Say I am using a linear term such as " b * X "; where "b" is a
    > parameter while "X" is a variable...
    >
    >
    > Now, assume that "b" is RAND() value and assume I am using an excel
    > optimizer. When I run the optimizer, it complains that the problem
    > doesn't satisfy linearity conditions; because RAND() is a function so
    > it turns "b * X" to become non-linear!!!
    >
    >


    You do not understnad what linear means. If b is indeed a parameter - fixed
    value - then you are OK. If b is a random number then it is not a fixed
    value and the equation is no longer linear.


    --
    Peter Aitken

    Remove the crap from my email address before using.



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1