Difference between revisions of "City-level climate policy model"

From Testiwiki
Jump to: navigation, search
(Formula)
(Formula: might work but no data to test)
Line 91: Line 91:
 
EvalOutput(ova, me = "Transport")
 
EvalOutput(ova, me = "Transport")
  
equations <- tidy(op_baseGetData("opasnet_base", "Op_enXXXX"), objname = "equations")
+
equations <- tidy(op_baseGetData("opasnet_base", "Op_en5811"), objname = "equations") # This should be the page "City-level climate policy model/equations" but it does not exist yet.
 +
 
 +
equations
  
 
### This formula creates a causal model with linear dependencies between ovariables Policy.target, Action.on, ...
 
### This formula creates a causal model with linear dependencies between ovariables Policy.target, Action.on, ...
Line 99: Line 101:
  
 
# Find coefficients of equations that are relevant for this ovariable.
 
# Find coefficients of equations that are relevant for this ovariable.
 +
 +
# Take those equations that are defining the object at hand.
 +
coefficients <- equations[equations$Equation == equations[equations$Role == "Child" & equations$Step == me, "Equation"], ]
 +
 
coefficients <- new("ovariable",
 
coefficients <- new("ovariable",
 
name = "coefficients",
 
name = "coefficients",
data = equations[equations$Equation == equations[equations$Role == "Child" & equations$Step == me, "Equation"], ]
+
data = coefficients
 
)
 
)
 
 
Line 111: Line 117:
 
return(out)
 
return(out)
 
}
 
}
 +
 +
# Define all ovariables needed.
 +
 +
