API
Model
ExampleModeling.ExampleModel
— TypeDefines the ExampleModel type.
ExampleModeling.Specs
— TypeSpecification for different model scenarios. For example, we can specify toggling on and off certain constraints and objectives.
Arguments
relax_integer::Bool=false
: If true, relax integer constraints from variables.
ExampleModeling.Indices
— TypeContains indices of the model.
ExampleModeling.Params
— TypeContains the parameters of the model.
ExampleModeling.Variables
— TypeContains the variable values of the model.
ExampleModeling.Objectives
— TypeContains the objective values of the model.
ExampleModeling.ExampleModel
— MethodInitializes the ExampleModel.
ExampleModeling.Variables
— MethodQueries the variable values from the model into Variables type.
ExampleModeling.Objectives
— MethodQueries the objective values from the model into Objectives type.
IO
ExampleModeling.save_json
— FunctionSaves any JSON serializable object
into JSON file in filepath
.
ExampleModeling.load_json
— FunctionLoads values from JSON file in filepath
to DataType supplied by dtype
.
Utility
ExampleModeling.model_to_dtype
— FunctionThe function queries values from the model to data type based on its field names. It extracts values from DenseAxisArray from its data
field. Then, it converts the values to the corresponding field type. The function rounds integers before conversion because JuMP outputs integer variables as floats.