new EVCarModel(obj)
A class that represents a model of an Electric Vehicle (EV).
This class provides properties and methods to manage EV car models.
Parameters:
PropertiesName | Type | Description |
---|---|---|
obj | Module. | If the argument is an instance of |
Name | Type | Description |
---|---|---|
id | number | The ID of the EV car model. |
name | string | The name of the EV car model. |
batteryCapacity | number | The battery capacity of the EV car model. |
towbarPossible | boolean | Indicates whether the EV car model can have a towbar. |
ports | Array | The ports of the EV car model. |
vehicleRange | number | The range of the EV car model. |
efficiency | number | The efficiency of the EV car model. |
fastCharge | boolean | Indicates whether the EV car model supports fast charging. |
- Source
Example
```javascript
let evCarModel = new gem.routesAndNavigation.EVCarModel({id: 1, name: 'Model S', batteryCapacity: 100, towbarPossible: true, ports: [], vehicleRange: 500, efficiency: 0.85, fastCharge: true});
console.log(evCarModel.name); // Outputs: Model S
console.log(evCarModel.batteryCapacity); // Outputs: 100
console.log(evCarModel.towbarPossible); // Outputs: true
console.log(evCarModel.vehicleRange); // Outputs: 500
console.log(evCarModel.efficiency); // Outputs: 0.85
console.log(evCarModel.fastCharge); // Outputs: true
```
Extends
Methods
delete()
calls emscripten object destructor
- Inherited From
getRawPointer() → {object}
Returns emscripten object
- Inherited From
Returns:
- Type:
- object
isDeleted() → {boolean}
Check if emscripten object has been deleted
- Inherited From
Returns:
- Type:
- boolean