Numpy
location = np.zeros((n, 2), np.int_) List
a = ["apple", "banana", "cherry"] b = ["Ford", "BMW", "Volvo"] for i in b: a.append(i) ortool_cp_sat
x = {} for work in range(number_worker): for task in range(number_task): x[work,task] = model.NewBoolVar(f'x[{work}{task}]') folium
|
Numba
@njit def create_S() S = List() Matplotlib.pyplot
plt.plot( [3, 2], [5,6], 'r-', marker='o', markerfacecolor='b', markeredgecolor ='b', markersize =5, linewidth = 0.5, alpha=0.5 ) from matplotlib.pyplot import figure figure(figsize=(8, 6), dpi=80) plt.text(5,5,'Total demand = {} and number of sub tours = {}' .format(weight.sum(),len(shortest_path)-1)) class
Ortools
|
Cheatography
https://cheatography.com
Ortools CheatSheet Cheat Sheet (DRAFT) by mrdo1911
How to use Ortools in a nutshell
This is a draft cheat sheet. It is a work in progress and is not finished yet.