Error Running Core Model of EnergyScope with option B

Hello everyone,
I’ve just started my PhD at Politecnico di Milano with Stefano and I’m trying to run the core model of EnergyScope using Option B (the energyscope Python library) on Windows 10.
According to the documentation, AMPL should be automatically installed and configured when running:

‘pip install energyscope’

However, when I try to run:

'python
from energyscope.energyscope import Energyscope
from energyscope.models import core

es_core = Energyscope(
model=core,
solver_options={“solver”: “gurobi”},
modules=[“gurobi”],
license_uuid=“MY_UUID”,
notebook=False,
)

results = es_core.calc()’

I get the following error:

‘RuntimeError: AMPL could not be started: no such file or directory’

After several attempts to make Option B work as documented, I eventually had to manually install AMPL and add it to the PATH. After that, the model runs correctly.
Could you please clarify these issues?
Thanks in advance for your help!

Hello @Lucia1807 ! Thanks for the message.

Can you please give it another shot, but keep the notebook=True. It works with this on my side.

Thanks in advance!

1 Like

It works now, thanks!