hzambran / hydroPSO

Model-Independent Particle Swarm Optimisation for Environmental Models
https://cran.r-project.org/package=hydroPSO
GNU General Public License v2.0
36 stars 18 forks source link

A progress bar #17

Closed WatershedFlow closed 4 years ago

WatershedFlow commented 4 years ago

It might be convenient to include a progress bar to tell the progress. For example I have 10,000 calibration runs, it goes for several days with my current laptop. Built-in progress bar would be a nice to have.

hzambran commented 4 years ago

You might use the REPORT argument (only if verbose=TRUE) to see the progress of hydroPSO.

The default value of REPORT is 100, which might be too high if you use a large number of particles.

hydroPSO( fn=rastrigin, lower=lower, upper=upper,        
               control=list(reltol=1e-20, REPORT=2, write2disk=FALSE) )