Models
Interface
The interface that has to be implemented for a model to be usable is defined in src/models/interface.jl
.
ComputableDAGs.AbstractModel
— TypeAbstractModel
Base type for all models. From this, AbstractProblemInstance
s can be constructed.
See also: problem_instance
ComputableDAGs.AbstractProblemInstance
— TypeAbstractProblemInstance
Base type for problem instances. An object of this type of a corresponding AbstractModel
should uniquely identify a problem instance of that model.
ComputableDAGs.graph
— Functiongraph(::AbstractProblemInstance)
Generate the DAG
for the given AbstractProblemInstance
. Every entry node (see get_entry_nodes
) to the graph must have a name set. Implement input_expr
to return a valid expression for each of those names.
ComputableDAGs.input_expr
— Functioninput_expr(instance::AbstractProblemInstance, name::String, input_symbol::Symbol)
For the given AbstractProblemInstance
, the entry node name, and the symbol of the problem input (where a variable of type input_type(...)
will exist), return an Expr
that gets that specific input value from the input symbol.
ComputableDAGs.input_type
— Functioninput_type(problem::AbstractProblemInstance)
Return the input type for a specific AbstractProblemInstance
. This can be a specific type or a supertype for which all child types are expected to work.
ComputableDAGs.problem_instance
— Functionproblem_instance(::AbstractModel, ::Vararg)
Interface function that must be implemented for any implementation of AbstractModel
. This function should return a specific AbstractProblemInstance
given some parameters.