AGX Dynamics  2.37.2.0
agxDriveTrain/EnergyManager.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 
18 #pragma once
19 
20 #include <agxModel/export.h>
21 #include <agx/Real.h>
22 
23 // Forward declarations
24 
25 namespace agxSDK {
26  class Simulation;
27 }
28 
29 #ifndef SWIG
30 namespace agxDriveTrain
31 {
32  class ElectricMotor;
33  class CombustionEngine;
34  class Engine;
35  class FixedVelocityEngine;
36 }
37 #endif
38 
39 namespace agxDriveTrain
40 {
42  {
43  public:
44 
51  static void add( const agxDriveTrain::ElectricMotor* motor, const agxSDK::Simulation* simulation = nullptr );
52 
59  static void add( const agxDriveTrain::CombustionEngine* motor, const agxSDK::Simulation* simulation = nullptr );
60 
67  static void add( const agxDriveTrain::Engine* motor, const agxSDK::Simulation* simulation = nullptr );
68 
75  static void add( const agxDriveTrain::FixedVelocityEngine* motor, const agxSDK::Simulation* simulation = nullptr );
76 
83  static void remove( const agxDriveTrain::ElectricMotor* motor, const agxSDK::Simulation* simulation = nullptr );
84 
91  static void remove( const agxDriveTrain::CombustionEngine* motor, const agxSDK::Simulation* simulation = nullptr );
92 
99  static void remove( const agxDriveTrain::Engine* motor, const agxSDK::Simulation* simulation = nullptr );
100 
107  static void remove( const agxDriveTrain::FixedVelocityEngine* motor,
108  const agxSDK::Simulation* simulation = nullptr );
109 
115  static agx::Real getWorkDone( const agxDriveTrain::ElectricMotor* motor );
116 
122  static agx::Real getWorkDone( const agxDriveTrain::CombustionEngine* motor );
123 
129  static agx::Real getWorkDone( const agxDriveTrain::Engine* motor );
130 
136  static agx::Real getWorkDone( const agxDriveTrain::FixedVelocityEngine* motor );
137 
143  static agx::Real getPower( const agxDriveTrain::ElectricMotor* motor );
144 
150  static agx::Real getPower( const agxDriveTrain::CombustionEngine* motor );
151 
157  static agx::Real getPower( const agxDriveTrain::Engine* motor );
158 
164  static agx::Real getPower( const agxDriveTrain::FixedVelocityEngine* motor );
165 
166  private:
167  EnergyManager() = default;
168  };
169 }
An engine that tries to hold a fixed velocity.
Definition: Engine.h:424
A library of agxPowerLine components designed to model the various parts of a vehicle drive train...
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:126
An electric motor is a roational unit that is a source of power in a drive train. ...
Definition: ElectricMotor.h:32
#define AGXMODEL_EXPORT
double Real
Definition: Real.h:42
An engine that is driven by an EnginePowerGenerator.
Definition: Engine.h:87
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:30