DeviationEdgeLengthConstraint
- class compas_cem.optimization.DeviationEdgeLengthConstraint(edge=None, length=None, weight=1.0)[source]
Bases:
compas_cem.optimization.constraints.constraint.ConstraintMake a deviation edge reach a target length.
Methods
copy([cls])Make an independent copy of the data object.
datatype()Get the data type of this COMPAS object.
error(data)The length error of a deviation edge.
from_data(data)Creates a serializable object from structured data.
from_json(filepath)Construct a serializable object from structured data contained in a json file.
from_jsonstring(string)Construct an object from serialized data contained in a JSON string.
key()The key to an edge or a node in a form diagram.
object_cls_from_dtype(dtype)reference(data)target()The target to reach.
to_data()Returns a dictionary of structured data representing a serializable object.
to_json(filepath[, pretty])Serialize this object to a structured json.
to_jsonstring([pretty])Serialize the data representation of an object to a JSON string.
Validate the data of this object against its data schema (self.DATASCHEMA).
Validate the data loaded from a JSON representation of the data of this object against its data schema (self.DATASCHEMA).