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

Documentation for JSCIPOpt API #18

Open
hklarner opened this issue Oct 9, 2019 · 4 comments
Open

Documentation for JSCIPOpt API #18

hklarner opened this issue Oct 9, 2019 · 4 comments

Comments

@hklarner
Copy link

hklarner commented Oct 9, 2019

I am reading the examples. Is there a documentation for the various objects and methods somewhere?

@mueldgog
Copy link
Collaborator

mueldgog commented Oct 9, 2019

Unfortunately, no. However, all functions just wrap functions from SCIP. So right now, I can just refer to the documentation of SCIP.

@hklarner
Copy link
Author

hklarner commented Oct 9, 2019

Which is here, right?

I am learning to use SCIP by modifying the examples

  • Linear.java
  • Multiknapsack.java

and so on. I am currently trying to find out how to define the objective function. What types of objective functions does SCIP accept? How do I, for example, define a linear sum objective using the Java API?

obj = a_1*x_1 + a_2*x_2 + ... + a_n*x_n

@mueldgog
Copy link
Collaborator

mueldgog commented Oct 9, 2019

Yes, that is the documentation of SCIP. The fourth argument of createVar() specifies the objective coefficient of the created variable. SCIP can only handle linear objective functions. This is not limiting because you can model min f(x) as min z with the constraint f(x) <= z, where z is an auxiliary variable.

In your example, you would create n variables and use a_i as the objective coefficient of the i-th variable.

@hklarner
Copy link
Author

The fourth argument of createVar() specifies the objective coefficient of the created variable.

Makes sense.

This is not limiting because you can model min f(x) as min z with the constraint f(x) <= z, where z is an auxiliary variable.

Interesting remark!

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