Determine where the robot has to drive

  • 3 December 2020
  • 3 replies

Hello dear AIMMS Community,


currently im working on a simulation of robots driving in a parking garage and charging electric vehicles.

The first step is done and it is kind of working, but i have currently two major problems.

  1. even if i am not putting any demand on the parking lot the robots drive to the lot and “simulate” charging an electric vehicle. 
    → i tried to find a solution in the community, but i was not successful. Is there any possibility, any constraint which could make  the robot not to service/drive to that parking lot while Demand(i)=0.
    As you can see in the picture: even if i put Demand of almost every parking lot=0, the robot drives to all the places, before going back to the depot.
  2. Another problem is, that i want to make the robots drive on a specific route,  shown as yellow in the picture/simulation. 
    → Is there any chance of making the robots drive a minimum besides the yellow route?

    My thought is that, despite being able to create that, later in the mathimatical programm i will only be able to minimize the route or the total time servicing all the customers.

    Is anymore information needed? please tell me and i will provide it.

    Thank you for trying to help.


Best answer by sineplexus 9 December 2020, 10:38

View original

3 replies

Userlevel 5
Badge +5



quite hard to debug this without knowing how you modelled your problem. 


  1. Is there any constraint that says the capacity of the charging robots must be discharged ? Typically, the demand at different points will act as an incentive for the robots to leave their origin 0 and if there is no demand, they should stay at origin. what is your cost function ? 
  2. what do you mean by “robots have to follow the yellow route” ? how should a robot go from 0 to any of the outer points like 1 through 8 or 21 through 28

Thank you for answering.


Well, I could upload a zip folder, but i am not sure wheter it is allowed or appreciated by you.

  1. I have 2 constraints for the load feasibility 
      Y(i) + Demand(i) - Y(j) <= BN * (1 - X(i,j))
    X(i,j) is an arc indicator which implies whter it is a robot or not, Y(i) is the used load/energy of the robot after being at station (i).  (BN is just a big number, i saw that in the community in a different routing problem)

    I tried to add anoter constraint which says: Y(j)<= Capacity 
    To my mind this should imply:  the Used energy after being at the next stop has to be smaler/equal to the capcity of the vehicle.

  2. I meant, that the robot should drive the most amount of the time on the “safe” area(yellow)  and a minimum amount on the rest of the parking garage. So they are actually allowed to drive on the “grey” area. It just should be minimized. 
    Is there any posibility to refer to their current coordinates? So i can maybe work with that.


Another problem:

I added a time window in that program. If I put 0 in the lower and upper bound of the window, the robots can not fullfill the constraint: lowerbound(i) <= D(i) <= upperbound(i) and serve all customers.
D(i) is the departure time. So i want to add , if both are zero the time server can be whenever.

Another thought is:
Is there any possibility that my visualization affects the simulation?

This is the code of my visulization:

empty RoutesColor;

Counter := 0;

for (i) do
    if ( X(0,i) = 1 ) then
        RoutesColor(0,i) := ColorsValue(Counter);
        NextCustomer := First( j | X(i,j) );
        CurrentCustomer := i;
        DepartureTimeColor(CurrentCustomer) := ColorsValue(Counter);
        while(NextCustomer <> 0) do
            RoutesColor(CurrentCustomer,NextCustomer) := ColorsValue(Counter);
            NextCustomerTemp := NextCustomer;
            NextCustomer := First( j | X(CurrentCustomer,j) );
            CurrentCustomer := NextCustomerTemp;
            DepartureTimeColor(CurrentCustomer) := ColorsValue(Counter);
        RoutesColor(CurrentCustomer,0) := ColorsValue(Counter);
        Counter := Counter + 1;

I know this is a big problem. Im really sorry. but i tried to fix it for a long time. Im kind of getting desperate.. 

Thank you for helping. 

partly solved:


i added a if clause: 

if (Demand(j) > 0) then sum( i, X(i,j) ) = 1 

thats how they drive to the customers onlly if the demand is greater then 0 . kind of easy


you can mark this as solved. i will try to do another topic. maybe a little easier and not to specific. maybe someone will be able to help.


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator