public static Constraint differentialActivity ( boolean activating ) { if ( activating ) return new AND ( new MappedConst ( new ActivityConstraint ( true ) , 1 ) , new MappedConst ( new ActivityConstraint ( false ) , 0 ) ) ; else return new AND ( new MappedConst ( new ActivityConstraint ( true ) , 0 ) , new MappedConst ( new ActivityConstraint ( false ) , 1 ) ) ; }
Gets a constraint to ensure that ensures only one of the two PhysicalEntities has an activity . Size of this constraint is 2 .