fslaborg / flips

Fsharp LInear Programming System
https://flipslibrary.com/#/
MIT License
251 stars 32 forks source link

Units of Measure missing overload #172

Closed matthewcrews closed 3 years ago

matthewcrews commented 3 years ago

The Decsion<'Measure> is missing an overload for multiplication with a plain float.

LinearExpression<'Measure> should also support scaling

matthewcrews commented 3 years ago

Turns out this is a limitation of the F# compiler when working with Units of Measure. To multiply by a float with no units, use the units of 1. For example:

1.0<1>