Random Instance Generators

Random Instance Generators

Multiobjective and Biobjective Multi Dimensional Knapsack Problems

generate_knapsack_instances(num_obj::Int64=2, num_var::Int64=10, num_cons::Int64=1, sparse::Bool=true)

Returns a MOBPInstance of a random Multi Objective Knapsack Problem with num_obj objectives num_var binary variables and num_cons inequality constraints.

generate_bokp_instances(num_var::Int64, num_cons::Int64, sparse::Bool)

Returns a BOBPInstance of a random Bi Objective Knapsack Problem with num_var binary variables and num_cons inequality constraints.

The method for generating a random biobjective multi dimensional knapsack instance is as follows:

When sparse = true

\[\begin{align*} c^1_i & \in [1:100], & \forall i \in \{1,..., n\} \\ c^2_i & \in [1:100], & \forall i \in \{1,..., n\} \\ A_{i,j} & \in [0:100], & \forall i \in \{1,..., n\}, j \in \{1,..., m\} \\ b_j & = \lceil \dfrac{\sum_i A_{ij}}{2} \rceil, & \forall j \in \{1,..., m\} \end{align*}\]

When sparse = false

\[\begin{align*} c^1_i & \in [1:100], & \forall i \in \{1,..., n\} \\ c^2_i & \in [1:100], & \forall i \in \{1,..., n\} \\ A_{i,j} & \in [1:100], & \forall i \in \{1,..., n\}, j \in \{1,..., m\} \\ b_j & = \lceil \dfrac{\sum_i A_{ij}}{2} \rceil, & \forall j \in \{1,..., m\} \end{align*}\]

Multiobjective General Mixed Binary Problem

generate_mixed_binary_instances(num_obj::Int64=2, num_cont_var::Int64=10, num_bin_var::Int64=10, num_cons::Int64=1)

Returns a MOMBLPInstance or a BOMBLPInstance of a random Multiobjective Mavrotas Mixed Binary Problem.