Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When I run my opl model I got this issue #9

Open
Delos-Lin opened this issue Sep 22, 2021 · 0 comments
Open

When I run my opl model I got this issue #9

Delos-Lin opened this issue Sep 22, 2021 · 0 comments

Comments

@Delos-Lin
Copy link

Code:

import doopl.factory as opl
import pandas as pd

with opl.create_opl_model(model=r'C:\Users\Desktop\TempInputData\test.mod', data=[r'C:\Users\Desktop\IN_Config.dat', r'C:\Users\Desktop\IN_OfflineData.dat']) as opl:
opl.set_input("RunnerInfo", pd.read_table(r"C:\Users\Desktop\TempInputData\InputRunnerInfo.xls"))
opl.set_input("DurationSet", pd.read_table(r"C:\Users\Desktop\TempInputData\InputDuration.xls"))
opl.set_input("CurrentStateSet", pd.read_table(r"C:\Users\Desktop\TempInputData\InputCurrentState.xls"))

#Generate the problem and solve it.
opl.mute()
opl.run()
print(opl)

#Get the engine objective value
print(opl.objective_value)

When I run this code with jupyter notebook in python, I got: The kernel appears to have died. It will restart automatically.
I have no idea why would this happen? Any wrong in my code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant