linopy
linopy copied to clipboard
Support constant values in objective
- if the problem need to convert multi-objectives to singe-objective, it's necessary to make normalization involving some constant variables.
It's not conveniet to construct objective containing constant, such as x+1
Here is a trick to add constant
constant_1=m.add_variables(lower=1, upper=1,name="constant_1")
- class Variable only have sum function, other operations are also needed, such as std
@0wenwu, you are right, the current objective class does not support carrying constants. Let's leave this open and see whether there is more people who wish for this feature.
The std could be easily introduced as function. PRs are always welcome :)