Skip to content

ValueError #21

Description

@lapse0914

hallo,The code always gives an error when running an instance in evrp-2022,The content is:Traceback (most recent call last):
File "C:\Users\403-PC2\Desktop\EVRP-Python-main\evrp.py", line 68, in
solution, history1 = algorithm.solve(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\403-PC2\Desktop\EVRP-Python-main\algorithms\GSGA1.py", line 125, in solve
child_2 = self.hsm(child_2)
^^^^^^^^^^^^^^^^^
File "C:\Users\403-PC2\Desktop\EVRP-Python-main\algorithms\GSGA1.py", line 504, in hsm
mm_customer = np.random.choice(mm_customer_list, p=probs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "mtrand.pyx", line 934, in numpy.random.mtrand.RandomState.choice
ValueError: 'a' cannot be empty unless no samples are taken,How can I solve it

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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