当前位置: 首页 > news >正文

备案号 查询 网站抄一则新闻四年级

备案号 查询 网站,抄一则新闻四年级,王野虓,城乡住房建设部网站上篇 排产,原则上也就是分配时间,分配资源;保证资源日历约束,保证工艺路线约束。我们看一下如何实现optaplanner 优化的 定义一个move, 一个move可能改变了分配到的资源,也可能改变了一个资源上的顺序。改变即意味着优…

上篇

排产,原则上也就是分配时间,分配资源;保证资源日历约束,保证工艺路线约束。我们看一下如何实现optaplanner 优化的

  • 定义一个move, 一个move可能改变了分配到的资源,也可能改变了一个资源上的顺序。改变即意味着优化的可能
  • 原本分配的资源,把后工序移到前面来。前后各算一个score. 通过socreDirector中定义的beforeVariableChanged/afterVariableChanged
  • 再更新另一个资源上的链,同时前后继续scoreDirector触发
  • 另一个shadow variable: Start time,通过StartTimeUpdatingVariableListener触发改变。这里的改变保证了不同资源上的job满足工艺路线的约束

模型

如何建模对一个优化问题非常关键

Chain Structure:

The previousAllocation can now be either a Resource (anchor) or another Allocation
Resource becomes a shadow variable automatically updated based on the chain
This creates a clean chain: Resource -> Allocation1 -> Allocation2 -> …

Move Simplification:

No need for separate resource change moves
Single ChainChangeMove handles both resource changes and sequence changes
When moving to a different resource, just set the previous to be the resource
When moving within same resource, set previous to be another allocation

Benefits:

Simpler code structure
Fewer variables to maintain
More efficient move generation
Better encapsulation of the chaining logic
Automatic resource updates through shadow variable

过程

本文我们继续试图学习optaplanner来进行排产规划。

When a move changes an allocation’s resource and/or sequence:

When OptaPlanner/timefold selects a move:

  1. Check if move is doable (isMoveDoable)
  • Verify resource compatibility
  • Check for circular dependencies
  • Validate sequence constraints
  1. Execute the move (doMove)
  • Update primary planning variables
  • Shadow variable listener triggers
  • Start/end times cascade update
  1. Score calculation
  • Check hard constraints
    • Resource conflicts
    • Job dependencies
    • Resource compatibility
  • Evaluate soft constraints
    • Makespan
    • Setup times
    • Resource preferences
  1. Accept/Reject move based on score
  • If better: keep change
  • If worse: maybe keep (based on meta-heuristic)

The previousAllocation shadow variable is updated first
This triggers the AnchorShadowVariable (resource) to update
The StartTimeUpdatingVariableListener then recalculates timing

Chain Update Process:

When an allocation moves to a new resource:
a. It disconnects from its old chain (previous/next allocations are relinked)
b. Inserts into new resource’s chain at specified position
c. Updates shadow variables (resource, start time) for moved allocation
d. Recursively updates all downstream allocations in both chains

Impact on Route Dependencies:

The StartTimeUpdatingVariableListener ensures timing consistency
When start time changes, it propagates updates down the chain
If jobs have dependencies across resources, you’ll need additional constraints
Can add precedence constraints between related jobs

例如

Before:
Resource1 -> Allocation1 -> Allocation2 -> Allocation3
Resource2 -> Allocation4 -> Allocation5

After:
Resource1 -> Allocation1 -> Allocation3
Resource2 -> Allocation4 -> Allocation2 -> Allocation5

The system will:

Update Allocation2’s previousAllocation to Allocation4
Update Allocation2’s resource to Resource2
Recalculate start times for Allocation2 and all subsequent allocations
Update Allocation3’s previousAllocation to Allocation1
Recalculate start times in Resource1’s chain

细节

当一个move发生的时候:

  1. isMoveDoable() is checked
  2. doMove() is called if move is doable
  3. Score is calculated after each change
  4. Move is accepted/rejected based on score

