macop.solutions.discrete

Discrete solution classes implementations

Classes

BinarySolution(data, size)

Binary integer solution class

CombinatoryIntegerSolution(data, size)

Combinatory integer solution class

IntegerSolution(data, size)

Integer solution class

class macop.solutions.discrete.BinarySolution(data, size)[source]

Binary integer solution class

data

{ndarray} – array of binary values

size

{int} – size of binary array values

score

{float} – fitness score value

random(validator)[source]

Intialize binary array with use of validator to generate valid random solution

Parameters

validator – {function} – specific function which validates or not a solution

Returns

{BinarySolution} – new generated binary solution

class macop.solutions.discrete.CombinatoryIntegerSolution(data, size)[source]

Combinatory integer solution class

data

{ndarray} – array of binary values

size

{int} – size of binary array values

score

{float} – fitness score value

random(validator)[source]

Intialize combinatory integer array with use of validator to generate valid random solution

Parameters

validator – {function} – specific function which validates or not a solution

Returns

{CombinatoryIntegerSolution} – new generated combinatory integer solution

class macop.solutions.discrete.IntegerSolution(data, size)[source]

Integer solution class

data

{ndarray} – array of binary values

size

{int} – size of binary array values

score

{float} – fitness score value

random(validator)[source]

Intialize integer array with use of validator to generate valid random solution

Parameters

validator – {function} – specific function which validates or not a solution

Returns

{IntegerSolution} – new generated integer solution