Skip to content

Commit 2fc4f3f

Browse files
committed
add docs
1 parent ad37c02 commit 2fc4f3f

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

docs/src/analyzer.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,15 @@ and summarize them individually. The following functions are useful for this:
2222
ModelAnalyzer.list_of_issue_types
2323
ModelAnalyzer.list_of_issues
2424
```
25+
26+
It is possible to extract data from the issues with the methods:
27+
28+
```@docs
29+
ModelAnalyzer.variables
30+
ModelAnalyzer.variable
31+
ModelAnalyzer.constraints
32+
ModelAnalyzer.constraint
33+
ModelAnalyzer.set
34+
ModelAnalyzer.values
35+
ModelAnalyzer.value
36+
```

docs/src/index.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,17 @@ ModelAnalyzer.summarize(issues)
129129
# individual issues can also be summarized
130130
ModelAnalyzer.summarize(issues[1])
131131
```
132+
133+
### Non JuMP (or MOI) models
134+
135+
If you dont have a JuMP (or MOI) model, you can still use this package reading from a file.
136+
137+
```julia
138+
model = Model();
139+
@variable(model, x >= 0);
140+
@objective(model, Min, 2 * x + 1);
141+
filename = joinpath(mktempdir(), "model.mps");
142+
write_to_file(model, filename; generic_names = true)
143+
new_model = read_from_file(filename; use_nlp_block = false)
144+
print(new_model)
145+
```

0 commit comments

Comments
 (0)