make a decision D
when You solve a problem P
???
logic / contingency
space
time
energy
computational complexity
human resources
material resources
eco(log|nom)ical constraints
socio-political
psycho-cognitive
legal
moral
eight queen problems
map coloring problem
https://github.com/python-constraint/python-constraint
https://github.com/timnon/pyschedule
Note: install the most recent fork, (e.g. pip3.10 install "pyschedule"@git+"https://github.com/ppoile/pyschedule/#subdirectory=src")
Focus: LP deals specifically with linear equations and inequalities. This means it works with problems where relationships are represented as straight lines (hence 'linear').
Objective: It always aims to find the maximum or minimum value of a linear equation, known as the objective function. For example, maximizing profit or minimizing cost.
Method: LP uses specific mathematical methods, like the Simplex algorithm, to find the best solution.
Constraints: All constraints in LP are linear (straight-line relationships). For instance, you can't spend more than a certain budget, or you need at least a certain amount of some ingredient.
Solutions: Solutions in LP are often numerical and can include fractions or decimals.
Focus: CP is more general and can handle a wide variety of constraints, not just linear ones. It can deal with logical conditions, like "either-or" situations, and can include non-linear relationships.
Objective: CP doesn't necessarily have an objective function to optimize. Instead, it focuses on finding solutions that satisfy all the given constraints.
Method: It uses different algorithms than LP, often based on search techniques, like backtracking or heuristics.
Constraints: Constraints in CP can be diverse - linear, non-linear, logical conditions, etc. For example, a constraint could be that a certain task must be done before another can start.
Solutions: Solutions in CP are often discrete (like whole numbers) and can involve deciding between different options or scenarios.