11``` @meta
2- CurrentModule = ModelAnalyzer
2+ CurrentModule = MathOptAnalyzer
33DocTestSetup = quote
4- using ModelAnalyzer
4+ using MathOptAnalyzer
55end
66```
77
8- # ModelAnalyzer .jl
8+ # MathOptAnalyzer .jl
99
1010This package provides tools for analyzing (and debugging)
1111[ JuMP] ( https://github.com/jump-dev/JuMP.jl ) models.
3939
4040``` julia
4141using Pkg
42- Pkg. add (url = " https://github.com/jump-dev/ModelAnalyzer .jl" )
42+ Pkg. add (url = " https://github.com/jump-dev/MathOptAnalyzer .jl" )
4343```
4444
4545## Usage
@@ -50,7 +50,7 @@ Here is a simple example of how to use the package:
5050
5151``` julia
5252using JuMP
53- using ModelAnalyzer
53+ using MathOptAnalyzer
5454using HiGHS # or any other supported solver
5555# Create a simple JuMP model
5656model = Model (HiGHS. Optimizer)
@@ -65,39 +65,39 @@ optimize!(model)
6565# either
6666
6767# Perform a numerical analysis of the model
68- data = ModelAnalyzer . analyze (ModelAnalyzer . Numerical. Analyzer (), model)
68+ data = MathOptAnalyzer . analyze (MathOptAnalyzer . Numerical. Analyzer (), model)
6969# print report
70- ModelAnalyzer . summarize (data)
70+ MathOptAnalyzer . summarize (data)
7171
7272# or
7373
7474# Check for solution feasibility and optimality
75- data = ModelAnalyzer . analyze (ModelAnalyzer . Feasibility. Analyzer (), model)
75+ data = MathOptAnalyzer . analyze (MathOptAnalyzer . Feasibility. Analyzer (), model)
7676# print report
77- ModelAnalyzer . summarize (data)
77+ MathOptAnalyzer . summarize (data)
7878
7979# or
8080
8181# Infeasibility analysis (if the model was infeasible)
82- data = ModelAnalyzer . analyze (
83- ModelAnalyzer . Infeasibility. Analyzer (),
82+ data = MathOptAnalyzer . analyze (
83+ MathOptAnalyzer . Infeasibility. Analyzer (),
8484 model,
8585 optimizer = HiGHS. Optimizer,
8686)
8787
8888# print report to the screen
89- ModelAnalyzer . summarize (data)
89+ MathOptAnalyzer . summarize (data)
9090
9191# or print the report to a file
9292
9393# open a file
9494open (" my_report.txt" , " w" ) do io
9595 # print report
96- ModelAnalyzer . summarize (io, data)
96+ MathOptAnalyzer . summarize (io, data)
9797end
9898```
9999
100- The ` ModelAnalyzer .analyze(...)` function can always take the keyword arguments:
100+ The ` MathOptAnalyzer .analyze(...)` function can always take the keyword arguments:
101101 * ` verbose = false ` to condense the print output.
102102 * ` max_issues = n ` to limit the maximum number of issues to report for each
103103 type.
@@ -107,27 +107,27 @@ arguments.
107107
108108### Advanced usage
109109
110- After any ` ModelAnalyzer .analyze(...)` call is performed, the resulting data
111- structure can be summarized using ` ModelAnalyzer .summarize(data)` as show above,
110+ After any ` MathOptAnalyzer .analyze(...)` call is performed, the resulting data
111+ structure can be summarized using ` MathOptAnalyzer .summarize(data)` as show above,
112112or it can be further inspected programmatically.
113113
114114``` julia
115- # given a `data` object obtained from `ModelAnalyzer .analyze(...)`
115+ # given a `data` object obtained from `MathOptAnalyzer .analyze(...)`
116116
117117# query the types of issues found in the analysis
118- list = ModelAnalyzer . list_of_issue_types (data)
118+ list = MathOptAnalyzer . list_of_issue_types (data)
119119
120120# information about the types of issues found can be printed out
121- ModelAnalyzer . summarize (list[1 ])
121+ MathOptAnalyzer . summarize (list[1 ])
122122
123123# for each issue type, you can get the actual issues found in the analysis
124- issues = ModelAnalyzer . list_of_issues (data, list[1 ])
124+ issues = MathOptAnalyzer . list_of_issues (data, list[1 ])
125125
126126# the list of issues of the given type can be summarized with:
127- ModelAnalyzer . summarize (issues)
127+ MathOptAnalyzer . summarize (issues)
128128
129129# individual issues can also be summarized
130- ModelAnalyzer . summarize (issues[1 ])
130+ MathOptAnalyzer . summarize (issues[1 ])
131131```
132132
133133### Non JuMP (or MOI) models
0 commit comments