Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / May 2008

Tip: Looking for answers? Try searching our database.

Set solver constraints so variables are either 1 OR 0.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gwyndalf - 13 Jul 2006 00:40 GMT
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.
Dana DeLouis - 13 Jul 2006 00:57 GMT
> 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.
Signature

Dana DeLouis
Windows XP, Office 2003

>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
[quoted text clipped - 7 lines]
>
> Can anyone offer a solution to the subject problem?  Many Thanks.
Gwyndalf - 14 Jul 2006 01:16 GMT
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!!!

> > each can only be 1 or zero.
> > the constraints of >=0 and <=1 and INT(all separate line entries).
[quoted text clipped - 16 lines]
> >
> > Can anyone offer a solution to the subject problem?  Many Thanks.
slebo - 28 May 2008 18:44 GMT
Did you ever get an answer? I am having the same exact problem.

> Thanks for taking the time to reply.
> The solver still comes up with decimal values despite using bin as the
[quoted text clipped - 20 lines]
> > >
> > > Can anyone offer a solution to the subject problem?  Many Thanks.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.