Skip to content

SubmitCarbonOutputReport

tumblerer edited this page Jun 15, 2012 · 4 revisions

Action used by Participants (Agents) in the simulation to report their carbon emission to the Environment for any simulation Time t.

public class SubmitCarbonEmissionReport

At any point in the simulation, a Participant can choose to invoke this action. The action can be invoked by a participant by the following way:

this.environment.act(new SubmitCarbonEmissionReport(this.carbonOutput,SimTime.getTime()), this.getID(), this.authKey);

SubmitCarbonEmissionReport needs to be overridden in order for you to cheat.

This will invoke an action (SubmitCarbonEmissionReport) which will be handled by an action handler called SubmitCarbonEmissionReportHandler, which is assumed to be already registered in the Simulation.java file.

  • Member Data:

    • carbonOuput: variable used to store the amount of carbon output at point of invoking the action

        final private Double carbonOutput
      
    • simTime: simulation time at which this action was invoked

        final private Time simTime
      
  • Member Functions:

    • Constructor: Constructor method to invoke the SubmitCarbonEmissionReport action

        public SubmitCarbonEmissionReport(final Double carbonEmission, final Time simTime)
      
    • toString(): overrides the default toString() function of the Action class

        public String toString()
      
    • getSimeTime(): getter function for simTime

        public Time getSimTime()
      
    • getCarbonEmission(): getter function for carbonEmission

        public Double getCarbonEmission()
      
Clone this wiki locally