Skip to content

Commit

Permalink
GPKit: apply subs to objective
Browse files Browse the repository at this point in the history
  • Loading branch information
rileyjmurray committed Apr 16, 2020
1 parent 5ed897f commit dcf4a46
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sageopt/interop/gpkit.py
Expand Up @@ -78,7 +78,9 @@ def gpkit_model_to_sageopt_model(gpk_mod):
cursig.metadata['GPKit constraint index'] = i
sp_gts.append(cursig)
# Build a sageopt Signomial from the GPKit objective.
f = gpkit_hmap_to_sageopt_sig(gpk_mod.cost.hmap, vkmap) # should this have a substitution applied first?
objective_hmap = gpk_mod.cost.hmap.sub(subs, gpk_mod.varkeys)
f = gpkit_hmap_to_sageopt_sig(objective_hmap, vkmap)
# first?
# Somehow aggregate all sageopt problem data. Might make a class for this later.
so_mod = {
'f': f,
Expand Down

0 comments on commit dcf4a46

Please sign in to comment.