anyLogistix anyLogistix
Expand
Font size

Interfaces for Extensions

Every custom extension that can be created for anyLogistix by means of Anylogic must override all the declared methods for its interface.

Below you will find the description for the available interfaces and methods that they contain.

IInventoryPolicyType interface - allows you to create custom inventory policy.

Methods to be implemented in this interface:

  • public boolean checkInventory(double currentInventory, double reservedInventory, double expectedInventory, double waitingAmount);
  • double replenishmentAmount(double currentInventory, double reservedInventory, double expectedInventory,double waitingAmount);
  • boolean overrideInitialStock();
  • boolean infinitiveStock();
  • double getInitialStock();
  • String getDescription();

ISourcingType interface - allows you to create custom sourcing policy.
Methods to be implemented in this interface:

  • ISourceSim getBestSource(double quantity);
  • ISourceData getBestSource(Scenario scenario, Product product, List sources, IDestinationData destinationData, IRouteProvider routeProvider);
  • init(List sources, IDestinationSim destination, Product product);
  • String getDescription();
  • List getAvailableSources();

IDemandType interface - allows you to create custom demand.
Methods to be implemented in this interface:

  • generate(IDemandSource customer, Product product);
  • double getTotalDemand(LocalDateTime startDate, LocalDateTime endDate);
  • double getDailyDemand();
  • String getDescription();

ITransportationCostCalculator interface - allows you to create custom transportation cost algorithm.
Methods to be implemented in this interface:

  • double flowCost(double weight, double volume, double distance, VehicleType vehicleType);
  • double cost(IShipment shipment, double distance, VehicleType vehicleType);
  • String getDescription();

ICustomExperiment interface - allows you to create custom experiment.
Methods to be implemented in this interface:

  • run();
  • stop();
  • IExperimentLogger getLogger();
  • setExperimentData(CustomExperimentData data);
  • CustomExperimentData getExperimentData();
  • CustomExperimentResult getResult();
  • setHelper(IExperimentHelper helper);
  • setLogger(IExperimentLogger logger);
  • addExperimentListener(IExperimentListener listener);
  • removeExperimentListener(IExperimentListener listener);

Supply chain elements

ISourceSim - allows to create custom object that can ship products.
Methods to be implemented in this interface:

  • boolean isProductAvailable(Product product);
  • double getAvailableInventory(Product product);
  • double getOnHandInventory(Product product);
  • ISourcePath getPath(IDestinationSim destination, Product product);
  • addInventoryPolicy(InventoryPolicy policy);
  • addPathSelectionMode(SelectionMode selectionMode, IDestinationSimdestination);
  • processOrder(IOrder order);
  • addBatch(SaleBatch batch);
  • SourceAvailability checkAvailability(Product product, IDestinationSim destination, double quantity);
  • List getBatches(Product product);
  • onShipmentDeparted(IShipment shipment, ISourcePath path);
  • double getInOrderProcessTime(IOrder order);
  • double getOutShipmentProcessTime(IShipment shipment);
  • setFunctioning(boolean functioning);
  • boolean isFunctioning();
  • int getVehiclesAmount(VehicleType vehicleType);
  • vehiclesReturned(VehicleType vehicleType, int amount);
  • reserveVehicles(VehicleType vehicleType, int amount);
  • pathShipmentRemoved(ISourcePath path);
  • addVehicleRestriction(VehicleRestriction restriction);

IDemandSource - allows to create custom object that can generate demand.
Methods to be implemented in this interface:

  • planNextOrder(LocalDateTime date, double quantity, Product product);
  • planNextOrder(double dt, double quantity, Product product);
  • int getOrdersCount(Product product);
  • removeDemandCoefficient(double coefficient);
  • applyDemandCoefficient(double coefficient);
  • addDemandData(DemandData data);

IFactory - allows you to create custom production facility.
Methods to be implemented in this interface:

  • addProductionPolicy(ProductionPolicy policy);
  • addProductionBatch(ProductionBatch batch);

IExternalProductSeller - allows to create an agent that will be treated as someone who we buy products from.

The interface does not contain any methods.

How can we improve this article?