yeet fixed choices from solve
This commit is contained in:
parent
57c2157134
commit
47e21678df
1 changed files with 3 additions and 25 deletions
28
solve.py
28
solve.py
|
|
@ -36,30 +36,7 @@ INITIAL = (30, 30, 30, 30)
|
||||||
#
|
#
|
||||||
# None for nothing
|
# None for nothing
|
||||||
# FIXED_CHOICES = None
|
# FIXED_CHOICES = None
|
||||||
FIXED_CHOICES = {
|
FIXED_CHOICES = {"actions": {}}
|
||||||
"actions": {
|
|
||||||
(0, 1): "renovate_h",
|
|
||||||
(1, 1): "renovate_h",
|
|
||||||
(2, 1): "renovate_h",
|
|
||||||
(3, 1): "overwork",
|
|
||||||
(0, 2): "collect",
|
|
||||||
(1, 2): "collect",
|
|
||||||
(2, 2): "overwork",
|
|
||||||
(3, 2): "upgrade_a",
|
|
||||||
(0, 3): "collect",
|
|
||||||
(1, 3): "collect",
|
|
||||||
(2, 3): "upgrade_a",
|
|
||||||
(3, 3): "overwork",
|
|
||||||
(0, 4): "collect",
|
|
||||||
(1, 4): "collect",
|
|
||||||
(2, 4): "overwork",
|
|
||||||
(3, 4): "upgrade_b",
|
|
||||||
(0, 5): "collect",
|
|
||||||
(1, 5): "collect",
|
|
||||||
(2, 5): "upgrade_b",
|
|
||||||
(3, 5): "overwork",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Resource constraints: list of callables that receive a dict with keys E, B, S, C
|
# Resource constraints: list of callables that receive a dict with keys E, B, S, C
|
||||||
# mapping to resource variables indexed by step. Each callable returns a constraint
|
# mapping to resource variables indexed by step. Each callable returns a constraint
|
||||||
|
|
@ -93,6 +70,7 @@ def _validate_objective(factors, mode):
|
||||||
if not any(factors.values()):
|
if not any(factors.values()):
|
||||||
raise ValueError("objective_factors needs at least one nonzero factor")
|
raise ValueError("objective_factors needs at least one nonzero factor")
|
||||||
|
|
||||||
|
|
||||||
# Arrival schedule. Key = step (1..5), value = list of city types that arrive
|
# Arrival schedule. Key = step (1..5), value = list of city types that arrive
|
||||||
# at the START of that step. Types: 'H' Hub, 'F' Foundry, 'M' Metropolis, 'N' Monument.
|
# at the START of that step. Types: 'H' Hub, 'F' Foundry, 'M' Metropolis, 'N' Monument.
|
||||||
# Arriving cities act that same step.
|
# Arriving cities act that same step.
|
||||||
|
|
@ -159,7 +137,7 @@ AGENT_AVAILABILITY = {
|
||||||
"metallurgist": [],
|
"metallurgist": [],
|
||||||
"builder": [],
|
"builder": [],
|
||||||
"courier": [],
|
"courier": [],
|
||||||
"planner": [],
|
"planner": [1, 2, 3, 4, 5],
|
||||||
"fence": [],
|
"fence": [],
|
||||||
"foreman": [],
|
"foreman": [],
|
||||||
"industrialist": [],
|
"industrialist": [],
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue