View pricing_benchmark.py
import numpy as np
import random as rand
from numpy.linalg import inv
from numpy.linalg import norm
from scipy.optimize import minimize
from scipy.optimize import linprog
import warnings
import time
import sys
from memory_profiler import profile
View Mem_usage.log
Line # Mem usage Increment Line Contents
================================================
320 37.2 MiB 0.0 MiB @profile
321 def func():
322 37.2 MiB 0.0 MiB n_products = input("Enter the number of products (that is add +1 to the actual number) : ")
323 37.2 MiB 0.0 MiB time_steps = input("Enter the number of time steps (should be equal to the above number of products) : ")
324 37.2 MiB 0.0 MiB demand_mat = input("Enter the demand matrix with time instance as columns and products as rows : ")
325 37.2 MiB 0.0 MiB max_price = input("Enter the maximum price for each product as an array : ")
326 37.2 MiB 0.0 MiB min_price = input("Enter the minimum price for each product as an array : ")
327 37.2 MiB 0.0 MiB print "Creating the pricing object "
View pricing.py
import numpy as np
import random as rand
from numpy.linalg import inv
from numpy.linalg import norm
from scipy.optimize import minimize
from scipy.optimize import linprog
import warnings
import time
import sys
View new_pricing.py
import numpy as np
import random as rand
from numpy.linalg import inv
from numpy.linalg import norm
from scipy.optimize import minimize
from scipy.optimize import linprog
import warnings
import time
import sys
View new.py
import numpy as np
import random as rand
from numpy.linalg import inv
from numpy.linalg import norm
from scipy.optimize import minimize
from scipy.optimize import linprog
import warnings
import time
import sys
View new.py
import numpy as np
import random as rand
from numpy.linalg import inv
from numpy.linalg import norm
from scipy.optimize import minimize
from scipy.optimize import linprog
import warnings
import time
import sys
View pricing_new_parallel.py
import numpy as np
import random as rand
import multiprocessing
import logging
import warnings
import os
import time
import sys
from numpy.linalg import inv
from numpy.linalg import norm
View pricing_parallel.py
import numpy as np
import random as rand
from numpy.linalg import inv
from numpy.linalg import norm
from scipy.optimize import minimize
from scipy.optimize import linprog
import warnings
import time
import sys
View pricing_new.py
import numpy as np
import random as rand
from numpy.linalg import inv
from numpy.linalg import norm
from scipy.optimize import minimize
from scipy.optimize import linprog
import warnings
import time
import sys
View pricing_new.py
import numpy as np
import random as rand
from numpy.linalg import inv
from numpy.linalg import norm
from scipy.optimize import minimize
from scipy.optimize import linprog
import warnings
import time
import sys