How to query GRBModel for pending operations
ユーザーの入力を待っています。GRBModel in the Java API has the update method:
GRBModel.update()
which according to the documentation is used to (https://www.gurobi.com/documentation/8.1/refman/java_grbmodel_update.html):
Process any pending model modifications.
Is there a way to query GRBModel, whether there are any pending modifications and hence to know, if I need to call `GRBModel.update()`?
I have found that calling `GRBModel.update()` can have a significant performance impact, so I would like to be able to only call it, when needed. I could then query the model for pending modifications and use that information as if-statement condition, to update the model only once, before I start e.g. querying variable/constraints in the model.
-
It is not possible to query pending model modifications.
Usually, you should not have to call the update method at all. It is only required if you want to access constraint or variable attributes such as, e.g., variable names, during model building. Which information are you trying to access during model construction that you think that a call to the update method is necessary?
0
サインインしてコメントを残してください。
コメント
1件のコメント