also reachable via 2 other paths through the graph
Vector of Parameters: This is a set of variables or conditions that characterize the system or scenario. They can be input conditions, system states, or any other relevant metrics that describe the system.
Objective Function: This is a mathematical function that quantifies how far the current system's performance is from the desired performance. The goal is usually to minimize or maximize this function.
Constraints: These are the bounds or limitations within which the system operates. In engineering problems, constraints can arise from physical limitations, safety requirements, budgetary restrictions, etc. The solution must satisfy these constraints.
make a decision D
when You solve a problem P
???
Mathematical Treatment of the Axioms of Physics
Rigorous Foundation of Schubert's Enumerative Calculus
Topology of Algebraic Curves and Surfaces
Analysis of Solutions of Variational Problems
logic / contingency
space
time
energy
computational complexity
human resources
material resources
eco(log|nom)ical constraints
socio-political
psycho-cognitive
legal
moral
Birch and Swinnerton-Dyer Conjecture
Hodge Conjecture
Navier–Stokes Existence and Smoothness
P vs NP Problem
Riemann Hypothesis
Yang–Mills Existence and Mass Gap
No Definitive Formulation
No Stopping Rule
Solutions Are Not True-or-False
No Immediate and No Ultimate Test
Every Solution is a 'One-Shot Operation'
No Enumerable (or Exhaustively Describable) Set of Potential Solutions
Every Wicked Problem is Essentially Unique
Every Wicked Problem Can Be Considered to Be a Symptom of Another Problem
The Existence of a Discrepancy Representing a Wicked Problem Can Be Explained in Numerous Ways
The Planner Has No Right to Be Wrong
Radioactive waste disposal
Liberation from fossil fuel dependency
Language extinction
Weltverständlichmachung
Unf*cking the Wohnungsmarkt
...
...
...
...
The Clock Reform
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")
eight queen problems
map coloring problem
#Adam has one hour time on Monday and Wednesday, three hours time on Thursday and fours hours time on each weekend day, Eve has two hours on Tuesday, three hours on Friday and four hours on each weekend day. Define pyschedule resources with correctly defined periods and horizons.
#Monday: Adam x 1
#Tuesday: Eva x 2
#Wednesday: Adam x 1
#Thursday: Adam x 4
#Friday: Eva x 3
#Saturday: Both x 4
#Sunday : Both x 4
from pyschedule import Scenario, solvers, plotters, alt
# Define the scenario
S = Scenario('household_chores', horizon=15) # Two weeks
# Define the resources, resource costs are not obligatory but it's more fun with them
adam = S.Resource('Adam',periods=[0,3,4,5,6,7,11,12,13,14])
eve = S.Resource('Eve',periods=[1,2,8,9,10,11,12,13,14])
kitchen=S.Resource('kitchen')
# Define the tasks and their durations
task_costs = {
"meal1": {"length":1,"delay_cost":1}, # 1 hour, schedule towards beginning of the week
"meal2": {"length":1,"delay_cost":1},
"meal3": {"length":1,"delay_cost":-1},
"meal4": {"length":1,"delay_cost":-1}, # 1 hour, schedule towards end of the week
"bake": {"length":2,"delay_cost":0}, # 2 hours (1 cake)
"sleeping_room": {"length":2,"delay_cost":0}, # it seems there is a bug for tasks longer >1
#"CSR1": {"length":1,"delay_cost":0}, # one way how to address the bug is to split long tasks into sub-tasks coupled by tight preference constraints
#"CSR2": {"length":1,"delay_cost":0}, #
"bathroom": {"length":2,"delay_cost":0}, # 2 hours
"living_room": {"length":3,"delay_cost":0}, # 3 hours
"clean_kitchen": {"length":3,"delay_cost":0} # 3 hours
}
tasks={}
# Define alternative resources for each task
for task,costs in task_costs.items():
print(task,costs)
tasks[task] = S.Task(task,length=costs['length'],delay_cost=costs["delay_cost"]) #create new task
tasks[task] += adam | eve #assign resources to newly created task
#additional task-resource attributions
tasks["clean_kitchen"]+=kitchen
tasks["meal1"]+=kitchen
tasks["meal2"]+=kitchen
tasks["meal3"]+=kitchen
tasks["meal4"]+=kitchen
tasks["bake"]+=kitchen
#tight precedence constraints
#S += tasks['CSR1'] <= tasks['CSR2']
#optional tasks
#tasks['playground'] = S.Task('playground',length=2,schedule_cost=-1)
#tasks['playground'] += alt(adam,eve)
#additional constraints
S += tasks['meal1'] < tasks['clean_kitchen']
S += tasks['meal2'] < tasks['clean_kitchen']
S += tasks['meal3'] < tasks['clean_kitchen']
S += tasks['meal4'] < tasks['clean_kitchen']
S += tasks['bake'] < tasks['clean_kitchen']
# Solve the scenario
solvers.mip.solve(S,msg=1,kind='GUROBI')
print(S)
print(S.solution())
print(adam.periods)
# Plot the schedule
plotters.matplotlib.plot(S)
elitism: select N most fit individuals and copy them to next generation
roulette-wheel: probability of survival into next generation is proportional to indvididual's fitness
tournament...
for numeric genes: additive mutation, multiplicative mutation, complex (imaginary) mutation
for symbolic ones: removal, addition or replacement of a symbol; metathesis (e.g. MORF -> FORM)
NOTE: Mutation rates often fall in the range of 0.5% to 1% per gene. This rate is low enough to prevent excessive random search (which can disrupt good solutions) and high enough to introduce diversity and enable the algorithm to explore new areas of the solution space.
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.