JSCIPOpt icon indicating copy to clipboard operation
JSCIPOpt copied to clipboard

Documentation for JSCIPOpt API

Open hklarner opened this issue 5 years ago • 4 comments

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

hklarner avatar Oct 09 '19 16:10 hklarner

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

mueldgog avatar Oct 09 '19 16:10 mueldgog

Which is here, right?

  • https://scip.zib.de/doc/html/

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

hklarner avatar Oct 09 '19 16:10 hklarner

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.

mueldgog avatar Oct 09 '19 17:10 mueldgog

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!

hklarner avatar Oct 10 '19 08:10 hklarner