Implement Limits
This commit is contained in:
committed by
PaddleStroke
parent
3a9e7cecab
commit
ad4a563b42
@@ -29,6 +29,7 @@
|
||||
#include "VelICKineSolver.h"
|
||||
#include "AccICKineNewtonRaphson.h"
|
||||
#include "PosICDragNewtonRaphson.h"
|
||||
#include "PosICDragLimitNewtonRaphson.h"
|
||||
|
||||
using namespace MbD;
|
||||
|
||||
@@ -175,6 +176,7 @@ void SystemSolver::runPreDrag()
|
||||
void MbD::SystemSolver::runDragStep(std::shared_ptr<std::vector<std::shared_ptr<Part>>> dragParts)
|
||||
{
|
||||
runPosICDrag(dragParts);
|
||||
runPosICDragLimit();
|
||||
}
|
||||
|
||||
void SystemSolver::runQuasiKinematic()
|
||||
@@ -219,6 +221,14 @@ void MbD::SystemSolver::runPosICDrag(std::shared_ptr<std::vector<std::shared_ptr
|
||||
icTypeSolver->run();
|
||||
}
|
||||
|
||||
void MbD::SystemSolver::runPosICDragLimit()
|
||||
{
|
||||
auto newtonRaphson = PosICDragLimitNewtonRaphson::With();
|
||||
icTypeSolver = newtonRaphson;
|
||||
icTypeSolver->setSystem(this);
|
||||
icTypeSolver->run();
|
||||
}
|
||||
|
||||
void SystemSolver::runPosICKine()
|
||||
{
|
||||
icTypeSolver = CREATE<PosICKineNewtonRaphson>::With();
|
||||
@@ -255,6 +265,11 @@ std::shared_ptr<std::vector<std::shared_ptr<Part>>> SystemSolver::parts()
|
||||
return system->parts;
|
||||
}
|
||||
|
||||
std::shared_ptr<std::vector<std::shared_ptr<LimitIJ>>> MbD::SystemSolver::limits()
|
||||
{
|
||||
return system->limits;
|
||||
}
|
||||
|
||||
std::shared_ptr<std::vector<std::shared_ptr<Constraint>>> SystemSolver::essentialConstraints()
|
||||
{
|
||||
return system->essentialConstraints();
|
||||
@@ -290,6 +305,16 @@ void SystemSolver::partsJointsMotionsForcesTorquesDo(const std::function<void(st
|
||||
system->partsJointsMotionsForcesTorquesDo(f);
|
||||
}
|
||||
|
||||
void MbD::SystemSolver::partsJointsMotionsLimitsDo(const std::function<void(std::shared_ptr<Item>)>& f)
|
||||
{
|
||||
system->partsJointsMotionsLimitsDo(f);
|
||||
}
|
||||
|
||||
void MbD::SystemSolver::partsJointsMotionsLimitsForcesTorquesDo(const std::function<void(std::shared_ptr<Item>)>& f)
|
||||
{
|
||||
system->partsJointsMotionsLimitsForcesTorquesDo(f);
|
||||
}
|
||||
|
||||
void SystemSolver::discontinuityBlock()
|
||||
{
|
||||
assert(false);
|
||||
@@ -344,3 +369,13 @@ void SystemSolver::time(double t)
|
||||
{
|
||||
system->mbdTimeValue(t);
|
||||
}
|
||||
|
||||
bool MbD::SystemSolver::limitsSatisfied()
|
||||
{
|
||||
return system->limitsSatisfied();
|
||||
}
|
||||
|
||||
void MbD::SystemSolver::deactivateLimits()
|
||||
{
|
||||
system->deactivateLimits();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user