wecopttool.scale_dofs

scale_dofs(scale_list, ncomponents)[source]

Create a scaling vector based on a different scale for each DOF.

Returns a 1D array of length NDOF*ncomponents where the number of DOFs (NDOF) is the length of scale_list. The first ncomponents entries have the value of the first scale scale_list[0], the next ncomponents entries have the value of the second scale scale_list[1], and so on.

Parameters:
  • scale_list (Iterable[float]) – Scale for each DOF.

  • ncomponents (int) – Number of elements in the state vector for each DOF.

Return type:

ndarray