During doMove()

  1. beforeVariableChanged() notifies ScoreDirector
  2. Chain updates occur
  3. afterVariableChanged() notifies ScoreDirector
  4. Shadow variables update automatically
  5. Score calculator runs automatically

Score calculation triggers:

  1. After every genuine variable change
  2. After shadow variables update
  3. After variable listeners complete their updates
  4. Before move acceptance/rejection decision
// Move implementation for changing position in chain
public class ChainChangeMove extends AbstractMove<JobShopSchedule> {private final Allocation allocation;private final Object newPrevious; // Can be Resource or Allocation@Overrideprotected void doMoveOnGenuineVariables(ScoreDirector<JobShopSchedule> scoreDirector) {Object oldPrevious = allocation.getPreviousAllocation();Allocation nextAllocation = findNextAllocation(allocation);// Remove allocation from old chain positionif (nextAllocation != null) {scoreDirector.beforeVariableChanged(nextAllocation, "previousAllocation");nextAllocation.setPreviousAllocation(oldPrevious);scoreDirector.afterVariableChanged(nextAllocation, "previousAllocation");}// Insert allocation at new chain positionAllocation newNext = null;if (newPrevious instanceof Allocation) {newNext = findNextAllocation((Allocation) newPrevious);}// Update the moved allocation's previousscoreDirector.beforeVariableChanged(allocation, "previousAllocation");allocation.setPreviousAllocation(newPrevious);scoreDirector.afterVariableChanged(allocation, "previousAllocation");// Update the next allocation's previous if it existsif (newNext != null) {scoreDirector.beforeVariableChanged(newNext, "previousAllocation");newNext.setPreviousAllocation(allocation);scoreDirector.afterVariableChanged(newNext, "previousAllocation");}}
}

ScoreDirector manages this process

scoreDirector.beforeVariableChanged()
→ Make changes
→ scoreDirector.afterVariableChanged()
→ Shadow updates
→ Score calculation
→ Move acceptance


For chain moves specifically:

a. Original chain score is calculated
b. Move changes are applied
c. New chain score is calculated
d. Downstream impacts are scored
e. Total impact determines move acceptance

http://www.yayakq.cn/news/36608/

相关文章:

  • 网站推广设计做哪些ks2e做网站
  • 广西南宁建设厅网站青海西宁网页网站制作
  • 做网站具体流程步骤企业信息公示信息
  • 天津南开做网站一个织梦两个网站
  • 中国网站建设世界排名在哪可以找到做网站的
  • 在线买房网站建设 方案郑州市 网站建设
  • 使页面具有动态效果的网站建设技术是布展设计公司
  • 三个律师做网站合适吗公司网站开发类属什么费用
  • 传奇网页版游戏开服表优化网站页面
  • 秦皇岛建设厅网站国内广告公司排行
  • 邯郸网站改版费用哪个网站做免费广告好
  • 网站建设方法冫金手指排名26帮卖货平台
  • 青岛建站模板厂家做301网站打不开
  • 大连网站建设费用广州做鞋的网站
  • 找别人建个网站多少钱新业务在线软件下载
  • 网站百度不到验证码怎么办网站优化关键词排名自己怎么做
  • 上海网站 建设网站开发和嵌入式开发哪个
  • 盈润企业网站管理系统开发公司名字
  • winserverfrp可以做网站吗做网站 最好的开源cms
  • 百度电脑版登录网站网站关键词优化的价格
  • 乐都网站建设公司品牌网站设计制作一般多少钱
  • t购物网站开发前景事业单位网站建设的作用
  • 英国人买服务器网站内江市建设培训中心网站
  • 驻马店网站开发公司电话网站制作企业有哪些
  • 免费ps模板下载网站wordpress 会话
  • 懂做网站的人就是好项目营销推广策划
  • 江阴哪里有做网站推广什么网站可以找人做系统
  • 网站开发卖东西wordpress回复显示插件
  • 建网站哪家质量好wordpress右下角弹出广告
  • 网站建设有什么用网络营销的目的是