Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I did consider that. However, the solver returns a completion code of 0
which I understands means, "Solver has converged to the current solution. All constraints are satisfied." For the condition you suggest I would expect a completion code of either 3 meaning " Stop chosen when the maximum itterations limit was reached." or a code of 4 meaning " The set target cell values do not converge." I know I am capturing the completion codes correctly since I do get codes of 5 and 6 when appropriate. Also I can watch the trial solutions and never see any that even come close to the maximum itteration. Very clearly the problem seems to only exist when the rate values are equal. Also it appears that it will always maximize (positive) the value of a1 and always minimize (negative) the value of b1. Example: If y1=a1*rate1 + b1* rate2 and rate1 = rate2 = 6329, and y1 = 69000 the solver returns a1 =340 and b1 = -329.1 the SolverOptions command is: SolverOptions AssumeLinear:=False, AssumeNonNeg:=True, precision:=0.00001 I also have the solveradd commands set to constrain a1 and b1 to positive numbers between 0 and 340. This one has me at a loss. "Dana DeLouis" wrote: Just a guess. In your simplified test example, let's assume rate1 is greater than rate2. The solution is to use as much of a1 as possible. If it reaches the limit of 340, then the rest goes to b1. When rate1 and rate2 are equal, then there are many possible solutions. Solver may be aborting early when if detects there are multiple solutions. We would have to investigate further if this is the case. Again, only a guess at this point. -- HTH :) Dana DeLouis Windows XP & Office 2003 "Steve M" wrote in message ... Does anyone know if setting constraints with the SolverAdd command that limits the "Changing Cells" to only positive numbers and also uses the SolverOptions command with a AssumeNonNeg:= true causes the solver to use negative numbers in the "Change cells"? I have the following type of problem. y1=a1*rate1 + b1*rate2 Constraints 0<=a1<=340 0<=b1<=340 y1 is a givens and I am attempting to minimize a1+b1. the values being changed are a1 & b1, In addition to setting the constraints for a1 & b1 as only positive number by using the SolverAdd command I also use the SolverOptions AssumeNonNeg :=True. This example oversimplifies the problem in reality there are over 100 y's and up to 13 terms in each equation. The solver returns correct results when the rate1 and rate2 are different. However when they are the same the solver will disreguard the non negative constraint and set one value to negative. I capture the solver completion codes and record it for each equation and the solver returns 0 indicating convergence and constraints satisfied. Any ideas? Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Solver Error - an unexpected internal error has occurred | Excel Discussion (Misc queries) | |||
Solver Error - an unexpected internal error has occurred | Excel Discussion (Misc queries) | |||
Solver Error - an unexpected internal error has occurred | Excel Discussion (Misc queries) | |||
Solver Error - an unexpected internal error has occurred | Excel Discussion (Misc queries) | |||
Interesting Solver problem (Solver encounters an error) | Excel Discussion (Misc queries) |