Checkpoint file {}/_gams_py_gc1.g00 does not exist

Questions on using the GAMS APIs (Python, .NET, etc.)
Post Reply
DanielJimenezAvalo
User
User
Posts: 4
Joined: 2 months ago

Checkpoint file {}/_gams_py_gc1.g00 does not exist

Post by DanielJimenezAvalo »

Hello,

I'm trying to execute gams sequentially from multiple scenarios, where the results of the previous scenario are used in the next execution, for that, I'm using the gams transfer API. The first scenario executes correctly, but the next scenario gives me this error:

raise gams.control.workspace.GamsException("Checkpoint file " + checkpoint._checkpoint_file_name + " does not exist")
gams.control.workspace.GamsException: Checkpoint file {dir}\_gams_py_gcp1.g00 does not exist

I know these files are generated during the execution of the checkpoint (GamsWorkspace().add_checkpoint()) before the execution of the simulation ({MODEL}.run()), nevertheless, the error should appear at the execution of the first scenario but doesn't happen.
User avatar
bussieck
Moderator
Moderator
Posts: 973
Joined: 6 years ago

Re: Checkpoint file {}/_gams_py_gc1.g00 does not exist

Post by bussieck »

If you want some help, you need to send something one can reproduce.

-Michael
DanielJimenezAvalo
User
User
Posts: 4
Joined: 2 months ago

Re: Checkpoint file {}/_gams_py_gc1.g00 does not exist

Post by DanielJimenezAvalo »

thanks for the reply, I solved the problem using this:

#create a checkpoint in any iteration
check_point=ws.add_checkpoint()

#use the options of the models and run the model until the checkpoint
transfer_model.run(gams_options=opt,checkpoint=check_point)

#add the run execution of the model point to the checkpoint
transfer_model = ws.add_job_from_string(gams_source="solve multibenders2a using LP minimizing Z;", checkpoint=check_point)

transfer_model.run(gams_options=opt,checkpoint=check_point)
Post Reply