Using solver with newton raphson for optimization

aggerdanny

New Member
Joined
Oct 1, 2023
Messages
1
Office Version
  1. 365
Platform
  1. Windows
I have an excel worksheet that solves system of PDEs using newton-raphson method. The solution obviously depends on some variables that I input. There is a VBA macro (lets call it VBA1) that is used to solve the equations, after solving the equations the macro inputs the solution as values. This is important. Basically I can input variables, run macro VBA1 and it gives results as values.

Now I need to solve a reverse problem, estimate variables by minimizing SSE between real data and the model. The problem is that macro only inputs the data as values, and solver doesn’t want to work this way. I guess my VBA1 should work as input for the solver, but I don’t know how to do it.

I tried to write a macro that utilizes solver for optimization, first it calls VBA1 and tries to minimize SSE, but as far as I understand it cannot work with values.

Is it possible to write a VBA utilizing solver so it can optimize this problem?
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Optimization of newton-raphson iterative solution with excel solver vba
There is no need to repeat the link(s) provided above but if you have posted the question at other places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
I have an excel worksheet that solves system of PDEs using newton-raphson method. The solution obviously depends on some variables that I input. There is a VBA macro (lets call it VBA1) that is used to solve the equations, after solving the equations the macro inputs the solution as values. This is important. Basically I can input variables, run macro VBA1 and it gives results as values.

Now I need to solve a reverse problem, estimate variables by minimizing SSE between real data and the model. The problem is that macro only inputs the data as values, and solver doesn’t want to work this way. I guess my VBA1 should work as input for the solver, but I don’t know how to do it.

I tried to write a macro that utilizes solver for optimization, first it calls VBA1 and tries to minimize SSE, but as far as I understand it cannot work with values.

Is it possible to write a VBA utilizing solver so it can optimize this problem?








Yes, you can set up a VBA macro (let's call it VBA2) to utilize the Solver for this reverse problem. Here's a high-level approach to make it work effectively. I strongly suggest giving the best homework help websites for students a try. They've made a huge difference in my academic journey. These services have expert teams dedicated to helping students, and their commitment is truly admirable. They provide the guidance and support you need to excel in your studies, making your educational experience much smoother and less stressful.
Hi, do you still need a help?
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,160
Members
453,021
Latest member
Justyna P

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