Add constraint island discovery
PiperOrigin-RevId: 557067599 Change-Id: Ic41e1d0efef02b7a79142518afe49cf9d4e74725
This commit is contained in:
committed by
Copybara-Service
parent
e4dddea42a
commit
3e034e38b2
@@ -710,6 +710,7 @@ void MjDataWrapper::Serialize(std::ostream& output) const {
|
||||
X(nnzJ);
|
||||
X(nefc);
|
||||
X(ncon);
|
||||
X(nisland);
|
||||
X(time);
|
||||
X(energy);
|
||||
#undef X
|
||||
@@ -734,10 +735,12 @@ void MjDataWrapper::Serialize(std::ostream& output) const {
|
||||
|
||||
MJDATA_ARENA_POINTERS_CONTACT
|
||||
MJDATA_ARENA_POINTERS_PRIMAL
|
||||
|
||||
if (this->metadata_.is_dual) {
|
||||
MJDATA_ARENA_POINTERS_DUAL
|
||||
}
|
||||
if (this->ptr_->nisland) {
|
||||
MJDATA_ARENA_POINTERS_ISLAND
|
||||
}
|
||||
#undef MJ_M
|
||||
#define MJ_M(x) x
|
||||
#undef MJ_D
|
||||
@@ -799,6 +802,7 @@ MjDataWrapper MjDataWrapper::Deserialize(std::istream& input) {
|
||||
X(nnzJ);
|
||||
X(nefc);
|
||||
X(ncon);
|
||||
X(nisland);
|
||||
X(time);
|
||||
X(energy);
|
||||
#undef X
|
||||
@@ -825,10 +829,12 @@ MjDataWrapper MjDataWrapper::Deserialize(std::istream& input) {
|
||||
|
||||
MJDATA_ARENA_POINTERS_CONTACT
|
||||
MJDATA_ARENA_POINTERS_PRIMAL
|
||||
|
||||
if (metadata.is_dual) {
|
||||
MJDATA_ARENA_POINTERS_DUAL
|
||||
}
|
||||
if (d->nisland) {
|
||||
MJDATA_ARENA_POINTERS_ISLAND
|
||||
}
|
||||
#undef MJ_M
|
||||
#define MJ_M(x) x
|
||||
#undef MJ_D
|
||||
@@ -1830,6 +1836,7 @@ This is useful for example when the MJB is not available as a file on disk.)"));
|
||||
|
||||
MJDATA_ARENA_POINTERS_PRIMAL
|
||||
MJDATA_ARENA_POINTERS_DUAL
|
||||
MJDATA_ARENA_POINTERS_ISLAND
|
||||
|
||||
#undef MJ_M
|
||||
#define MJ_M(x) (x)
|
||||
|
||||
Reference in New Issue
Block a user