R/findGenerators.R

findGenerators <-
function (model, tools) {

  generators <- model  

  for (i in 1:tools$nVarSets) {
    if (model[i] == 1) {
      index <- na.omit(tools$downLinks[i,])      
      generators[index] <- 0      
    }
  }
 
  return(generators)

}

Try the genMOSSplus package in your browser

Any scripts or data that you put into this service are public.

genMOSSplus documentation built on May 1, 2019, 10:31 p.m.