Commit bad2b8f6 authored by Jiahang Chen's avatar Jiahang Chen
Browse files

update mml features

parent 7fc212d6
......@@ -59,6 +59,7 @@
from ml.fml40.roles.dts.forest.tree import Tree
from ml.mml40.roles.dts.parts.cantilever import Cantilever
from ml.mml40.roles.dts.sensors.strain_gauge import StrainGauge
from ml.ml40.features.properties.associations.association import Association
from ml.ml40.features.properties.associations.composite import Composite
......@@ -128,6 +129,7 @@
from ml.mml40.features.properties.values.MaterialProperties import MaterialProperties
from ml.mml40.features.properties.values.Stretch import Stretch
from ml.ml40.features.functionalities.accepts_jobs import AcceptsJobs
from ml.ml40.features.functionalities.accepts_reports import AcceptsReports
from ml.ml40.features.functionalities.clears_jobs import ClearsJobs
......@@ -401,7 +403,6 @@ def create_thing(model, grant_type="password",
is_stanford2010_sync=is_stanford2010_sync,
stanford2010_path=stanford2010_path,
is_database=is_database,
database_conf=database_conf,
database_file=database_file,
)
build(thing_ref, model)
......
......@@ -14,10 +14,10 @@ def __init__(self, name="", identifier=""):
name=name,
identifier=identifier)
def compileDisplacementWithGeometry(self, geometryType) -> Displacement:
def compileDisplacementWithGeometry(self, stretchData, geometryType) -> [Displacement]:
pass
def compileDisplacementWithMaterial(self, materialType) -> Displacement:
def compileDisplacementWithMaterial(self, stretchData, materialType) -> [Displacement]:
pass
def getMaxDisplacement(self) -> Displacement:
......@@ -26,8 +26,8 @@ def getMaxDisplacement(self) -> Displacement:
def getMinDisplacement(self) -> Displacement:
pass
def getDisplacementData(self, time) -> Displacement:
def getDisplacementData(self, time) -> [Displacement]:
pass
def getDisplacementDataSeries(self, startTime, endTime):
def getDisplacementDataSeries(self, startTime, endTime) -> [Displacement]:
pass
......@@ -14,10 +14,10 @@ def __init__(self, name="", identifier=""):
name=name,
identifier=identifier)
def compileForceWithMaterial(self, materialType) -> Force:
def compileForceWithMaterial(self, stretchData, materialType) -> [Force]:
pass
def compileForceWithGeometry(self, geometryType) -> Force:
def compileForceWithGeometry(self, stretchData, geometryType) -> [Force]:
pass
def getMaxForce(self) -> Force:
......@@ -29,6 +29,6 @@ def getMinForce(self) -> Force:
def getForceData(self, time) -> Force:
pass
def getForceDataSeries(self, startTime, endTime):
def getForceDataSeries(self, startTime, endTime) -> [Force]:
pass
......@@ -6,19 +6,19 @@ def __init__(self, name="", identifier=""):
super().__init__(
name=name,
identifier=identifier)
self.__load_changes = None
self.__max_amount_load_change = None
self.__material_type = None
self.__yield_strength = None
self.__young_modulus = None
self.__json_out = dict()
@property
def loadChanges(self):
return self.__load_changes
def maxAmountLoadChange(self):
return self.__max_amount_load_change
@loadChanges.setter
def loadChanges(self, value):
self.__load_changes = value
@maxAmountLoadChange.setter
def maxAmountLoadChange(self, value):
self.__max_amount_load_change = value
@property
def materialType(self):
......@@ -46,8 +46,8 @@ def youngModulus(self, value):
def to_json(self):
self.__json_out = super().to_json()
if self.loadChanges is not None:
self.__json_out["loadChanges"] = self.loadChanges
if self.maxAmountLoadChange is not None:
self.__json_out["maxAmountLoadChange"] = self.maxAmountLoadChange
if self.materialType is not None:
self.__json_out["materialType"] = self.materialType
......
from ml.ml40.roles.dts.sensors.sensor import Sensor
class StrainGauge(Sensor):
def __init__(self, name="", identifier=""):
super(StrainGauge, self).__init__(
name=name,
identifier=identifier)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment