Skip to content

Instantly share code, notes, and snippets.

@jmmshn
Last active October 17, 2022 16:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmmshn/6f2a6bee378e96e1ad9ff9d977dbdec7 to your computer and use it in GitHub Desktop.
Save jmmshn/6f2a6bee378e96e1ad9ff9d977dbdec7 to your computer and use it in GitHub Desktop.
dextra_orderbook_3node_good_guess
model, bought, sold, price = construct_model(total_trade_volume, orderbook)
@constraint(model, price[1] == 1)
@constraint(model, price[2] <= 1330.0)
@constraint(model, price[2] >= 1390.0)
@constraint(model, price[3] <= 19420.0)
@constraint(model, price[3] >= 19380.0)
optimize!(model)
summarize(orderbook, bought, sold, price)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment