Skip to content

Incorrect algorithm #1

@denisorehovsky

Description

@denisorehovsky

I think this algorithm doesn't work properly. For example, for this data:

F = 300x1 + 250x2 + 450x3 --> max
15
x1 + 20x2 + 25x3 <= 1200
35x1 + 60x2 + 60x3 <= 3000
20
x1 + 30x2 + 25x3 <= 1500
250*x2 >= 500
x >= 0

Returns: [(0, 12.0), (2, 180.0), (4, 60.0)], 23400.0

But the answer should be:
F = 23060
x1 = 56, x2 = 2, x3 = 12.8
1

Also, I've checked some other data. And for this data, it doesn't work at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions