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

富阳做兼职的网站哪个网站做调查赚钱多

富阳做兼职的网站,哪个网站做调查赚钱多,网站建网站建设企业,网站图片大小Author#xff1a;赵志乾 Date#xff1a;2024-06-18 Declaration#xff1a;All Right Reserved#xff01;#xff01;#xff01; 0. 背景 直接使用Anylogic组件开发的模型无法动态改变运输网布局#xff1b;目前需求是要将运输网布局配置化#xff1b;运输网配置化…Author赵志乾 Date2024-06-18 DeclarationAll Right Reserved 0. 背景 直接使用Anylogic组件开发的模型无法动态改变运输网布局目前需求是要将运输网布局配置化运输网配置化的前提是将其标准化为仅包含辊道、自定义站点两种元素的网络之后依据配置文件动态构建运输网最后将自定义Agent逻辑关联到自定义站点实现流程串通本次示例仅包含运输网中的辊道和自定义站点的动态生成以及组装过程 1. 常用函数 函数功能ConveyorCustomStation()构造函数addVertex(double x, double y)添加点以构建2D图形注意点需要至少三个点且连起的图形不得自身有交叉通常会将CustomStation的图形隐藏而将其内部自定义逻辑封装成Agent用Agent的presentation替补CustomStation本身的图形addConnection(ConveyorPath conveyor, PathType type)将CustomStation与conveyor连接起来onEnter(T agent)根据需要定义子类覆写该方法当所运输物料进入CustomStation时会自动执行该方法 2. 数据结构定义 {points: [{code: , // 点编码name: , // 点名称x: 0.0, // 点坐标y: 0.0,z: 0.0}],conveyors: [{code: , // 辊道编码name: , // 辊道名称pointCodes: [] // 辊道从起点至终点所经历的位置点编码列表}],customStations: [{code: , // 自定义站点编码name: , // 自定义站点名称inConveyorCodes: [], // 传入站点的辊道outConveyorCodes: [] // 传出站点的辊道}] } 3. 代码实现 // ************************数据对象定义**************************** public class PointDefinition implements Serializable {private String code;private String name;private Double x;private Double y;private Double z;// setter、getter }public class ConveyorDefinition implements Serializable {private String code;private String name;// setter、getter }public class LayoutDefinition implements Serializable {private ListPointDefinition points;private ListConveyorDefinition conveyors;private ListCustomStationDefinition customStations;// setter、getter }public class CustomStationDefinition implements Serializable {private String code;private String name;private ListString inConveyorCodes;private ListString outConveyorCodes;// setter、getter }//******************************子类******************************* public class CustomStationT extends Agent extends ConveyorCustomStationT {// 持有站点定义便于onEnter中依据站点不同做不同处理CustomStationDefinition customStationDefinition;public CustomStation(CustomStationDefinition customStationDefinition) {super();this.customStationDefinition customStationDefinition;}public void onEnter(T agent ) {// 自定义逻辑} }//**************************动态生成过程****************************** // step1: 转map方便后续使用 MapString,PointDefinition codeToPointDefinitionMap layoutDefinition.getPoints().stream().collect(Collectors.toMap(PointDefinition::getCode, Function.identity(), (a,b)-b)); MapString,ConveyorDefinition codeToConveyorDefinitionMap layoutDefinition.getConveyors().stream().collect(Collectors.toMap(ConveyorDefinition::getCode, Function.identity(), (a,b)-b)); MapConveyorDefinition,ConveyorPath definitionToConveyorMap new HashMap();// step2: 定义网络对象 ConveyorNetwork conveyorNetwork new ConveyorNetwork(this,conveyorNetwork);// step3: 向网络添加conveyor for(ConveyorDefinition conveyorDefinition : layoutDefinition.getConveyors()){ConveyorPath conveyor new ConveyorPath();// 每个conveyor由若干段组成for(int index0; indexconveyorDefinition.getPointCodes().size()-1; index){PointDefinition startPoint codeToPointDefinitionMap.get(conveyorDefinition.getPointCodes().get(index));PointDefinition endPoint codeToPointDefinitionMap.get(conveyorDefinition.getPointCodes().get(index1));double startX scale.pixelsPerUnit(METER)*startPoint.getX();double startY scale.pixelsPerUnit(METER)*startPoint.getY();double startZ scale.pixelsPerUnit(METER)*startPoint.getZ();double endX scale.pixelsPerUnit(METER)*endPoint.getX();double endY scale.pixelsPerUnit(METER)*endPoint.getY();double endZ scale.pixelsPerUnit(METER)*endPoint.getZ();MarkupSegmentLine segment new MarkupSegmentLine(startX, startY, startZ, endX, endY, endZ);conveyor.addSegment(segment);}definitionToConveyorMap.put(conveyorDefinition, conveyor);conveyorNetwork.add(conveyor); }// step4: 自定义站点添加 for(CustomStationDefinition customStationDefinition : layoutDefinition.getCustomStations()){// step4.1: 站点创建CustomStationAgent customStation new CustomStation(customStationDefinition);ListPointDefinition points new ArrayList();// step4.2: 站点与辊道关联并绘制站点图形 for(String conveyorCode : customStationDefinition.getInConveyorCodes()){customStation.addConnection(definitionToConveyorMap.get(codeToConveyorDefinitionMap.get(conveyorCode)), PathEndType.END);ConveyorDefinition conveyorDefinition codeToConveyorDefinitionMap.get(conveyorCode);PointDefinition pointDefinition codeToPointDefinitionMap.get(conveyorDefinition.getPointCodes().get(conveyorDefinition.getPointCodes().size()-1));points.add(pointDefinition);customStation.addVertex(scale.pixelsPerUnit(METER)*pointDefinition.getX(), scale.pixelsPerUnit(METER)*pointDefinition.getY());}for(String conveyorCode : customStationDefinition.getOutConveyorCodes()){customStation.addConnection(definitionToConveyorMap.get(codeToConveyorDefinitionMap.get(conveyorCode)), PathEndType.BEGIN);ConveyorDefinition conveyorDefinition codeToConveyorDefinitionMap.get(conveyorCode);PointDefinition pointDefinition codeToPointDefinitionMap.get(conveyorDefinition.getPointCodes().get(0));points.add(pointDefinition);customStation.addVertex(scale.pixelsPerUnit(METER)*pointDefinition.getX(), scale.pixelsPerUnit(METER)*pointDefinition.getY());}// step4.3: 站点图形补充int conveyorNum customStationDefinition.getInConveyorCodes().size()customStationDefinition.getOutConveyorCodes().size();if(conveyorNum0){error(不允许无连接辊道的ConveyorCustomStation);}else if(conveyorNum1){// 已有一个点需要额外补充两个点customStation.addVertex(scale.pixelsPerUnit(METER)*(points.get(points.size()-1).getX()0.1), scale.pixelsPerUnit(METER)*(points.get(points.size()-1).getY()0.2));customStation.addVertex(scale.pixelsPerUnit(METER)*(points.get(points.size()-1).getX()0.1), scale.pixelsPerUnit(METER)*(points.get(points.size()-1).getY()0.4));}else if(conveyorNum2){// 已有一个点需要额外补充一个点借助两点的法线寻找第三点double x1 scale.pixelsPerUnit(METER)*points.get(0).getX();double y1 scale.pixelsPerUnit(METER)*points.get(0).getY();double x2 scale.pixelsPerUnit(METER)*points.get(points.size()-1).getX();double y2 scale.pixelsPerUnit(METER)*points.get(points.size()-1).getY();double kAB; if (x2 - x1 0) { kAB Double.POSITIVE_INFINITY;} else { kAB (y2 - y1) / (x2 - x1); } double kPerp; if (kAB Double.POSITIVE_INFINITY || kAB Double.NEGATIVE_INFINITY || kAB 0) { kPerp kAB 0 ? Double.POSITIVE_INFINITY : 0; } else { kPerp -1 / kAB; } double xC x1 0.5; double yC; if (kPerp Double.POSITIVE_INFINITY || kPerp Double.NEGATIVE_INFINITY) { yC y1; } else { yC y1 kPerp * (xC - x1); } customStation.addVertex(xC,yC);}conveyorNetwork.add(customStation); }// step5: 将生成的网络添加到演示中 Level customLevel new Level(this,customLevel,SHAPE_DRAW_2D3D,0); customLevel.add(conveyorNetwork); customLevel.initialize(); presentation.add(customLevel);
http://www.hkea.cn/news/14481954/

