Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support constant values in objective #236

Open
0wenwu opened this issue Feb 23, 2024 · 1 comment
Open

Support constant values in objective #236

0wenwu opened this issue Feb 23, 2024 · 1 comment

Comments

@0wenwu
Copy link

0wenwu commented Feb 23, 2024

  1. 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")
  2. class Variable only have sum function, other operations are also needed, such as std
@FabianHofmann
Copy link
Collaborator

@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 FabianHofmann changed the title Objective cannot support constant? Support constant values in objective Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants