Skip to content

Initialization of Quantity

An object of type Quantity needs to be initialized with a minimum and a maximum value, but this is the case even if we already know that we do not want to optimize it. In some cases, one is forced to initialize a variable as Quantity and so the user has to make up some values which is a bit awkward.

Possible solutions:

  1. If min_value and max_value just set the by default to something related to value
  2. Allow other variable types than Quantity when necessary

The first seems the easier fix, but maybe you see some issues.

Edited by Alessandro Ciani