the information in between the asterics I do not understand. Could someone explain why is using same variable calling it with different notation ? RG and remaining garbage and why is indexing it with an integer...

Next_Block<-function(Index_Vehicle=1,Current_Time=0,Block_Index=1){
Remaining_G<-RG[Block_Index]
Remaining_C<-RC[Index_Vehicle]
Remaining_Time<-WH-CT

if(Remaing_G>Remainng_C){
Clean_UP_Time # Generate time to clean up Remaining_C

if(**Remaining_Time<Clean_Up_Time**){
  Trash_Collected<-Remaining_Time/Clean_Up_Time*RC[Index_Vehicle]
  ***RC[Index_Vehicle]=RC[Index_Vehicle]-Trash_Collected***

*** RG[Block_Index]=RG[Block_Index]-Trash_Collected***
CT=7.5
# Go to landfill
# This vehicle next event time -> Inf
Next_block_Arraval_Time[Index_Vehicle]=Inf
Why is using twice the same variable , because RemainingG = RG, why not just used RG Y RC for everything .

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.