기본적으로, 나는 다음과 같은 문제가 있습니다. Anylogic에있는 여러 병원의 특산품을 모델링하고 전문 분야 중 하나가 닫히면 어떻게되는지 분석해야합니다.Anylogic에서 dinamically/programmatically 리소스 만들기
병원 전문의 조합 수가 매우 (약 1000) 문제이므로 "동적/프로그래밍 방식으로"할 수있는 방법을 찾고 있습니다.
즉, 나는 Anylogic MANUALLY에서 리소스를 만들 필요없이 자동으로 resourcePool (및 그에 첨부 된 Schedule)을 만드는 방법을 찾고 있습니다. 예를 들어,이
//An arraylist of names of hospitals
for (String hospitalCode : hospitals) {
for(String specialtyCode : specialtiesCodes) {
ResourcePool res = new ResourcePool();
res.setName(hospitalCode + "_" + specialtyCode);
Schedule schedule = new Schedule();
//Set the type of the schedule along with other parameters. This will be used
//to set the capacity of the resourcePool res
schedule.setParameters(type, capacity, ...);
res.attachSchedule(schedule); //Connects the schedule to the resource
schedule.create();
res.create() //Creates the resources in the Main panel of Anylogic
}
}
Futhermore 같은,이 그림에서 나는
(용량 및 지연 시간이 내가 모델이 문제에 필수적이기 때문에 그들이 resourcePool로 모델링하는) 여러 가지 요리를이 An example of the modeled problem
당신은 내가 resourcePools 및 일정의 무리를 만든 것을 볼 수 있습니다,하지만 난이 수동으로을 수행했다.
일부 resourcePools를 복사/붙여 넣으려고했지만 resourcePool의 이름을 변경할 수있는 방법이 없습니다. Java API도 보았지만 솔루션을 찾지 못했습니다.
도움 주셔서 감사합니다. 나는 나의 질문이 분명하기를 바랍니다.
일정은 다른 분야마다 다릅니다? 그렇다면 차이점은 무엇입니까? –
예, 일정은 전문 분야에 따라 다릅니다. 그들 사이에 고정 된 차이가 없습니다. 예를 들어, 하나의 전문 분야는 10 개의 분야와 150 개의 분야를 가질 수 있습니다.중요한 것은 일정을 사용하여 최대 용량을 추적하는 것입니다. – Eugene
용량 관리에만 사용 하시겠습니까? 또는 당신은 또한 그것들을 사용하여 근무 시간을 정의하고 있습니까? –