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

update mml features

parent 7fc212d6
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
from ml.fml40.roles.dts.forest.tree import Tree from ml.fml40.roles.dts.forest.tree import Tree
from ml.mml40.roles.dts.parts.cantilever import Cantilever 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.association import Association
from ml.ml40.features.properties.associations.composite import Composite from ml.ml40.features.properties.associations.composite import Composite
...@@ -128,6 +129,7 @@ ...@@ -128,6 +129,7 @@
from ml.mml40.features.properties.values.MaterialProperties import MaterialProperties from ml.mml40.features.properties.values.MaterialProperties import MaterialProperties
from ml.mml40.features.properties.values.Stretch import Stretch from ml.mml40.features.properties.values.Stretch import Stretch
from ml.ml40.features.functionalities.accepts_jobs import AcceptsJobs from ml.ml40.features.functionalities.accepts_jobs import AcceptsJobs
from ml.ml40.features.functionalities.accepts_reports import AcceptsReports from ml.ml40.features.functionalities.accepts_reports import AcceptsReports
from ml.ml40.features.functionalities.clears_jobs import ClearsJobs from ml.ml40.features.functionalities.clears_jobs import ClearsJobs
...@@ -401,7 +403,6 @@ def create_thing(model, grant_type="password", ...@@ -401,7 +403,6 @@ def create_thing(model, grant_type="password",
is_stanford2010_sync=is_stanford2010_sync, is_stanford2010_sync=is_stanford2010_sync,
stanford2010_path=stanford2010_path, stanford2010_path=stanford2010_path,
is_database=is_database, is_database=is_database,
database_conf=database_conf,
database_file=database_file, database_file=database_file,
) )
build(thing_ref, model) build(thing_ref, model)
......
...@@ -14,10 +14,10 @@ def __init__(self, name="", identifier=""): ...@@ -14,10 +14,10 @@ def __init__(self, name="", identifier=""):
name=name, name=name,
identifier=identifier) identifier=identifier)
def compileDisplacementWithGeometry(self, geometryType) -> Displacement: def compileDisplacementWithGeometry(self, stretchData, geometryType) -> [Displacement]:
pass pass
def compileDisplacementWithMaterial(self, materialType) -> Displacement: def compileDisplacementWithMaterial(self, stretchData, materialType) -> [Displacement]:
pass pass
def getMaxDisplacement(self) -> Displacement: def getMaxDisplacement(self) -> Displacement:
...@@ -26,8 +26,8 @@ def getMaxDisplacement(self) -> Displacement: ...@@ -26,8 +26,8 @@ def getMaxDisplacement(self) -> Displacement:
def getMinDisplacement(self) -> Displacement: def getMinDisplacement(self) -> Displacement:
pass pass
def getDisplacementData(self, time) -> Displacement: def getDisplacementData(self, time) -> [Displacement]:
pass pass
def getDisplacementDataSeries(self, startTime, endTime): def getDisplacementDataSeries(self, startTime, endTime) -> [Displacement]:
pass pass
...@@ -14,10 +14,10 @@ def __init__(self, name="", identifier=""): ...@@ -14,10 +14,10 @@ def __init__(self, name="", identifier=""):
name=name, name=name,
identifier=identifier) identifier=identifier)
def compileForceWithMaterial(self, materialType) -> Force: def compileForceWithMaterial(self, stretchData, materialType) -> [Force]:
pass pass
def compileForceWithGeometry(self, geometryType) -> Force: def compileForceWithGeometry(self, stretchData, geometryType) -> [Force]:
pass pass
def getMaxForce(self) -> Force: def getMaxForce(self) -> Force:
...@@ -29,6 +29,6 @@ def getMinForce(self) -> Force: ...@@ -29,6 +29,6 @@ def getMinForce(self) -> Force:
def getForceData(self, time) -> Force: def getForceData(self, time) -> Force:
pass pass
def getForceDataSeries(self, startTime, endTime): def getForceDataSeries(self, startTime, endTime) -> [Force]:
pass pass
...@@ -6,19 +6,19 @@ def __init__(self, name="", identifier=""): ...@@ -6,19 +6,19 @@ def __init__(self, name="", identifier=""):
super().__init__( super().__init__(
name=name, name=name,
identifier=identifier) identifier=identifier)
self.__load_changes = None self.__max_amount_load_change = None
self.__material_type = None self.__material_type = None
self.__yield_strength = None self.__yield_strength = None
self.__young_modulus = None self.__young_modulus = None
self.__json_out = dict() self.__json_out = dict()
@property @property
def loadChanges(self): def maxAmountLoadChange(self):
return self.__load_changes return self.__max_amount_load_change
@loadChanges.setter @maxAmountLoadChange.setter
def loadChanges(self, value): def maxAmountLoadChange(self, value):
self.__load_changes = value self.__max_amount_load_change = value
@property @property
def materialType(self): def materialType(self):
...@@ -46,8 +46,8 @@ def youngModulus(self, value): ...@@ -46,8 +46,8 @@ def youngModulus(self, value):
def to_json(self): def to_json(self):
self.__json_out = super().to_json() self.__json_out = super().to_json()
if self.loadChanges is not None: if self.maxAmountLoadChange is not None:
self.__json_out["loadChanges"] = self.loadChanges self.__json_out["maxAmountLoadChange"] = self.maxAmountLoadChange
if self.materialType is not None: if self.materialType is not None:
self.__json_out["materialType"] = self.materialType 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