What the ideal package and solve to solve this problem?
JuMP! It seems like you’ve found the right place.
UndefVarError: base not defined
Do you have the full error message? It’s hard to know where this is coming from otherwise.
p.s. please read Please read: make it easier to help you, particularly about formatting code.