Skip to content

Don't get TSP example "numberOfViolatedConstraints.setAttribute(solution,nonConnectedLinks-numberOfCities+9)" #12

Open
@bronzels

Description

I tried to write a problem myself by referring to TSP as it is easier to understand, but don't get this line.

To me nonConnectedLinks is just the number of violations to constraint(non connected city are set next to each other), why add "-numberOfCities+9"?

jmetalsp-problem\src\main\java\org\uma\jmetalsp\problem\tsp\DynamicMultiobjectiveTSP.java

numberOfViolatedConstraints.setAttribute(solution,nonConnectedLinks-numberOfCities+9);

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions