+ Reply to Thread
Results 1 to 14 of 14

Optimisation without Solver or Macros

Hybrid View

  1. #1
    Registered User
    Join Date
    10-21-2011
    Location
    Isle of Wight, England
    MS-Off Ver
    Excel 2003
    Posts
    7

    Optimisation without Solver or Macros

    Hi all, first post on the forum so please be gentle with me if I break any specific forum etiquette!

    I have a spreadsheet that I would like to run through Spreadsheet Converter to turn it into a Flash or HTML file for use on a webpage, however I have been informed by the support team at SC that their software cannot make use of the Solver or any macro functions. Unfortunately Solver forms the core feature of the spreadsheet, so without it I cannot create the webpage.

    I am looking for a way to solve a rather complex equation fx=0 ( fx consists of around 20 inputs each used 3 to 4 times) by altering 1 specific input. Solver does this nicely, I am not familiar with macros but I imagine they would also make light work of it, however since they are not supported, that is a moot point.

    So, my question would be, can I replicate the solver feature using just basic functions within the spreadsheet, and without significantly re-arranging the equation in question?

    I am attempting to come to solution myself using a small mock up:
    \1
    (I see [img] tags do not work here?)

    I want AB-C2D=0 by altering D. Obviously this one would be easy to do with a quick re-arrangement however I would really rather avoid that route if possible given the complexity of the equation I am actually attempting to solve.

    Thanks in advance for any help or suggestions!

  2. #2
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Optimisation without Solver or Macros

    You might want to consider looking through a few iterative processes to solve your equation.

    One of the most commonly used iterative methods is the newton-raphson method. Do a search on that and have a look if it's something would solve your problem.

  3. #3
    Registered User
    Join Date
    10-21-2011
    Location
    Isle of Wight, England
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Optimisation without Solver or Macros

    Superb, I've just finished an OU course in Maths that covered that topic, sadly I had to skip that chapter due to other commitments but will go back and check it out. I did think iteration would be the answer however I am not familiar with it in excel.

    Thanks for the heads up, I'll let you know how I get on. I fear differentiating the equation might be... interesting.
    Last edited by Kozy; 10-21-2011 at 06:20 AM.

  4. #4
    Registered User
    Join Date
    10-21-2011
    Location
    Isle of Wight, England
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Optimisation without Solver or Macros

    On first look, my initial fears about differentiating the equation were valid. Differentiation of an equation with one variable is one thing, an equation with 20 odd is another entirely, looks like I will have to branch in to multivariate calculus for this one. It is a wall I do not wish to estimate the height of.
    Last edited by Kozy; 10-21-2011 at 07:22 AM.

  5. #5
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Optimisation without Solver or Macros

    Hi kozy,

    For your case, since you're only changing the variable D, it is a 1 variate equation. A B and C can be treated as a constant.

    If differentiating is an issue, consider using a "proxy" for differentiation as the change in the function for a small change in D.

    I.e. f'(D) = f(D) - f(D + delta) where delta is a very small number (the smaller the more accurate it is)

  6. #6
    Registered User
    Join Date
    10-21-2011
    Location
    Isle of Wight, England
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Optimisation without Solver or Macros

    That sounds far easier, I will look into it, thanks!

  7. #7
    Registered User
    Join Date
    10-21-2011
    Location
    Isle of Wight, England
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Optimisation without Solver or Macros

    I have attached (hopefully) the actual problem I am trying to solve.
    Attached Files Attached Files
    Last edited by Kozy; 10-21-2011 at 11:14 AM.

  8. #8
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Optimisation without Solver or Macros

    Hi kozy,

    First thing, that's one heck of a formula.

    Second thing, see attached.

    Note that, for a newton raphson method, if there are multiple solutions, the starting point (in sheet 2, i started with 50), can play a big role in determining the end solution.
    P/S: Just did a check, the function appears to be strictly linear.

    Regards,
    Bing.
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Optimisation without Solver or Macros

    Do you want get the result without using Goalseek.Using Goalseek you will get result easily.For given problem D2=77.06 is answere.

  10. #10
    Registered User
    Join Date
    10-21-2011
    Location
    Isle of Wight, England
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Optimisation without Solver or Macros

    Quote Originally Posted by quekbc View Post
    Hi kozy,

    First thing, that's one heck of a formula.

    Second thing, see attached.

    Note that, for a newton raphson method, if there are multiple solutions, the starting point (in sheet 2, i started with 50), can play a big role in determining the end solution.
    P/S: Just did a check, the function appears to be strictly linear.

    Regards,
    Bing.
    Yes the function output is deceptively basic given the complexity of the formula (that is in it's vastly simplified form there too!). I did wonder if perhaps I was making things far more complicated than it needed to be, as I do have a tendency to do that.

    Your solution is perfect, I will take the weekend to look it over and see how you created that. I had a play around with the Newton Raphson method but kept getting massive errors, the moved onto the secant method as this does not require you to find f'(x), which sounded ideal, however I also had no success with that.

    Many many thanks for looking that over, I think I would have been stewing over it for some considerable time!

    Really shouldn't have skipped that chapter in my course eh!

    Quote Originally Posted by kvsrinivasamurthy View Post
    Do you want get the result without using Goalseek.Using Goalseek you will get result easily.For given problem D2=77.06 is answere.
    I am not aware of goalseek, is it an add on? If it is then it will most likely not be supported by Spreadsheet Converter so would not work for me in this case. I need to be able to find f(x)=0 instantly for any combination of the user inputs, though they will stay constrained within a certain window in which x can reasonably be expected to be between 0-100 and for which there is only one solution.
    Last edited by Kozy; 10-21-2011 at 11:47 AM.

  11. #11
    Forum Contributor
    Join Date
    05-14-2010
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2007
    Posts
    187

    Re: Optimisation without Solver or Macros

    hi Cozy,

    Check this link
    http://office.microsoft.com/en-gb/ex...005203894.aspx

    you should be able to find Goal Seek in Tools menu

    Regards,

    Veejar

  12. #12
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Optimisation without Solver or Macros

    How about a binary search using formulas?
    Attached Files Attached Files
    Entia non sunt multiplicanda sine necessitate

  13. #13
    Registered User
    Join Date
    10-21-2011
    Location
    Isle of Wight, England
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Optimisation without Solver or Macros

    Quote Originally Posted by shg View Post
    How about a binary search using formulas?
    Well it certainly seems to work, however it looks far more complicated than the Newton method posted by quekbc. Thanks for your suggestion though!

  14. #14
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Optimisation without Solver or Macros

    Goalseek is in Tools menu in Excel2003
    In 2007 Data, What if analysis, Goalseek.

+ 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