This repository has been archived by the owner on Mar 4, 2023. It is now read-only.
/
ObjectiveFunction.py
77 lines (59 loc) · 1.98 KB
/
ObjectiveFunction.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
from abaqusConstants import *
from .OptimizationObjectiveArray import OptimizationObjectiveArray
class ObjectiveFunction:
"""The ObjectiveFunction object defines the objective of the optimization.
Attributes
----------
objectives: OptimizationObjectiveArray
:py:class:`~.Optimization` objectives
Notes
-----
This object can be accessed by:
.. code-block:: python
import optimization
mdb.models[name].optimizationTasks[name].objectiveFunctions[name]
"""
# Optimization objectives
objectives: OptimizationObjectiveArray = OptimizationObjectiveArray()
def __init__(
self,
name: str,
objectives: OptimizationObjectiveArray,
target: SymbolicConstant = MINIMIZE,
):
"""This method creates an ObjectiveFunction object.
Notes
-----
This function can be accessed by:
.. code-block:: python
mdb.models[name].optimizationTasks[name].ObjectiveFunction
Parameters
----------
name
A String specifying the objective function repository key.
objectives
An OptimizationObjectiveArray object.
target
A SymbolicConstant specifying the target of the objective function. Possible values are
MINIMIZE, MAXIMIZE, and MINIMIZE_MAXIMUM. The default value is MINIMIZE.
Returns
-------
An ObjectiveFunction object.
Raises
------
InvalidNameError
RangeError
"""
pass
def setValues(self, target: SymbolicConstant = MINIMIZE):
"""This method modifies the ObjectiveFunction object.
Parameters
----------
target
A SymbolicConstant specifying the target of the objective function. Possible values are
MINIMIZE, MAXIMIZE, and MINIMIZE_MAXIMUM. The default value is MINIMIZE.
Raises
------
RangeError
"""
pass