OptHub

都市シミュレーションを用いた経済施策問題

2021年 進化計算コンペの問題
都市シミュレーションを用いた経済施策問題

Usage Instructions

You can run this problem in a local environment with Docker using the following code.

Use the following command to installopthub-runner-pythonfrom PyPI.

pip install opthub-runner-python

You can use the evaluation function for synpop with the following code.

You need to start Docker before running.

from opthub_runner.evaluator import Evaluator

evaluator = Evaluator(
  "opthub/problem-synpop:latest", # Docker image
  {
    "SYNPOP_FUNC": YOUR_SYNPOP_FUNC, # 
		"SYNPOP_CITY": YOUR_SYNPOP_CITY, # 
		"SYNPOP_SEED": YOUR_SYNPOP_SEED, # 
  }
)
result = evaluator.run(your_solution)

print(result["objective"])  # The objective value
print(result["feasible"])   # Feasibility of the solution
print(result["constraint"]) # Constraint
print(result["info"])       # Additional information

For details on the Evaluator class, please refer tohttps://github.com/opthub-org/comp-runner-python.