1

我有变量xijm,它可以是 0 或 1。我知道我应该这样做,IloArray<>但我需要在 java 中查看一个示例。我找到了这个,但我使用的是 java。这个想法我不清楚!你能给我举个例子吗?

4

1 回答 1

1

The way to learn is by looking at examples and getting them to work in your environment. Then you make changes to the formulation, until it represents your full model.

Here are several examples to get you on your way:

  1. You could start with this tutorial, to get familiar with the various Ilog calls. First, get familiar with the Library and how CPLEX responds. The tutorial includes Java examples.

  2. If you want decision variables with multiple dimensions, here's an example of that using Java.

  3. Also, IBM's "Modeling with IBM ILOG CPLEX CP Optimizer – Practical Scheduling Examples" is another good place to get acquainted with CPLEX modeling.

  4. Finally, here's another example, provided by IBM.

Hope that helps.

于 2013-02-05T17:35:22.387 回答