AGX Dynamics  2.35.0.1
agxDriveTrain/EnergyManager.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. 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 
114 
121 
128 
135 
142 
149 
155  static agx::Real getPower( const agxDriveTrain::Engine* motor );
156 
163 
164  private:
165  EnergyManager() = default;
166  };
167 }
#define AGXMODEL_EXPORT
An electric motor is a roational unit that is a source of power in a drive train.
Definition: ElectricMotor.h:33
static agx::Real getWorkDone(const agxDriveTrain::ElectricMotor *motor)
Get the work done by an electric motor.
static agx::Real getPower(const agxDriveTrain::ElectricMotor *motor)
Get the power for an electric motor.
static void remove(const agxDriveTrain::FixedVelocityEngine *motor, const agxSDK::Simulation *simulation=nullptr)
Removes an fixed velocity engine from the EnergyManager.
static agx::Real getPower(const agxDriveTrain::CombustionEngine *motor)
Get the power for a combustion engine.
static agx::Real getWorkDone(const agxDriveTrain::CombustionEngine *motor)
Get the work done by a combustion engine.
static void remove(const agxDriveTrain::ElectricMotor *motor, const agxSDK::Simulation *simulation=nullptr)
Removes an electric motor from the EnergyManager.
static void add(const agxDriveTrain::FixedVelocityEngine *motor, const agxSDK::Simulation *simulation=nullptr)
Adds an fixed velocity engine to the EnergyManager.
static agx::Real getWorkDone(const agxDriveTrain::FixedVelocityEngine *motor)
Get the work done by a fixed velocity engine.
static void remove(const agxDriveTrain::Engine *motor, const agxSDK::Simulation *simulation=nullptr)
Removes an engine from the EnergyManager.
static void add(const agxDriveTrain::CombustionEngine *motor, const agxSDK::Simulation *simulation=nullptr)
Adds an combustion engine to the EnergyManager.
static void add(const agxDriveTrain::Engine *motor, const agxSDK::Simulation *simulation=nullptr)
Adds an engine to the EnergyManager.
static agx::Real getPower(const agxDriveTrain::Engine *motor)
Get the power for an engine.
static agx::Real getWorkDone(const agxDriveTrain::Engine *motor)
Get the work done by an engine.
static void add(const agxDriveTrain::ElectricMotor *motor, const agxSDK::Simulation *simulation=nullptr)
Adds an electric motor to the EnergyManager.
static agx::Real getPower(const agxDriveTrain::FixedVelocityEngine *motor)
Get the power for a fixed velocity engine.
static void remove(const agxDriveTrain::CombustionEngine *motor, const agxSDK::Simulation *simulation=nullptr)
Removes a combustion engine from the EnergyManager.
An engine that is driven by an EnginePowerGenerator.
Definition: Engine.h:88
An engine that tries to hold a fixed velocity.
Definition: Engine.h:425
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:127
A library of agxPowerLine components designed to model the various parts of a vehicle drive train.
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:31
double Real
Definition: Real.h:42