17 #ifndef AGXPOWERLINE_CONNECTOR_H 18 #define AGXPOWERLINE_CONNECTOR_H 38 class PhysicalDimensionMultiBodyConstraintImplementation;
62 virtual void initConstraint();
89 virtual bool disconnect();
107 virtual agx::Real calculateViolation( )
const;
114 const DimensionTypeVector& getInputTypes()
const;
115 const DimensionTypeVector& getOutputTypes()
const;
120 bool getInputUnits(UnitPtrSetVector& units,
const bool startFromCleanUnitSet =
true);
121 bool getOutputUnits(UnitPtrSetVector& units,
const bool startFromCleanUnitSet =
true);
122 bool getUnits(UnitPtrSetVector& units,
agxPowerLine::Side side,
const bool startFromCleanUnitSet =
true);
123 bool getUnits(UnitPtrSetVector& units,
const bool startFromCleanUnitSet =
true);
127 bool getInputUnits(UnitConstPtrSetVector& units,
const bool startFromCleanUnitSet =
true)
const;
128 bool getOutputUnits(UnitConstPtrSetVector& units,
const bool startFromCleanUnitSet =
true)
const;
129 bool getUnits(UnitConstPtrSetVector& units,
agxPowerLine::Side side,
const bool startFromCleanUnitSet =
true)
const;
130 bool getUnits(UnitConstPtrSetVector& units,
const bool startFromCleanUnitSet =
true)
const;
139 void setNumPossibleInputConnections(
int num );
144 void setNumPossibleOutputConnections(
int num );
149 int getNumPossibleInputConnections()
const;
154 int getNumPossibleOutputConnections()
const;
157 int getNumInputConnections()
const;
158 int getNumOutputConnections()
const;
160 int getNumConnections()
const;
163 int getNumFreeInputConnections()
const;
164 int getNumFreeOutputConnections()
const;
166 int getNumFreeConnections()
const;
168 bool hasFreeInputConnection()
const;
169 bool hasFreeOutputConnection()
const;
171 bool hasFreeConnection()
const;
176 bool hasInputConnection(
Connection* connection);
181 bool hasOutputConnection(
Connection* connection);
270 virtual bool isOutput(
Connection* connection )
const;
338 bool isConstraintValid()
const;
352 bool getIgnoreForStoreRestoreStream()
const;
353 void setIgnoreForStoreRestoreStream(
bool ignore);
365 void setRatioDerivative(
agx::Real ratioDerivative);
367 bool getUnits(UnitPtrSetVector& units,
ConnectionRefVector& connections,
const bool startFromCleanUnitSet =
true);
368 bool getUnits(UnitConstPtrSetVector& units,
const ConnectionRefVector& connections,
const bool startFromCleanUnitSet =
true)
const;
370 bool hasNonValidInputConnection()
const;
371 bool hasNonValidOutputConnection()
const;
412 #endif // AGXMODEL_POWER_LINE_UTILS_H InputRef< T > in(const char *name, T &obj)
Create an object with a name and a reference to the object that should be restored (usually a pointer...
Links two connections together.
Utility class to hold custom implementations of constraints.
ConnectionRefVector m_inputConnections
OutputRef< Serializable > out(const char *name, const Serializable *obj)
Return an object that contain the name and the object that should be serialized to an archive...
const TypeTable & getTypes()
Constraint implementation for constraining a number of physical dimensions of the same type...
agx::Vector< PhysicalDimension::Type > DimensionTypeVector
agxPowerLine contains a collection of connected components that transport power across a system...
agx::Vector< Connector * > ConnectorPtrVector
agx::Vector< UnitRef > UnitRefVector
agx::ref_ptr< Unit > UnitRef
agx::SetVector< const Unit * > UnitConstPtrSetVector
agx::Vector< ConnectorRef > ConnectorRefVector
Smart pointer for handling referenced counted objects.
agx::SetVector< Connector * > ConnectorPtrSetVector
bool m_ignoreMeForStoreRestoreStream
ConnectionRefVector m_outputConnections
Abstract base class for storing/restoring a line/drums with version control.
DimensionTypeVector m_outputTypes
DimensionTypeVector m_inputTypes
AGXFMI_EXPORT InputVariable_Real * setDamping(agx::Constraint *constraint)
static bool connect(agxPowerLine::Unit *unit1, agxPowerLine::Side side1, agxPowerLine::Side side2, agxPowerLine::Unit *unit2)
Connect Unit->Unit.
Class for writing serialized data in binary format to a stream.
agx::ref_ptr< Connector > ConnectorRef
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
agx::SetVector< ConnectorRef > ConnectorRefSet
PowerLine is the base class for a system of power transfer integrated into the rigid body simulation...
agx::SetVector< Unit * > UnitPtrSetVector
PhysicalDimensionMultiBodyConstraintImplementation * m_constraint
agx::Vector< ConnectorObserver > ConnectorObserverVector
#define DOXYGEN_END_INTERNAL_BLOCK()
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
#define DOXYGEN_START_INTERNAL_BLOCK()
agx::Real m_ratioDerivative