AGXDynamics  2.31.1.0
agxDriveTrain/EnergyManager.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2021. 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 namespace agxDriveTrain
30 {
31  class ElectricMotor;
32  class CombustionEngine;
33  class Engine;
34  class FixedVelocityEngine;
35 }
36 
37 namespace agxDriveTrain
38 {
40  {
41  public:
42 
49  static void add( const agxDriveTrain::ElectricMotor* motor, const agxSDK::Simulation* simulation = nullptr );
50 
57  static void add( const agxDriveTrain::CombustionEngine* motor, const agxSDK::Simulation* simulation = nullptr );
58 
65  static void add( const agxDriveTrain::Engine* motor, const agxSDK::Simulation* simulation = nullptr );
66 
73  static void add( const agxDriveTrain::FixedVelocityEngine* motor, const agxSDK::Simulation* simulation = nullptr );
74 
81  static void remove( const agxDriveTrain::ElectricMotor* motor, const agxSDK::Simulation* simulation = nullptr );
82 
89  static void remove( const agxDriveTrain::CombustionEngine* motor, const agxSDK::Simulation* simulation = nullptr );
90 
97  static void remove( const agxDriveTrain::Engine* motor, const agxSDK::Simulation* simulation = nullptr );
98 
105  static void remove( const agxDriveTrain::FixedVelocityEngine* motor,
106  const agxSDK::Simulation* simulation = nullptr );
107 
113  static agx::Real getWorkDone( const agxDriveTrain::ElectricMotor* motor );
114 
120  static agx::Real getWorkDone( const agxDriveTrain::CombustionEngine* motor );
121 
127  static agx::Real getWorkDone( const agxDriveTrain::Engine* motor );
128 
134  static agx::Real getWorkDone( const agxDriveTrain::FixedVelocityEngine* motor );
135 
141  static agx::Real getPower( const agxDriveTrain::ElectricMotor* motor );
142 
148  static agx::Real getPower( const agxDriveTrain::CombustionEngine* motor );
149 
155  static agx::Real getPower( const agxDriveTrain::Engine* motor );
156 
162  static agx::Real getPower( const agxDriveTrain::FixedVelocityEngine* motor );
163 
164  private:
165  EnergyManager() = default;
166  };
167 }
An engine that tries to hold a fixed velocity.
Definition: Engine.h:424
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:121
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