I just noticed that FixedPowerSupply does work that could be done by PowerSupply (or BinaryComponent). Pretty much the only thing it should need to do is transform its voltage_level parameter into min_voltage and max_voltage. (It should also get all the rest of the constructor parameters.)
Arguably, PowerSupply._check_voltage_bounds() should print a different message if max and min are the same and we're trying to change to something different that isn't zero.
Migrated from internal repository. Originally created by @EvanKirshenbaum on Jun 17, 2022 at 9:51 AM PDT.
I just noticed that
FixedPowerSupply
does work that could be done byPowerSupply
(orBinaryComponent
). Pretty much the only thing it should need to do is transform itsvoltage_level
parameter intomin_voltage
andmax_voltage
. (It should also get all the rest of the constructor parameters.)Arguably,
PowerSupply._check_voltage_bounds()
should print a different message if max and min are the same and we're trying to change to something different that isn't zero.Migrated from internal repository. Originally created by @EvanKirshenbaum on Jun 17, 2022 at 9:51 AM PDT.