Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Solver come out a different solversolve msg

Thanks for your advise.

I replace my code but it still have same problem. I found some information
from the web and would like to discuss.

Below FAQ is similar to my problem, I can see fractional values after solver
run, will the program occur error casued by the fractional values? If
possible, I would like to share my template to you.

================================================
Q. I specified that certain variables in my model have to be integers. But
when the Solver runs, I see fractional values in the variable cells. Is there
something wrong?

A. This is normal. The Solver uses the Branch & Bound method to deal with
integer variables. This means that during the optimization, the Solver will
indeed use fractional values, but when the optimal solution is found, all
integer variables should have integer values.
==================================================


"Dana DeLouis" wrote:

Hi. This is not necessary, but only a technique.
There are better ways, but sse if any techniques here are helpful.
This is just a simple demo.


Sub Demo()
Dim Result

With ActiveWorkbook.Names
.Add "Target", [A8]
.Add "Chg", [A1:A5]
.Add "UpperLimit", [B1:B5]
End With

SolverReset

SolverAdd [Chg], 3, 0
SolverAdd [Chg], 1, [UpperLimit]
SolverAdd [Chg], 4, "integer"

SolverOk [Target], 1, , [Chg]

Result = SolverSolve(True)
End Sub



The idea is that when one has
CellRef:=Range(Cells(8, 12), Cells(8, Icol))
listed throughout the code, it increases the odds of one of them having
a typo It makes it hard to spot errors.


Anyway, hope this helps.
Dana DeLouis

Reply
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
SolverSolve function exits abnormally Ashish Dutt Sharma Excel Programming 0 December 4th 07 04:04 PM
SolverSolve return values Steve M Excel Programming 1 August 24th 06 02:39 AM
SOLVER solversolve showref woof Excel Programming 3 June 26th 06 05:04 PM
Solver: 2nd function of SolverSolve zaina Excel Programming 3 June 18th 05 08:00 AM
How does Solversolve Control Macro Dacvid Cardner Excel Programming 1 June 17th 04 07:41 PM


All times are GMT +1. The time now is 09:34 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"