You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
@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 :)
FabianHofmann
changed the title
Objective cannot support constant?
Support constant values in objective
Feb 28, 2024
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")
The text was updated successfully, but these errors were encountered: