How to solve the given problem?

Dennis Lee Bieber wlfraed at ix.netcom.com
Sat Feb 26 13:24:12 EST 2022


On Sat, 26 Feb 2022 02:49:15 -0800 (PST), NArshad <narshad.380 at gmail.com>
declaimed the following:

>Its better to adjust the feed in the coming next two feeds that is the third and fourth one. Thirty or thirty one units in the third feed and the remaining units which are nine or ten in the fourth feed.  

	Is there a question in that?

	It's your assignment -- you will have to justify your design to whoever
gave you that assignment. So far all you have is a statement with no
justification.

	And you really do need to justify the part where you seem to ignore
"distribute the remaining 40 unit in the rest of the day" and "Try to keep
the distribution similar to the current feeding pattern."

	If you really wanted to provide a /generalized/ solution then "40
units" will never appear IN THE CODE. A generalized solution would accept
two lines of input: the original/planned schedule (for the whole day) and,
the implemented schedule up to when the mistake was detected. It would then
generate a new schedule for the rest of the day taking into account what
had already been done. (PLANNED and ACTUAL are input, ADJUSTED is output)

PLANNED:	150    100    30    30    30    20    20    10    5    5
ACTUAL:	150    60

ADJUSTED:	<changes made to rest of the day>

Note that a generalized solution would handle

PLANNED:	150    100    30    30    30    20    20    10    5    5
ACTUAL:	150    60      30

ADJUSTED:	<changes made to rest of the day>

where the mistake was on the second feed, but not discovered until after
the third feed.


-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
	wlfraed at ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/


More information about the Python-list mailing list