예제 #1
0
#!/usr/bin/env python

import rospy
from geometry_msgs.msg import Pose
from gazebo_msgs.msg import ModelState
from Queue import Queue
from Classes.Simulation import *

if __name__ == "__main__":
    sim = Simulation()
    sim.r = rospy.Rate(100)
    while not rospy.is_shutdown():
        sim.r.sleep()
예제 #2
0
#Choices:
#demand_is = 'Unknown'                     # 'Unknown' or 'Known'
NumberOfStations = 35  # keep it to 35 for the moment
NumberOfTrucks = 6  # Number of repositioning trucks
TruckCapacity = 40  # Capacity of each repositioning truck
UseMTZ = True  # MTZ constraints or DL
ValidInequalities = True  # Use of a model with valid inequalities
InitialNoOfBikesPerStation = 5  # Number of bikes at the beginning in each station
NumberOfDays = 3  # Number of days to repeat the simulation
TimeLimit = 1e75  # Maximum seconds to solve the rebalancing model

#Initialise the Rebalancing Operations and simulation classes:
t1 = time.time()
Rebalancing = RebalancingOperations(mtz=UseMTZ, vi=ValidInequalities)
Simulation = Simulation(nSt=NumberOfStations,
                        FirstBikesPerStation=InitialNoOfBikesPerStation)

#Initialise the results lists
UnknownCost = []
UnknownLostDemandList = []
UnknownConfigIniList = []
UnknownConfigFinList = []
UnknownSimTime = []
UnknownRebTime = []
KnownCost = []
KnownLostDemandList = []
KnownConfigIniList = []
KnownConfigFinList = []
KnownSimTime = []
KnownRebTime = []
Trucks = []