Problem Class
#
File position: /EMOC/src/problem/problem.h and /EMOC/src/problem/problem.cpp
class Problem(int dec_num, int obj_num)
The parent class of all test problems in EMOC.
Parameter: |
dec_num: int, default=None     The number of decision variables setting for the problem.
obj_num: int, default=None     The number of objective functions setting for the problem.
|
Member variables: |
(public) dec_num_: int     The number of decision variables set by users. It is equal to the given dec_num.
(public) obj_num_: int     The number of objective functions set by users. It is equal to the given obj_num.
(public) lower_bound_: std::vector<double>     The lower bound of each decision variable. The size of this std::vector is dec_num.
(public) upper_bound_: std::vector<double>     The upper bound of each decision variable. The size of this std::vector is dec_num.
(public) encoding_: enum of EncodingType     Encoding type of solutions in this problem. There are three different types: REAL, BINARY and PERMUTATION which corresponds to real encoding, binary encoding, permutation encoding respectively.
|
Public Member Functions:
void CalObj(Individual* ind)
Calculate the objective function values.
This function is a pure virtual function which must be implemented in subclass.
Parameter: |
ind: Individual*, default=None     Pointer to the individual which need to calculate the objectives. |
Returns: |
void |
void CalCon(Individual* ind)
Calculate the constraint function values.
This function is a virtual function which can be implemented in subclass. It has an empty implementation by default. So users can leave it alone when implementing test problems without constraints.
Parameter: |
ind: Individual*, default=None     Pointer to the individual which need to calculate the constraints. |
Returns: |
void |