blockProportionalSplitFactors
Convert a vector of weights to a vector of fractions adding to one
Extends from Interfaces.PartialConverters.MIMO_nin (Converter with multiple inputs and outputs of dimensions nin).
Information
This information is part of the Business Simulation Library (BSL). Please support this work and ► donate.
Given a vector u of weights, the converter will give an output vector y of fractions so that:
If the weights do add up to zero equal proportions are assumed:
Notes
- The weights are shifted (
shiftInputs = true) or clipped (shiftInputs = false), so that no weight will be less than zero. - The sum of the output vector components will always add up to one, i.e., the L1 Norm of y is one.
- A typical usecase is the allocation of some resource to a demand where we have to guarantee, that no more than is available will be allocated.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | shiftInputs | true | = true, if all values are to be shifted to prevent negative inputs, otherwise negative inputs are simply set to zero |
| Structural Parameters | |||
| Integer | nin (from MIMO_nin) | 2 | Number of input and output signals |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Connectors.RealMultiInput[nin] | u (from MIMO_nin) | Input |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| RealMultiOutput | y (from MIMO_nin) |