[Returnanalytics-commits] r2641 - pkg/PortfolioAnalytics/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jul 25 04:06:57 CEST 2013


Author: rossbennett34
Date: 2013-07-25 04:06:56 +0200 (Thu, 25 Jul 2013)
New Revision: 2641

Modified:
   pkg/PortfolioAnalytics/R/optimize.portfolio.R
Log:
modifying optimize.portfolio_v2 so the user can pass in a traceDE argument which is then passed to DEcformals so the user can control the output for optimize_method='DEoptim'

Modified: pkg/PortfolioAnalytics/R/optimize.portfolio.R
===================================================================
--- pkg/PortfolioAnalytics/R/optimize.portfolio.R	2013-07-25 00:27:59 UTC (rev 2640)
+++ pkg/PortfolioAnalytics/R/optimize.portfolio.R	2013-07-25 02:06:56 UTC (rev 2641)
@@ -641,9 +641,10 @@
         if(!hasArg(parallelType) ) DEcformals$parallelType='auto' #use all cores
         if(!hasArg(packages) ) DEcformals$packages <- names(sessionInfo()$otherPkgs) #use all packages
       }
-      
       #TODO FIXME also check for a passed in controlDE list, including checking its class, and match formals
     }
+    if(hasArg(traceDE)) traceDE=match.call(expand.dots=TRUE)$traceDE else traceDE=TRUE
+    DEcformals$trace <- traceDE
     
     if(isTRUE(trace)) { 
       #we can't pass trace=TRUE into constrained objective with DEoptim, because it expects a single numeric return



More information about the Returnanalytics-commits mailing list