2023-10-12 17:51:03 +02:00
|
|
|
|
|
|
|
"""
|
2024-05-24 19:20:59 +02:00
|
|
|
AbstractModel
|
2023-10-12 17:51:03 +02:00
|
|
|
|
2024-06-24 23:31:30 +02:00
|
|
|
Base type for all models. From this, [`AbstractProblemInstance`](@ref)s can be constructed.
|
2023-10-12 17:51:03 +02:00
|
|
|
|
2024-06-24 23:31:30 +02:00
|
|
|
See also: [`problem_instance`](@ref)
|
2023-10-12 17:51:03 +02:00
|
|
|
"""
|
2024-05-24 19:20:59 +02:00
|
|
|
abstract type AbstractModel end
|
2023-10-12 17:51:03 +02:00
|
|
|
|
2024-06-24 23:31:30 +02:00
|
|
|
"""
|
|
|
|
problem_instance(::AbstractModel, ::Vararg)
|
|
|
|
|
|
|
|
Interface function that must be implemented for any implementation of [`AbstractModel`](@ref). This function should return a specific [`AbstractProblemInstance`](@ref) given some parameters.
|
|
|
|
"""
|
|
|
|
function problem_instance end
|
|
|
|
|
2023-10-12 17:51:03 +02:00
|
|
|
"""
|
2024-05-24 19:20:59 +02:00
|
|
|
AbstractProblemInstance
|
2023-10-12 17:51:03 +02:00
|
|
|
|
2024-06-24 23:31:30 +02:00
|
|
|
Base type for problem instances. An object of this type of a corresponding [`AbstractModel`](@ref) should uniquely identify a problem instance of that model.
|
2023-10-12 17:51:03 +02:00
|
|
|
|
|
|
|
See also: [`parse_process`](@ref)
|
|
|
|
"""
|
2024-05-24 19:20:59 +02:00
|
|
|
abstract type AbstractProblemInstance end
|
2024-06-24 23:31:30 +02:00
|
|
|
|
|
|
|
"""
|
|
|
|
input_type(problem::AbstractProblemInstance)
|
|
|
|
|
|
|
|
Return the fully specified input type for a specific [`AbstractProblemInstance`](@ref).
|
|
|
|
"""
|
|
|
|
function input_type end
|
|
|
|
|
|
|
|
"""
|
|
|
|
graph(::AbstractProblemInstance)
|
|
|
|
|
|
|
|
Generate the [`DAG`](@ref) for the given [`AbstractProblemInstance`](@ref). Every entry node (see [`get_entry_nodes`](@ref)) to the graph must have a name set. Implement [`input_expr`](@ref) to return a valid expression for each of those names.
|
|
|
|
"""
|
|
|
|
function graph end
|
|
|
|
|
|
|
|
"""
|
|
|
|
input_expr(::AbstractProblemInstance, input_sym::Symbol, name::String)
|
|
|
|
|
|
|
|
For a given [`AbstractProblemInstance`](@ref), a `Symbol` on which the problem input is available (see [`input_type`](@ref)), and entry node name, return an `Expr` getting that specific input value from the
|
|
|
|
"""
|
|
|
|
function input_expr end
|