Skip to content

Add fixed costs for soft time window in solving routing problem #1781

@kaikezhang

Description

@kaikezhang

I am using Python to solve routing problem where I need to impose fixed costs and variable costs on nodes with delayed service. I noticed the SetCumulVarSoftUpperBound function allows me to add variable costs, that is cost = coefficient * (cumulVar - upper_bound) if cumulVar > upper_bound. In my problem, I also need to impose fixed costs, that is, cost = fixed_costs + coefficient * (cumulVar - upper_bound) if cumulVar > upper_bound. Is there any way I can achieve this?

Metadata

Metadata

Assignees

Labels

Help NeededModeling/Usage problemSolver: RoutingUses the Routing library and the original CP solver

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions