MCPcopy Index your code
hub / github.com/PyVRP/PyVRP / solve

Method solve

pyvrp/Model.py:514–563  ·  view source on GitHub ↗

Solve this model. Parameters ---------- stop Stopping criterion to use. seed Seed value to use for the random number stream. Default 0. collect_stats Whether to collect statistics about the solver's progress. Defau

(
        self,
        stop: StoppingCriterion,
        seed: int = 0,
        collect_stats: bool = True,
        display: bool = True,
        params: SolveParams = SolveParams(),
        missing_value: int = MAX_VALUE,
        initial_solution: Solution | None = None,
    )

Source from the content-addressed store, hash-verified

512 )
513
514 def solve(
515 self,
516 stop: StoppingCriterion,
517 seed: int = 0,
518 collect_stats: bool = True,
519 display: bool = True,
520 params: SolveParams = SolveParams(),
521 missing_value: int = MAX_VALUE,
522 initial_solution: Solution | None = None,
523 ) -> Result:
524 """
525 Solve this model.
526
527 Parameters
528 ----------
529 stop
530 Stopping criterion to use.
531 seed
532 Seed value to use for the random number stream. Default 0.
533 collect_stats
534 Whether to collect statistics about the solver's progress. Default
535 ``True``.
536 display
537 Whether to display information about the solver progress. Default
538 ``True``. Progress information is only available when
539 ``collect_stats`` is also set, which it is by default.
540 params
541 Solver parameters to use. If not provided, a default will be used.
542 missing_value
543 Distance and duration value to use for missing edges. Defaults to
544 :const:`~pyvrp.constants.MAX_VALUE`, a large number.
545 initial_solution
546 Optional solution to use as a warm start. The solver constructs a
547 (possibly poor) initial solution if this argument is not provided.
548
549 Returns
550 -------
551 Result
552 A Result object, containing statistics (if collected) and the best
553 found solution.
554 """
555 return solve(
556 self.data(missing_value),
557 stop,
558 seed,
559 collect_stats,
560 display,
561 params,
562 initial_solution,
563 )
564
565
566def _idx_by_id(item: object, container: Sequence[object]) -> int | None:

Calls 3

dataMethod · 0.95
SolveParamsClass · 0.90
solveFunction · 0.90