相关文章:

  • 网站建设图片怎么做广州我网站制作
  • 怎样给自己建立网站网络营销论文答辩提问
  • 如何建设一个自己+的网站首页wordpress侧边小图标联系方式
  • 网站免费打包ios网页设计作业html博物馆免费
  • 网站备案怎么登陆广东软件公司
  • 如何做切片网站楼市最新消息2022新政
  • 网站点击图片放大百度推广和网站建设推广的区别
  • 网站标题的优化天津的公司能在北京做网站备案吗
  • 中国建设银行招聘网站首页深圳网站制作公司怎么样
  • 呼市网站seo优化工资提成怎么算wordpress网站菜单固定
  • 现代农业园网站建设方案柳州网站制作推荐
  • 宁波市住房和城乡建设局网站首页图书馆门户网站建设方案
  • 哪里做网站创建一个购物网站需要什么
  • app设计欣赏网站济南建公司网站
  • 网站翻页动画效果安阳+网站建设
  • 做网站的是什么软件购物网站开发英文文献
  • 湖南地税局官网站水利建设基金微博营销网站源码
  • 江苏艺居建设有限公司网站wordpress用什么编辑器好
  • 苏州企业网站建设开发广东企业网站建设报价
  • 网站meta 优化建议泰安建设网
  • 沈阳模板建站哪家好在百度上怎么建立网站吗
  • 做传感器的网站wordpress每页不显示文章
  • 的建站公司诸葛企业网站建设公司
  • 惠安网站建设价格做网站要服务器和什么软件
  • 文山微网站建设网站开发公司盈利
  • 广州信科做网站2021中国十大软件公司排名
  • 游戏网站建设项目规划书案例网站导航优化的描述
  • 长春seo关键字排名优化seo推广软件怎样
  • 装修公司营销型网站建设济南制作网站公司吗
  • 网络购物网站备案云盘做网站