LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default solver constaints not satisfied

Hi All,

I tried to estimate two parameters using Excel Solver. And it is really
odd that I got a solution but the constaints are not satisfied. Here is
the VBA code:

...........

'initialize parameters

Sheets("abc").Cells(3, 11) = 0.2
Sheets("abc").Cells(4, 11) = 0.5

' next, set $k$5=$k$3+$k$4
Sheets("abc").Cells(5, 11) = Sheets("abc").Cells(3, 11) _
+ Sheets("abc").Cells(4,
11)

Sub solver_v2()

SolverReset
SolverOk SetCell:="$M$446", MaxMinVal:=1, ValueOf:="0",
ByChange:="$K$3:$K$5"
SolverAdd CellRef:="$K$3", Relation:=3, FormulaText:="0"
SolverAdd CellRef:="$K$3", Relation:=1, FormulaText:="1"
SolverAdd CellRef:="$K$4", Relation:=3, FormulaText:="0"
SolverAdd CellRef:="$K$4", Relation:=1, FormulaText:="1"
SolverAdd CellRef:="$k$5", Relation:=1, FormulaText:="1"
SolverOk SetCell:="$M$446", MaxMinVal:=1, ValueOf:="0",
ByChange:="$K$3:$K$5"
SolverSolve UserFinish:=True
SolverFinish KeepFinal:=1

End Sub

The final estimate for $k$5 is beyond 1. Can anybody help me with that?
Thanks a lot!

Lily

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
countif and sum if if two condition are satisfied zafar62 Excel Worksheet Functions 3 July 15th 08 06:22 AM
Looping till condition is satisfied? Jo[_2_] Excel Worksheet Functions 3 October 4th 07 09:43 PM
how to create constaints in solver Supertins Excel Worksheet Functions 1 September 18th 05 10:46 PM
Deletion of rows where a value is satisfied Larry Wallis[_2_] Excel Programming 2 February 22nd 05 01:36 PM
Deletion of rows where a value is satisfied Larry Wallis Excel Worksheet Functions 1 February 22nd 05 12:41 PM


All times are GMT +1. The time now is 12:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"