Class: AddElectricVehicleChargingLoad::ElectricVehicle

Inherits:
Object
  • Object
show all
Defined in:
lib/measures/AddElectricVehicleChargingLoad/measure.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ ElectricVehicle

Returns a new instance of ElectricVehicle.



149
150
151
152
153
154
155
156
157
158
# File 'lib/measures/AddElectricVehicleChargingLoad/measure.rb', line 149

def initialize(name)
  @name = name
  @has_been_charged = false
  @connected_to_charger = false
  @arrival_time = nil
  @leave_time = nil
  @start_charge_time = nil
  @end_charge_time = nil
  @needed_charge_hours = nil
end

Instance Attribute Details

#arrival_timeObject

time this EV arrives at the building



163
164
165
# File 'lib/measures/AddElectricVehicleChargingLoad/measure.rb', line 163

def arrival_time
  @arrival_time
end

#connected_to_chargerObject

Type: boolean. if this EV is currently connected to a charger



162
163
164
# File 'lib/measures/AddElectricVehicleChargingLoad/measure.rb', line 162

def connected_to_charger
  @connected_to_charger
end

#end_charge_timeObject

time this EV ends charging



166
167
168
# File 'lib/measures/AddElectricVehicleChargingLoad/measure.rb', line 166

def end_charge_time
  @end_charge_time
end

#has_been_chargedObject

Type: boolean. if this EV has been charged



161
162
163
# File 'lib/measures/AddElectricVehicleChargingLoad/measure.rb', line 161

def has_been_charged
  @has_been_charged
end

#leave_timeObject

time this EV arrives at the building



164
165
166
# File 'lib/measures/AddElectricVehicleChargingLoad/measure.rb', line 164

def leave_time
  @leave_time
end

#nameObject

Type: string. Name.



160
161
162
# File 'lib/measures/AddElectricVehicleChargingLoad/measure.rb', line 160

def name
  @name
end

#needed_charge_hoursObject

needed number of hours to charge to full



167
168
169
# File 'lib/measures/AddElectricVehicleChargingLoad/measure.rb', line 167

def needed_charge_hours
  @needed_charge_hours
end

#start_charge_timeObject

time this EV starts charging



165
166
167
# File 'lib/measures/AddElectricVehicleChargingLoad/measure.rb', line 165

def start_charge_time
  @start_charge_time
end