Model

class iesopt.Model(filename: str | Path, **kwargs)[source]

An IESopt model, based on an IESopt.jl core model.

property core

Access the core JuMP model that is used internally.

property data

Access the IESopt data object of the model.

extract_result(component: str, field: str, mode: str = 'value')[source]

Manually extract a specific result from the model.

generate() None[source]

Generate a IESopt model from the attached top-level YAML config.

get_component(component: str)[source]

Get a core component based on its full name.

get_constraint(component: str, constraint: str)[source]

Get a specific constraint from a core component.

get_variable(component: str, variable: str)[source]

Get a specific variable from a core component.

nvar(var: str)[source]

Extract a named variable, from model.

If your variable is called :myvar, and you would access it in Julia using model[:myvar], you can call model.nvar(“myvar”).

property objective_value: float

Get the objective value of the model. Only available if the model was solved beforehand.

optimize() None[source]

Optimize the model.

property results: Results

Get the results of the model.

property status: ModelStatus

Get the current status of this model. See ModelStatus for possible values.

class iesopt.model.ModelStatus[source]

Status of an iesopt.Model.

EMPTY = 'empty'
FAILED_GENERATE = 'failed_generate'
FAILED_OPTIMIZE = 'failed_optimize'
GENERATED = 'generated'
INFEASIBLE = 'infeasible'
INFEASIBLE_OR_UNBOUNDED = 'infeasible_unbounded'
OPTIMAL = 'optimal'
OPTIMAL_LOCALLY = 'local_optimum'
OTHER = 'other'