Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ It currently supports the following optimizers:
- [HiGHS](https://github.com/ERGO-Code/HiGHS) ( Open source )
- [Mosek](https://www.mosek.com/) ( Commercial )
- [Ipopt](https://github.com/coin-or/Ipopt) ( Open source )
- [KNITRO](https://www.artelys.com/solvers/knitro/) ( Commercial )

## Short Example
```python
Expand Down Expand Up @@ -113,7 +114,7 @@ It uses [nanobind](https://github.com/wjakob/nanobind), [fmtlib](https://github.

The design of PyOptInterface is inspired by [JuMP.jl](https://jump.dev).

Some solver-related code in `src` folder is adapted from the corresponding solver interface package in `JuMP.jl`
Some solver-related code in `src` folder is adapted from the corresponding solver interface package in `JuMP.jl`
ecosystem, which is licensed under MIT License.

The header files in `thirdparty/solvers` directory are from the corresponding distribution of optimizers and are licensed under their own licenses.
3 changes: 1 addition & 2 deletions src/pyoptinterface/_src/knitro.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def _result_status_knitro(model: "Model"):
return ResultStatusCode.INFEASIBLE_POINT
return ResultStatusCode.NO_SOLUTION


# Model Attribute
model_attribute_get_func_map = {
ModelAttribute.ObjectiveValue: lambda model: model.get_obj_value(),
ModelAttribute.ObjectiveSense: lambda model: model.get_obj_sense(),
Expand All @@ -232,7 +232,6 @@ def _result_status_knitro(model: "Model"):
ModelAttribute.TimeLimitSec: lambda model: model.get_raw_parameter(
KN.PARAM_TIME_LIMIT
),
# TODO: Bind this in C++
ModelAttribute.BarrierIterations: lambda model: model.get_number_iterations(),
ModelAttribute.NodeCount: lambda model: model.get_mip_node_count(),
ModelAttribute.ObjectiveBound: lambda model: model.get_obj_bound(),
Expand Down