Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default Set solver constraints so variables are either 1 OR 0.

I have an array which consists of some 100 variables but each can only be 1
or zero. (0.3 of a vehicle is meaningless!!!) If I place the constraints of
=0 and <=1 and INT(all seperate line entries) the solver still wastes many

iterations with decimal numbers resulting in a long time to work out the
solution. The variables are used to specify the numbers of vehicle types
needed to tramsport a certain number of passengers. Each vehicle has a
different capacity and a different cost. I wish to find the cheapest
solution hence the variables array.

Can anyone offer a solution to the subject problem? Many Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 947
Default Set solver constraints so variables are either 1 OR 0.

each can only be 1 or zero.
the constraints of =0 and <=1 and INT(all separate line entries).


One option would be to use the following instead.
For one of the constraints, add that A1:A100 are "bin." (The last item in
the pull-down menu).
bin means "Binary", which is the integer 0 or 1, and is designed to be a
little more efficient then the above code.
Hopefully this will help.
--
Dana DeLouis
Windows XP, Office 2003


"Gwyndalf" wrote in message
...
I have an array which consists of some 100 variables but each can only be 1
or zero. (0.3 of a vehicle is meaningless!!!) If I place the constraints
of
=0 and <=1 and INT(all seperate line entries) the solver still wastes many

iterations with decimal numbers resulting in a long time to work out the
solution. The variables are used to specify the numbers of vehicle types
needed to tramsport a certain number of passengers. Each vehicle has a
different capacity and a different cost. I wish to find the cheapest
solution hence the variables array.

Can anyone offer a solution to the subject problem? Many Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default Set solver constraints so variables are either 1 OR 0.

Thanks for taking the time to reply.
The solver still comes up with decimal values despite using bin as the
constraint - I suspect that I must be thick!!!

"Dana DeLouis" wrote:

each can only be 1 or zero.
the constraints of =0 and <=1 and INT(all separate line entries).


One option would be to use the following instead.
For one of the constraints, add that A1:A100 are "bin." (The last item in
the pull-down menu).
bin means "Binary", which is the integer 0 or 1, and is designed to be a
little more efficient then the above code.
Hopefully this will help.
--
Dana DeLouis
Windows XP, Office 2003


"Gwyndalf" wrote in message
...
I have an array which consists of some 100 variables but each can only be 1
or zero. (0.3 of a vehicle is meaningless!!!) If I place the constraints
of
=0 and <=1 and INT(all seperate line entries) the solver still wastes many

iterations with decimal numbers resulting in a long time to work out the
solution. The variables are used to specify the numbers of vehicle types
needed to tramsport a certain number of passengers. Each vehicle has a
different capacity and a different cost. I wish to find the cheapest
solution hence the variables array.

Can anyone offer a solution to the subject problem? Many Thanks.




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Set solver constraints so variables are either 1 OR 0.

Did you ever get an answer? I am having the same exact problem.

"Gwyndalf" wrote:

Thanks for taking the time to reply.
The solver still comes up with decimal values despite using bin as the
constraint - I suspect that I must be thick!!!

"Dana DeLouis" wrote:

each can only be 1 or zero.
the constraints of =0 and <=1 and INT(all separate line entries).


One option would be to use the following instead.
For one of the constraints, add that A1:A100 are "bin." (The last item in
the pull-down menu).
bin means "Binary", which is the integer 0 or 1, and is designed to be a
little more efficient then the above code.
Hopefully this will help.
--
Dana DeLouis
Windows XP, Office 2003


"Gwyndalf" wrote in message
...
I have an array which consists of some 100 variables but each can only be 1
or zero. (0.3 of a vehicle is meaningless!!!) If I place the constraints
of
=0 and <=1 and INT(all seperate line entries) the solver still wastes many
iterations with decimal numbers resulting in a long time to work out the
solution. The variables are used to specify the numbers of vehicle types
needed to tramsport a certain number of passengers. Each vehicle has a
different capacity and a different cost. I wish to find the cheapest
solution hence the variables array.

Can anyone offer a solution to the subject problem? Many Thanks.




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
Excel Solver Constraints jcoleman52 Excel Discussion (Misc queries) 2 June 1st 06 08:00 PM
Making solver solve for different set variables and listing result Michael Bev Excel Discussion (Misc queries) 0 April 13th 06 12:22 PM
Constraints in Excel Solver Donna Excel Worksheet Functions 1 December 4th 05 10:27 PM
Problem with Solver and Integer constraints [email protected] Excel Worksheet Functions 1 August 12th 05 03:23 AM
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 06:59 PM.

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

About Us

"It's about Microsoft Excel"