colinsheppard / pevi

GNU General Public License v3.0
1 stars 0 forks source link

remove extraneous operations when not logging #10

Closed colinsheppard closed 11 years ago

colinsheppard commented 11 years ago

for PEVI-nolog.nlogo, currently only the lines that use "log-data" are being commented out. as found by profiling, it's critical that we also comment out all commands that are only relevant to logging.

for example, in "arrive" the lines

let #is-scheduled true
if item current-itin-row itin-change-flag = 1 [ set #is-scheduled false ]

are not needed because #is-scheduled is only used to log data. there are numerous more examples of this in arrive and throughout the whole code base.

instead of maintaining a separate copy of PEVI.nlogo and PEVI-nolog.nlogo, please do the following:

colinsheppard commented 11 years ago

d2128434889d18b9d5636dca4085b0ff8b1599e6

arharris commented 11 years ago

Currently, the original PEVI uses calc-time-until-end-charge-with-logging in procedure charge-time-event-scheduler; with logging statements removed, this creates an error. Currently fixing this by manually deleting the "with-logging" portion, going to try to work an automatic fix into nolog.R

colinsheppard commented 11 years ago

Andy, make sure you regularly pull changes from the repo, I already fixed the calc-time-until-end-charge-with-logging, see 5844619cee17636395b4093d9534eacaa2ae688c