Path: blob/main/tests/tools/assign/costFunctionChecker/costFunction.py
428381 views
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo1# Copyright (C) 2008-2026 German Aerospace Center (DLR) and others.2# This program and the accompanying materials are made available under the3# terms of the Eclipse Public License 2.0 which is available at4# https://www.eclipse.org/legal/epl-2.0/5# This Source Code may also be made available under the following Secondary6# Licenses when the conditions for such availability set forth in the Eclipse7# Public License 2.0 are satisfied: GNU General Public License, version 28# or later which is available at9# https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html10# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later1112# @file costFunction.py13# @author Michael Behrisch14# @date 2009-09-08151617def constant(edge, weight):18if edge == "middle" or edge == "left":19return weight20return 0212223def w(edge, weight):24if edge == "middle":25return weight + 226if edge == "left":27return weight28return 1293031