SCML Supply Chain Modeling Language Python What is

  • Slides: 36
Download presentation

概要 • SCML (Supply Chain Modeling Language) とは • Pythonによる実装 • 応用

概要 • SCML (Supply Chain Modeling Language) とは • Pythonによる実装 • 応用

What is the SCML? Supply Chain Optimization Models proposed in 2009 by M. K.

What is the SCML? Supply Chain Optimization Models proposed in 2009 by M. K. (international scheduling symposium) SCML Combinatorial Optimization Models Solvers (metaheuristics and/or MIP/CP)

What is the SCML. py ? Supply Chain Optimization Models SCML. py Solvers (metaheuristics

What is the SCML. py ? Supply Chain Optimization Models SCML. py Solvers (metaheuristics and/or MIP/CP) Combinatorial Optimization Models サプライ・チェイン最適化の現在-統一言語 SCMLによるアプローチ-(朝倉書店; 2010出版予定)

Supply chain optimization models • • resource constrained scheduling (RCS) lot-sizing (LS) logistics network

Supply chain optimization models • • resource constrained scheduling (RCS) lot-sizing (LS) logistics network design (LND) safety stock allocation (SSA) economic order quantity (EOQ) inventory policy optimization (IPO) vehicle routing (VR)

Combinatorial optimization problems • • • set covering problem (SC) generalized assignment problem (GA)

Combinatorial optimization problems • • • set covering problem (SC) generalized assignment problem (GA) rectangular packing problem (RP) facility location problem (FL) etc. , . . .

Previous SCO models Flow models Scheduling models (LND, FL) (RCS, LS, VR) Constrained optimization

Previous SCO models Flow models Scheduling models (LND, FL) (RCS, LS, VR) Constrained optimization models Multi-echelon inventory models (Algebraic modeling languages) (IPO, SSA, EOQ, LS)

Previous SCO models Network=(Node, Arc) Product, Resource Activity, Resource Flow models Scheduling models (LND,

Previous SCO models Network=(Node, Arc) Product, Resource Activity, Resource Flow models Scheduling models (LND, FL) (RCS, LS, VR) Constrained optimization models Multi-echelon inventory models (Algebraic modeling languages) (IPO, SSA, EOQ, LS) Variable, Constraint Product (BOM)

Entities of the SCML • • • activity resource product node arc Basic entities

Entities of the SCML • • • activity resource product node arc Basic entities temporal piecewise horizon state solver etc. , . . .

Activity • Every action that requires the resources, consumes and/or produces the product, and

Activity • Every action that requires the resources, consumes and/or produces the product, and derives the cost consume product Fixed Cost Variable Cost activity require resource product

Resource • Every entity of limited availability required and/or consumed by activities Our focus

Resource • Every entity of limited availability required and/or consumed by activities Our focus is on the physical, human, and financial resources.

Product • • Products are consumed and/or produced by activities Products are items or

Product • • Products are consumed and/or produced by activities Products are items or commodities through the network node product arc node product

Node and arc • Network is defined by the set of nodes and arcs

Node and arc • Network is defined by the set of nodes and arcs node arc node

Declaration and attributes • • • activity resource product node arc activity declaration activity-name

Declaration and attributes • • • activity resource product node arc activity declaration activity-name [attributes] attribute: duedate integer+ weight integer+ consume product-name unit real+. . . produce product-name unit real+. . .

Key concepts for implementing the SCML • Inheritance / Composition • Hierarchy • Global

Key concepts for implementing the SCML • Inheritance / Composition • Hierarchy • Global / Local

Inheritance

Inheritance

Entity class Entity has a name and attributes (defined by arguments as a dictionary)

Entity class Entity has a name and attributes (defined by arguments as a dictionary) class Entity(): def __init__(self, name="", **args): self. name=name self. attributes=copy. deepcopy(args)

An activity object for LS act 1=Activity("act 1", variablecost=1, fixedcost=53, leadtime=3, resources={“mach 1": 1},

An activity object for LS act 1=Activity("act 1", variablecost=1, fixedcost=53, leadtime=3, resources={“mach 1": 1}, consume={"parts 1": 1, "parts 2": 2}, produce={"prod 1": 1}) parts 1 parts 2 consume Activity “act 1” prod 1 produce Resource “mach 1”

Composition

Composition

Hierarchy • Hierarchy can be defined on every entity using attribute “children” • Every

Hierarchy • Hierarchy can be defined on every entity using attribute “children” • Every attribute of a parent is copied to its children (same as inheritance) activity children Mode

Example: an activity object for RP item 1=Activity("item 1”, cost=10, children= “mode 1": {resources:

Example: an activity object for RP item 1=Activity("item 1”, cost=10, children= “mode 1": {resources: {"width": 3, "height": 2}} , “mode 2”: {resources={"width": 2, "height": 3}, cost=5}) mode 1 (cost=10) mode 2 (cost=5)

Global / Local • Local products can be defined on nodes • Local activities

Global / Local • Local products can be defined on nodes • Local activities and resources can be defined on arcs, i. e. , arcs can own activities and resources • Otherwise, entities are global. arc node consume product node produce activity require resource product

Example: a node object for LND source=Node("source", products= {"apple": {"holdingcost": 10, "supply": 100}, "melon":

Example: a node object for LND source=Node("source", products= {"apple": {"holdingcost": 10, "supply": 100}, "melon": {"holdingcost": 10, "supply": 50}}) node "source" apple melon

Lot-sizing (LS) model horizon, activity, resource, product consume variablecost fixedcost activity produce resource product

Lot-sizing (LS) model horizon, activity, resource, product consume variablecost fixedcost activity produce resource product capacity demand holdingcost leadtime

Example for solving LS in python from SCML import * SCMLモジュールを読み込む sample=SCML() SCMLオブジェクトを生成 sample.

Example for solving LS in python from SCML import * SCMLモジュールを読み込む sample=SCML() SCMLオブジェクトを生成 sample. set. Horizon(5) 計画期間を 5に設定 製品の情報入力 prod 1=Product("prod 1", demand=[5, 5, 6, 7, 8], holdingcost=5, leadtime=3) parts 1=Product("parts 1", holdingcost=1, leadtime=3) parts 2=Product("parts 2", holdingcost=1, leadtime=1) res 1=Resource(“res 1”, capacity={(0, “inf”): 25}) 資源の情報入力 活動の情報入力 act 1=Activity("act 1", variablecost=1, fixedcost=53, resources={"res 1": 1}, consume={"parts 1": 1, "parts 2": 2}, generate={"prod 1": 1}) sample. add. Activity(act 1) sample. add. Products(prod 1, parts 2) sample. add. Resource(res 1) sample. solve(“LS”) LSソルバーで求解

Resource constrained scheduling (RCS) model activity, resource, temporal, state min-max type temporal constraints with

Resource constrained scheduling (RCS) model activity, resource, temporal, state min-max type temporal constraints with delay activity duedate, weight, parallel, break activity state time-dependent resource requirement children activities (=modes) resource time-dependent UB

Logistics network design (LND) model horizon, activity, resource, product, node, arc node product arc

Logistics network design (LND) model horizon, activity, resource, product, node, arc node product arc activities resources fixedcost consume node products variablecost cycletime activity produce product require resource holdingcost supply demand capacity Activity-based multi-period LND model

Vehicle routing (VR) model activity, resource, node, arc, piecewise time windows= duedate piecewise node

Vehicle routing (VR) model activity, resource, node, arc, piecewise time windows= duedate piecewise node depot arc time piecewise cost piecewise “move” activity a customer “vehicle” resource capacity location depot time piecewise

Inventory models horizon, product, activity, resource 1. (network type) economic ordering quantity model (EOQ)

Inventory models horizon, product, activity, resource 1. (network type) economic ordering quantity model (EOQ) 2. safety stock allocation model (SSA) 3. inventory policy optimization model (IPO)

Inventory models and BOM fixedcost (EOQ) activity product demand, holdingcost (common) resource capacity (IPO)

Inventory models and BOM fixedcost (EOQ) activity product demand, holdingcost (common) resource capacity (IPO) leadtime, basestocklevel, backordercost (IPO) servicetime, processingtime (SSA) cycletime (EOQ)

Generalized assignment (GA) aij (requirement) bi =>capacity cij (cost) jobs => activities agents =>resources

Generalized assignment (GA) aij (requirement) bi =>capacity cij (cost) jobs => activities agents =>resources activity resources: resource-name (aij, cij)

Rectangular packing (RP) height =>resource activity, resource, piecewise rectangle =>activity with children (modes) resource

Rectangular packing (RP) height =>resource activity, resource, piecewise rectangle =>activity with children (modes) resource (width or height) capacity, piecewise width =>resource

Facility location (FL) problem • Multi-source Weber problem Given n nodes (customers) on a

Facility location (FL) problem • Multi-source Weber problem Given n nodes (customers) on a plane, find k locations of facilities • nodes: (attributes: x, y coordinates and weight) Example n=1000 k=30

Facility location (FL): Excel interface

Facility location (FL): Excel interface

Applications • Resource constrained scheduling: used in some large plants • Logistics network design:

Applications • Resource constrained scheduling: used in some large plants • Logistics network design: used as a consulting tool in three consulting firms • Vehicle routing: used as a core solver in some major companies • Hybrid models – Lot-sizing + Inventory policy optimization – Logistics network design + Resource constrained scheduling +Lot-sizing