From eef3545779cdfad22318fd24f0babed1005c9c96 Mon Sep 17 00:00:00 2001 From: odow Date: Tue, 5 Apr 2022 10:45:08 +1200 Subject: [PATCH] [docs] Add docstrings for FileFormats models --- docs/src/submodules/FileFormats/reference.md | 5 +++++ src/FileFormats/NL/NL.jl | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/docs/src/submodules/FileFormats/reference.md b/docs/src/submodules/FileFormats/reference.md index ef8e144a9a..bfac0d7306 100644 --- a/docs/src/submodules/FileFormats/reference.md +++ b/docs/src/submodules/FileFormats/reference.md @@ -23,5 +23,10 @@ Functions to help read and write MOI models to/from various file formats. See ```@docs FileFormats.Model FileFormats.FileFormat +FileFormats.CBF.Model +FileFormats.LP.Model +FileFormats.MOF.Model +FileFormats.MPS.Model +FileFormats.NL.Model FileFormats.SDPA.Model ``` diff --git a/src/FileFormats/NL/NL.jl b/src/FileFormats/NL/NL.jl index 5c957be11b..09178e669c 100644 --- a/src/FileFormats/NL/NL.jl +++ b/src/FileFormats/NL/NL.jl @@ -112,6 +112,11 @@ mutable struct _VariableInfo end end +""" + Model() + +Create a new Optimizer object. +""" mutable struct Model <: MOI.ModelLike # Store MOI.Name(). name::String @@ -131,12 +136,7 @@ mutable struct Model <: MOI.ModelLike # A vector of the final ordering of the variables. order::Vector{MOI.VariableIndex} - """ - Model() - - Create a new Optimizer object. - """ - function Model(; kwargs...) + function Model() return new( "", _NLExpr(false, _NLTerm[], Dict{MOI.VariableIndex,Float64}(), 0.0),