função 'goal seek' do excel. É Gauss-Jordan?  XML
Índice dos Fóruns » Assuntos gerais (Off-topic)
Autor Mensagem
rodrigo_gomes
GUJ Master
[Avatar]

Membro desde: 25/11/2003 15:45:21
Mensagens: 1088
Localização: São Paulo
Offline

Pessoal,

Alguem sabe se o método implementado pela função 'goal seek' do Excel, é o método de Gauss-Jordan?
Preciso achar uma implementação desse cara em java ou groovy...ou em último caso fazer uma.

Mas queria saber se o método é realmente esse, já que na documentação da MS que achei não cita especificamente ele (http://support.microsoft.com/kb/100782).

Obrigado!

rodrigo de paiva gomes




http://twitter.com/rod_gomes
[WWW] [MSN] [ICQ]
gzofera
Virtual Machine Man

Membro desde: 31/01/2008 17:05:05
Mensagens: 554
Offline

amigo nao sei se eh nao mais acho q isso aki pode te ajudar

http://www.kean.edu/~rnarasim/excel/fin_sumy.pdf

nesse arquivo mostra algumas coisas a respeito desse assunto

e isso tbem pode ajudar

http://www.google.com.br/search?hl=pt-BR&q=goal%2Bseek%2BGauss%2BJordan&btnG=Pesquisar&meta=

vlws

[WWW]
rodrigo_gomes
GUJ Master
[Avatar]

Membro desde: 25/11/2003 15:45:21
Mensagens: 1088
Localização: São Paulo
Offline

Olá, obrigado pela resposta.

Mas eu não quero aprendar a usar o Excel, eu quero saber como o Excel implementa o Goal Seek

E pode ficar tranquilo, que já usei bastante o google. O forum pra mim é a ULTIMA opção para eu tirar dúvida de algo.

Obrigado.

rodrigo de paiva gomes




http://twitter.com/rod_gomes
[WWW] [MSN] [ICQ]
thingol
Moderador

Membro desde: 29/07/2004 16:10:13
Mensagens: 17543
Offline

O Goal Seek é diferente do Solver.
O solver, segundo o help do MS Excel 2007:
Microsoft Excel 2007 Help wrote:
Algorithms and methods used by Solver
The Microsoft Office Excel Solver tool uses the Generalized Reduced Gradient (GRG2) nonlinear optimization code, which was developed by Leon Lasdon, University of Texas at Austin, and Alan Waren, Cleveland State University.

Linear and integer problems use the simplex method with bounds on the variables and the branch-and-bound method, implemented by John Watson and Daniel Fylstra, Frontline Systems, Inc. For more information about the internal solution process that is used by Solver, contact:

Frontline Systems, Inc.
P.O. Box 4288
Incline Village, NV 89450-4288


http://www.utexas.edu/courses/lasdon/design3.htm

Quando ao Goal Seek, realmente não sei (no artigo do MSDN ele diz que é um "algoritmo simples"):
Microsoft Help and Support KB100782 wrote:
The Goal Seek command uses a simple linear search beginning with guesses on the positive or negative side of the value in the source cell (By Changing Cell). Excel uses the initial guesses and recalculates the formula. Whichever guess brings the formula result closer to the targeted result (To Value) is the direction (positive or negative) in which Goal Seek heads. If neither direction appears to approach the target value, Goal Seek makes additional guesses that are further away from the source cell. After the direction is determined, Goal Seek uses an iterative process in which the source cell is incremented or decremented at varying rates until the target value is reached.
...
The Goal Seek command uses a simple algorithm and, as a result, may have problems converging on a solution if the function is not linear. Because the iteration process begins with guesses around the source cell, if Goal Seek is having problems converging on a solution, changing the value in the source cell may help. Alternatively, you can use Microsoft Excel Solver.

Ele deve dizer isso para que alguém não reclame se o algoritmo for mudado de uma versão para outra do Excel - como você deve saber, o que se deixa de dizer é tão importante quanto o que se diz.

This message was edited 2 times. Last update was at 30/05/2008 17:34:45

[WWW]
Luca
Moderador
[Avatar]

Membro desde: 06/09/2002 14:30:10
Mensagens: 5810
Localização: São Paulo/SP ou Paraty/RJ
Offline

Olá

Fiquei curioso e fui no google. Algum destes links ajuda?

http://home.ubalt.edu/ntsbarsh/opre640a/partVIII.htm#rsatgoal (ver no final Feasibility Problem: Goal-Seeking Indicators)

Uma tentativa de melhoria do algoritmo do Excel: http://cargocal.com/SNGSPAnalysis.html

Se você procurar nos fontes do OpenOffice acho que é isto que deve procurar: http://api.openoffice.org/docs/common/ref/com/sun/star/sheet/XGoalSeek.html e http://api.openoffice.org/docs/DevelopersGuide/Spreadsheet/Spreadsheet.xhtml#1_Spreadsheet_Documents


O algoritmo do solver é bem mais complexo do que o Gauss Jordan. Alguns links:
http://www.esm.vt.edu/~zgurdal/COURSES/4084/4084-Docs/LECTURES/GradProj.pdf
http://glossary.computing.society.informs.org/second.php?page=G.html

O algoritmo do Excel é vendido em http://www.solver.com/ e tem pronto em Java
Encontrei outro a partir de http://www-unix.mcs.anl.gov/otc/Guide/faq/nonlinear-programming-faq.html mas em Fortran

[]s
Luca



Dare Obasanjo (Program Manager at Microsoft)
"The folks I know from across the industry who have to build large scale Web services on the Web today at Google, Yahoo!, Facebook, Windows Live, Amazon, etc are using RESTful Web services. The only times I encounter someone with good things to say about WS-* is if it is their job to pimp these technologies or they have already "invested" in WS-* and want to defend that investment."


CEP, JMS, JMX e coisas afins (ou não)
http://lucabastos.blogspot.com/
[Email] [WWW]
rodrigo_gomes
GUJ Master
[Avatar]

Membro desde: 25/11/2003 15:45:21
Mensagens: 1088
Localização: São Paulo
Offline

Obrigado Luca e thingo, pelas respostas.

Esse link do Open Office eu tinha achado aqui
http://www.oooforum.org/forum/viewtopic.phtml?t=51528

Mas confesso que não tinha tido essa ideia de olhar nos fontes. Muito obrigado pela dica!

Vou tentar baixar o código hoje...olhando o CVS deles on-line (olhei meio rápido) eu só achei o fonte da interface XGoalSeek.

Ah, vou procuarar a implementação que você disse, em Fortran, para tentar entender algo.

Obrigado.

[]´s

rodrigo de paiva gomes




http://twitter.com/rod_gomes
[WWW] [MSN] [ICQ]
 
Índice dos Fóruns » Assuntos gerais (Off-topic)
Ir para:   
Powered by JForum 2.1.8 © JForum Team