Skip to content

Commit

Permalink
Release 0.2.2 (#19)
Browse files Browse the repository at this point in the history
* Update README

* remove redundant line

* Bump version to 0.2.2
  • Loading branch information
bachdavi authored Nov 8, 2023
1 parent 1c82406 commit a5c44a1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.2]

- Allow empty array (for no constraints) [#18](https://github.com/RelationalAI/SolverAPI.jl/pull/18)
- Adding relative & absolute mip gaps [#17](https://github.com/RelationalAI/SolverAPI.jl/pull/17)
- Support in / table / relational application constraints [#16](https://github.com/RelationalAI/SolverAPI.jl/pull/16)

## [0.2.1]

- Support `interval` constraint [#14](https://github.com/RelationalAI/SolverAPI.jl/pull/14)
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "SolverAPI"
uuid = "f47e0006-d9ab-4793-9101-5b952049cae7"
version = "0.2.1"
version = "0.2.2"

[deps]
JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1"
Expand Down
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ We always support the following options:
and not solved.
- `print_format`: [String] If and how the model should be printed.
Currently supported formats: MOI, LaTeX, MOF, LP, MPS, NL.
- `relative_gap_tolerance`: [Float64] The relative gap
tolerance. Must be within [0,1].
- `absolute_gap_tolerance`: [Float64] Absolute gap tolerance. Must
be non-negative.

### Response

Expand All @@ -105,7 +109,10 @@ Response format examples:
]
}
],
"termination_status": "OPTIMAL"
"termination_status": "OPTIMAL",
"solve_time_sec": 0.000112959,
"solver_version": "HiGHS_1.5.3",
"relative_gap": 0.0
}
```

Expand Down Expand Up @@ -148,3 +155,6 @@ Optional fields:
- `errors`: [Array] None, one, or multiple errors that were present.
- `model_string`: [String] If requested via `print_format` the model
as a string.
- `solver_version`: [String] The version of the solver used.
- `solve_time_sec`: [Float64] Duration of solving.
- `relative_gap`: [Float64] The relative gap.
1 change: 0 additions & 1 deletion src/SolverAPI.jl
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ function response(
result_count = MOI.get(model, MOI.ResultCount())

try
res["relative_gap"]
rel_gap = Float64(MOI.get(model, MOI.RelativeGap()))
if !isinf(rel_gap)
res["relative_gap"] = rel_gap # Inf cannot be serialized to JSON
Expand Down

0 comments on commit a5c44a1

Please sign in to comment.