Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
KWH40
fml40-reference-implementation
Commits
bad2b8f6
Commit
bad2b8f6
authored
Jul 10, 2021
by
Jiahang Chen
Browse files
update mml features
parent
7fc212d6
Changes
6
Hide whitespace changes
Inline
Side-by-side
ml/dt_factory.py
View file @
bad2b8f6
...
...
@@ -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
)
...
...
ml/mml40/features/functionalities/ProvidesDisplacementData.py
View file @
bad2b8f6
...
...
@@ -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
ml/mml40/features/functionalities/ProvidesForceData.py
View file @
bad2b8f6
...
...
@@ -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
ml/mml40/features/properties/values/MaterialProperties.py
View file @
bad2b8f6
...
...
@@ -6,19 +6,19 @@ def __init__(self, name="", identifier=""):
super
().
__init__
(
name
=
name
,
identifier
=
identifier
)
self
.
__load_change
s
=
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
l
oadChange
s
(
self
):
return
self
.
__load_change
s
def
maxAmountL
oadChange
(
self
):
return
self
.
__
max_amount_
load_change
@
l
oadChange
s
.
setter
def
l
oadChange
s
(
self
,
value
):
self
.
__load_change
s
=
value
@
maxAmountL
oadChange
.
setter
def
maxAmountL
oadChange
(
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
.
l
oadChange
s
is
not
None
:
self
.
__json_out
[
"
l
oadChange
s
"
]
=
self
.
l
oadChange
s
if
self
.
maxAmountL
oadChange
is
not
None
:
self
.
__json_out
[
"
maxAmountL
oadChange"
]
=
self
.
maxAmountL
oadChange
if
self
.
materialType
is
not
None
:
self
.
__json_out
[
"materialType"
]
=
self
.
materialType
...
...
ml/mml40/roles/dts/sensors/__init__.py
0 → 100644
View file @
bad2b8f6
ml/mml40/roles/dts/sensors/strain_gauge.py
0 → 100644
View file @
bad2b8f6
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
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment