|
-
April 4th, 2010, 01:36 PM
#4
Re: Gassing the van problem(algorithm)
 Originally Posted by maheshrang
The weights were assigned by : (distance between this node and previous node) * (cost of gas at previous station)/mileage;
Shouldn't you use the cost of the gas station at the head (i.e. the one you're driving to)?
Given that you start and must end with a full tank, you'll always have to fill up after you've driven a while.
Cheers, D Drmmr
Please put [code][/code] tags around your code to preserve indentation and make it more readable.
As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|