issues
  
 
Policy.targets <- new("ovariable",  
 
Policy.targets <- new("ovariable",  
 
name = "Policy.targets",  
 
name = "Policy.targets",  
data = tidy(issues[issues$Table == "Policy target" , ], objname = "Policy.target")
+
data = tidy(issues[issues$Step == "Policy target" , ], objname = "Policy.target")
 
)
 
)
  
 
Action.on <- new("ovariable",  
 
Action.on <- new("ovariable",  
 
name = "Action.on",  
 
name = "Action.on",  
data = tidy(issues[issues$Table == "Action on" , ], objname = "Action.on"),
+
data = tidy(issues[issues$Step == "Action on" , ], objname = "Action.on"),
 
dependencies = data.frame(Name = c(
 
dependencies = data.frame(Name = c(
 
"equation",  
 
"equation",  
Line 129: Line 139:
 
Primary.impact.on <- new("ovariable",  
 
Primary.impact.on <- new("ovariable",  
 
name = "Primary.impact.on",  
 
name = "Primary.impact.on",  
data = tidy(issues[issues$Table == "Primary impact on" , ], objname = "Primary impact on"),
+
data = tidy(issues[issues$Step == "Primary impact on" , ], objname = "Primary impact on"),
 
dependencies = data.frame(Name = c(
 
dependencies = data.frame(Name = c(
 
"equation",  
 
"equation",  
Line 140: Line 150:
 
End.use.of.energy <- new("ovariable",  
 
End.use.of.energy <- new("ovariable",  
 
name = "End.use.of.energy",  
 
name = "End.use.of.energy",  
data = tidy(issues[issues$Table == "End use of energy" , ], objname = "End.use.of.energy"),
+
data = tidy(issues[issues$Step == "End use of energy" , ], objname = "End.use.of.energy"),
 
dependencies = data.frame(Name = c(
 
dependencies = data.frame(Name = c(
 
"equation",  
 
"equation",  
Line 152: Line 162:
 
Emission <- new("ovariable",  
 
Emission <- new("ovariable",  
 
name = "Emission",  
 
name = "Emission",  
data = tidy(issues[issues$Table == "Emission" , ], objname = "Emission"),
+
data = tidy(issues[issues$Step == "Emission" , ], objname = "Emission"),
 
dependencies = data.frame(Name = c(
 
dependencies = data.frame(Name = c(
 
"equation",  
 
"equation",  
Line 165: Line 175:
 
Time.budget <- new("ovariable",  
 
Time.budget <- new("ovariable",  
 
name = "Time.budget",  
 
name = "Time.budget",  
data = tidy(issues[issues$Table == "Time budget" , ], objname = "Time.budget"),
+
data = tidy(issues[issues$Step == "Time budget" , ], objname = "Time.budget"),
 
dependencies = data.frame(Name = c(
 
dependencies = data.frame(Name = c(
 
"equation",  
 
"equation",  
Line 179: Line 189:
 
Exposure <- new("ovariable",  
 
Exposure <- new("ovariable",  
 
name = "Exposure",  
 
name = "Exposure",  
data = tidy(issues[issues$Table == "Exposure" , ], objname = "Exposure"),
+
data = tidy(issues[issues$Step == "Exposure" , ], objname = "Exposure"),
 
dependencies = data.frame(Name = c(
 
dependencies = data.frame(Name = c(
 
"equation",  
 
"equation",  
Line 194: Line 204:
 
Policy.outcome <- new("ovariable",  
 
Policy.outcome <- new("ovariable",  
 
name = "Policy.outcome",  
 
name = "Policy.outcome",  
data = tidy(issues[issues$Table == "Policy.outcome" , ], objname = "Policy.outcome"),
+
data = tidy(issues[issues$Step == "Policy.outcome" , ], objname = "Policy.outcome"),
 
dependencies = data.frame(Name = c(
 
dependencies = data.frame(Name = c(
 
"equation",  
 
"equation",  
Line 208: Line 218:
 
formula = formula
 
formula = formula
 
)
 
)
 +
 +
# Evaluate all ovariables, starting from upstream.
 +
 +
EvalOutput(Policy.target, me = "Policy target")
 +
EvalOutput(Action.on, me = "Action on")
 +
EvalOutput(Primary.impact.on, me = "Primary.impact.on")
 +
EvalOutput(End.use.of.energy, me = "End use of energy")
 +
EvalOutput(Emission, me = "Emission")
 +
EvalOutput(Time.budget, me = "Time.budget")
 +
EvalOutput(Exposure, me = "Exposure")
 +
EvalOutput(Policy.outcome, me = "Policy.outcome")
  
 
</rcode>
 
</rcode>

Revision as of 09:28, 13 September 2012



Scope

Question

Boundaries

Scenarios

Intended users

Participants

Answer

Error creating thumbnail: Unable to save thumbnail to destination
Add a legend for your diagram.

Rationale

Dependencies

This is a generic table format and assessment structure for most inputs of the model. This is based on File:UrgencheConceptualModel.xlsx

We need too tables, one with all issues listed (with estimates where there is direct data), and another for equations that connect issues. The assessment has seven steps:

  • Policy target
  • Action on
  • Primary impact on
  • End use of energy
  • Emission
  • Time budget
  • Exposure
  • Policy outcome

This table contains the issues:

Difference between revisions of "City-level climate policy model"(-)
ObsStepTopicIssueUnitResultDescription
1Policy targetUrban areaUrban densitym2/km2floor space
2Policy targetUrban areaUrban plan/zoning
3Policy targetUrban areaStreet networklane-km(/km2)
4Policy targetUrban areaRail networkrail-km(/km2)
5Policy targetUrban areaWalk/bike networkkm(/km2)
6Policy targetTransportLocal person transporttotal person-km/a
7Policy targetTransport(intercity personal transport)
8Policy targetTransportLocal transport of goods
9Policy targetTransport(long range goods transport)
10Policy targetTransport(street) transport electrification% person-km
11Etc

The connections between items is created using this kind of a table (here a wiki table format is used, but actually it should be a data table on a page called City-level climate policy model/equations). Proximity to work and school is used as an example. All causal dependencies are interpreted in the following way, where each equation defines one child:

Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): Child = \Sigma Parent_i * Coefficient_i

Dependencies of issues
Equation Step Topic Issue Role Coefficient Description
1 Impact on Urban environment functionality Proximity to work and school Child
1 Action on Urban development Population density Parent 1
1 Action on Urban development Land use efficiency Parent 2.2
1 Policy target Urban area Urban plan/zoning Parent 3.6

Formula

+ Show code

See also

Keywords

References


Related files

<mfanonymousfilelist></mfanonymousfilelist>