Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using solver variables to access database values

Hi,

I'm trying to solve a problem using solver and an access database.

In that database I have a table with values that depend on a day of the
year and an hour of the day. That is: 365 * 24 rows.

In the Excel sheet I have a sumatory of functions that depend on those
variables.

The function = fx(day, hour, constants...)

I want to obtain the day and the hour that maximizes the sumatory.

I want to use solver to alter the two variables (day and hour) between
their constrained ranges

day =1 and day<=365
hour=0 and hour <=23

The function will use these values to launch selects on the database
and recover the values of the specified day:

select value from table where day=%SolverProposedDayValue% and
hour=%SolverProposedHourValue%

The problem is that despite of the integer restriction for teh
variables, solver sends real variables to the function, and using clong
or cint to convert the variable doesn't seem to solve the problem,
because solver thinks that the solution converges and stops the
calculation in very few iterations.

Can I force solve to send me integer variables between the range that I
have specified?

Can I use some kind of function to convert the proposed solver
variables to an integer variable between the range I have specified?

If I can't, there are other products that I can use? I have seen
lpsolve, but it seems not very integrated with excel...

Or perhaps ... Can I focus the problem in some other different way that
avoid me those problems?

Thanks in advance,

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
Update Excel Database via Access Main Database with a script Finnbar New Users to Excel 2 November 3rd 08 07:24 PM
Set solver constraints so variables are either 1 OR 0. Gwyndalf Excel Worksheet Functions 3 May 28th 08 06:44 PM
variables in excel solver for vba [email protected] Excel Programming 1 April 16th 06 03:45 PM
DCOUNT to Return Values from Access database Tim H Excel Discussion (Misc queries) 5 December 15th 05 10:27 PM
solver and defining all variables different than one another excel_excel_excel Excel Discussion (Misc queries) 0 July 19th 05 07:38 AM


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