tools
¶
Module Contents¶
-
class
text_format
[source]¶ -
PURPLE
= [95m¶
-
CYAN
= [96m¶
-
DARKCYAN
= [36m¶
-
BLUE
= [94m¶
-
GREEN
= [92m¶
-
YELLOW
= [93m¶
-
WHITE
= [30m¶
-
RED
= [91m¶
-
BOLD
= [1m¶
-
UNDERLINE
= [4m¶
-
END
= [0m¶
-
-
applyEquation
(objectIn, s)[source]¶ Apply literal expression based on an object
- Parameters
objectIn – Object
s – literal expression. Float variables taken from the object are written between {}, int between []. Example: s=”{x}+{y}*2” if x and y are attributes of objectIn.
- Returns
value (float)
-
rgetattr
(obj, attr)[source]¶ Recursively get an attribute from object. Extends getattr method
- Parameters
obj – object
attr – attribute to get
- Returns
-
get_ND_pareto
(objectives_list, are_maxobjectives_list=None)[source]¶ Return the N-D pareto front
- Parameters
objectives_list – list of list of objectives: example [[0,1], [1,1], [2,2]]
are_maxobjectives_list – for each objective, tells if they are to be maximized or not: example [True, False]. Default: False
- Returns
extracted_pareto, indices: list of [x, y, …] points forming the pareto front, and list of the indices of these points from the base list.