Skip to content

Commit

Permalink
Non numpy vectorization doc (anyoptimization#375)
Browse files Browse the repository at this point in the history
* Update definition.ipynb

* Update definition.ipynb

* Update definition.ipynb

* Update definition.ipynb

* Update definition.ipynb

* Update definition.ipynb

* Update definition.ipynb

* Update definition.ipynb
  • Loading branch information
davide-q authored Feb 2, 2023
1 parent 0da3241 commit bbf76dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/source/problems/definition.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"metadata": {},
"source": [
"The majority of optimization algorithms implemented in *pymoo* are population-based, which means that more than one solution is evaluated in each generation. This is ideal for implementing a parallelization of function evaluations. Thus, the default definition of a problem retrieves a **set** of solutions to be evaluated. The actual function evaluation takes place in the `_evaluate` method, which aims to fill the `out` dictionary with the corresponding data. \n",
"The function values are supposed to be written into `out[\"F\"]` and the constraints into `out[\"G\"]` if `n_constr` is greater than zero. "
"The function values are supposed to be written into `out[\"F\"]` and the constraints into `out[\"G\"]` if `n_constr` is greater than zero. If another approach is used to compute the function values or the constraints, they must be appropriately converted into a two-dimensional `numpy` array (one dimension for the function values, the other dimension for each element of the population evaluated in the current round). For example, if the function values are written in a regular python list like `F_list = [[<func values for individual 1>], [<func values for individual 2>], ...]`, before returning from the `_evaluate` method, the list must be converted to numpy array with `out[\"F\"] = np.row_stack(F_list_of_lists)`. "
]
},
{
Expand Down

0 comments on commit bbf76dc

Please sign in to comment.