You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# write to gdx, execture GAMS, read solution from gdx
self.to_gdx(ipth, ingdx)
run_gams(model_file, args)
self.read_sol_from_gdx(opth, outgdx, comment,
var_list, equ_list, check_solution)
In order to support other, non-GAMS models, the following changes could be made:
Extend and generalize the code in ixmp.model_settings, adding:
a new ixmp.model.Model abstract class,
an ixmp.model.GAMSModel subclass.
Change Scenario.to_gdx(…) to GAMSModel.write_data(scenario, …).
Change run_gams(…) to GAMSModel.run(scenario, …).
Change Scenario.read_sol_from_gdx(…) to GAMSModel.read_solution(scenario, …).
After this, users would be able to run non-GAMS models by subclassing ixmp.Model() and implementing the methods write_data(), run(), and read_sol_from_gdx().
Scenario.solve()
ends with the following lines:ixmp/ixmp/core.py
Lines 1234 to 1238 in aa7b2fe
In order to support other, non-GAMS models, the following changes could be made:
ixmp.model_settings
, adding:ixmp.model.Model
abstract class,ixmp.model.GAMSModel
subclass.Scenario.to_gdx(…)
toGAMSModel.write_data(scenario, …)
.run_gams(…)
toGAMSModel.run(scenario, …)
.Scenario.read_sol_from_gdx(…)
toGAMSModel.read_solution(scenario, …)
.After this, users would be able to run non-GAMS models by subclassing
ixmp.Model()
and implementing the methodswrite_data()
,run()
, andread_sol_from_gdx()
.As identified here in the discussion of #108.
The text was updated successfully, but these errors were encountered: