[Travelr-commits] r34 - in pkg/travelr: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Jun 22 15:09:03 CEST 2012


Author: jrawbits
Date: 2012-06-22 15:09:02 +0200 (Fri, 22 Jun 2012)
New Revision: 34

Modified:
   pkg/travelr/DESCRIPTION
   pkg/travelr/R/Highway_Assignment.R
Log:
Fixed parenthesis error in highway.assignment.MSA

Modified: pkg/travelr/DESCRIPTION
===================================================================
--- pkg/travelr/DESCRIPTION	2012-05-01 14:28:40 UTC (rev 33)
+++ pkg/travelr/DESCRIPTION	2012-06-22 13:09:02 UTC (rev 34)
@@ -1,5 +1,5 @@
 Package: travelr
-Version: 0.1-8
+Version: 0.1-9
 Date: 2012-04-30
 Title: Functions for Travel Demand Modeling
 Author: Jeremy Raw

Modified: pkg/travelr/R/Highway_Assignment.R
===================================================================
--- pkg/travelr/R/Highway_Assignment.R	2012-05-01 14:28:40 UTC (rev 33)
+++ pkg/travelr/R/Highway_Assignment.R	2012-06-22 13:09:02 UTC (rev 34)
@@ -39,7 +39,7 @@
 
 	# First check the aset parameter
 	if (class(aset)!="highway.assignment.set")
-		stop("Must provide an assignment.set object as first parameter (aset)")
+		stop(gettext("Must provide an assignment.set object as first parameter (aset)"))
 	# Then find the appropriate method
 	if (length(method)>1) {
 		method<-method[1] # which means the default method is the first in the built-in list
@@ -175,7 +175,7 @@
 .highway.assignment.AON <- function(aset,control) {
 	verbose <- parse.control(control,"verbose")
 	if ( verbose>0 )
-		message("All-or-Nothing (AON) highway assignment\n")
+		message(gettext("All-or-Nothing (AON) highway assignment\n"))
 	assign.results<-build.and.load.paths(aset,aset$ff.cost)
 	intercept<-(build.intercept.function(iset<-parse.control(control,"intercept"),aset))(assign.results$paths)
 	return(list(aset=aset,costs=aset$ff.cost,
@@ -188,12 +188,12 @@
 	log.function<-build.log.function(control)
 	verbose <- parse.control(control,"verbose")
 	if ( verbose>0 )
-		message("Multiple Successive Averages (MSA) highway assignment\n")
+		message(gettext("Multiple Successive Averages (MSA) highway assignment\n"))
 	max.iter <- parse.control(control,"max.iter",4)
 	if (attr(max.iter,"default")) {
 		message(sprintf(gettext("Maximum iterations for MSA assignment set to default (%d)\n"),max.iter))
 	} else if ( verbose>0 ) {
-		message(sprintf("Maximum iterations for MSA assignment set to %d\n"),max.iter)
+		message(sprintf(gettext("Maximum iterations for MSA assignment set to %d\n"),max.iter))
 	}
 	control$max.iter<-max.iter
 
@@ -237,7 +237,7 @@
 	log.function<-build.log.function(control)
 	verbose <- parse.control(control,"verbose")
 	if ( verbose>0 )
-		message("Frank-Wolfe highway assignment\n")
+		message(gettext("Frank-Wolfe highway assignment\n"))
 
 	# Construct helper values and functions
 	flow<-sum(sapply(aset$classes,function(ac)sum(ac$demand),USE.NAMES=FALSE))
@@ -281,7 +281,7 @@
 	log.function<-build.log.function(control)
 	verbose <- parse.control(control,"verbose")
 	if ( verbose>0 )
-		message("ParTan highway assignment\n")
+		message(gettext("ParTan highway assignment\n"))
 
 	# Construct helper values and functions
 	flow<-sum(sapply(aset$classes,function(ac)sum(ac$demand),USE.NAMES=FALSE))



More information about the Travelr-commits mailing list