Skip to content

Commit 0ffc34f

Browse files
eminyousknmetab0t
authored andcommitted
Update KNITRO documentation to include license management and callback support
1 parent acb773d commit 0ffc34f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

docs/source/knitro.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,23 @@ model = knitro.Model()
1010

1111
You need to follow the instructions in [Getting Started](getting_started.md#knitro) to set up the optimizer correctly.
1212

13+
If you want to manage the license of KNITRO manually, you can create a `knitro.Env` object and pass it to the constructor of the `knitro.Model` object, otherwise a check of the license will be performed when initializing the `knitro.Model` object.
14+
15+
```python
16+
env = knitro.Env()
17+
model = knitro.Model(env)
18+
```
19+
20+
For users who want to release the license immediately after the optimization, you can call the `close` method of all models created and the `knitro.Env` object.
21+
22+
```python
23+
env = knitro.Env()
24+
model = knitro.Model(env)
25+
# do something with the model
26+
model.close()
27+
env.close()
28+
```
29+
1330
## The capability of `knitro.Model`
1431

1532
### Supported constraints
@@ -116,3 +133,7 @@ name = model.get_constraint_name(constraint)
116133
primal = model.get_constraint_primal(constraint)
117134
dual = model.get_constraint_dual(constraint)
118135
```
136+
137+
## Support for KNITRO callbacks
138+
139+
Unfortunately, KNITRO's callback interface is not supported in PyOptInterface at the moment.

0 commit comments

Comments
 (0)