CN103400013B - A kind of reusable realistic model and exploitation thereof and using method - Google Patents

A kind of reusable realistic model and exploitation thereof and using method Download PDF

Info

Publication number
CN103400013B
CN103400013B CN201310353755.5A CN201310353755A CN103400013B CN 103400013 B CN103400013 B CN 103400013B CN 201310353755 A CN201310353755 A CN 201310353755A CN 103400013 B CN103400013 B CN 103400013B
Authority
CN
China
Prior art keywords
interface
model
simulation calculation
state
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310353755.5A
Other languages
Chinese (zh)
Other versions
CN103400013A (en
Inventor
姚益平
朱峰
鄢来斌
蒋志文
曲庆军
唐文杰
陈慧龙
左晓亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
National University of Defense Technology
Original Assignee
National University of Defense Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by National University of Defense Technology filed Critical National University of Defense Technology
Priority to CN201310353755.5A priority Critical patent/CN103400013B/en
Publication of CN103400013A publication Critical patent/CN103400013A/en
Application granted granted Critical
Publication of CN103400013B publication Critical patent/CN103400013B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of reusable realistic model and exploitation thereof and using method, described reusable realistic model comprises Simulation Calculation and seven class standard service interfaces, and described Simulation Calculation refers to that the computer program of simulated system, process or function realizes, described seven class standard service interfaces specifically comprise model initialization interface, mode input interface, model state restoration interface, running parameter and state adjustment interface, model output interface, model state obtains interface and Models computed interface, described reusable realistic model outwards provides seven class standard service interfaces, and described Simulation Calculation is as an independently service entities, the sole mode carrying out information interaction with the external world is exactly realized by described seven class standard service interfaces, thus, between model, the degree of coupling is less and do not deposit binding with emulation platform, and then, promote application between and between platform model reuse the fast Development with Simulation Application.

Description

A kind of reusable realistic model and exploitation thereof and using method
Technical field
The present invention relates to modeling and simulation technology field, be specifically related to a kind of reusable realistic model and exploitation thereof and using method.
Background technology
Complication system emulation often comprises a large amount of entities; comprise again multiple model in entity, and these models often relate to numerous specialty, needs and numerous R&D institution cooperate; in order to protect the intellectual property, model often submits to user with packaged actuating code form.Owing to lacking unified reusable Simulation Model Development specification and the guidance of development approach, between the interface disunity causing the model of commensurate exploitation outwards to provide, model the degree of coupling comparatively large, bind closely with emulation platform, such that the integrated difficulty of realistic model is large, model reusability is difficult.Meanwhile, along with deepening continuously of Simulation Application, complication system Solid simulation model presents the trend of substantial amounts, of a great variety, mutual complexity; And, on the one hand, along with deepening continuously and the appearance of complication system ingredient new feature of people's understanding, department pattern in complication system Simulation Application often needs constantly perfect, even develop new model, this just requires the degree of coupling as far as possible reduced between model, reduces model modification to the impact of other model, reuses with zero amendment realizing other model a large amount of; On the other hand, people often wish by the Simulation model reuse developed in other analogue system in need (as by certain early warning radar models applying in different operation simulating experimental systems), and this not only requires that between model, the degree of coupling is little, but also require that realistic model is not bound with emulation platform.
Model reusability is the important channel of improving Simulation Application system development efficiency, after the Building of Simulation Model of Reuse-oriented, without the need to or only need do a small amount of amendment and just can directly reuse in new Simulation Application, thus avoid the overlapping development of low level, improve the development efficiency of Simulation Application, in addition, the model reusability realized based on unified interface specification also will bring following benefit [1]: (1) is encapsulated into the knowledge relevant to field in Reusable Model, make in the process building Simulation Application, application developer only need by these model integrated in corresponding simulation frame, without the need to paying close attention to the domain-specific knowledge that model relates to, the exploitation threshold of Simulation Application so just can be reduced; (2) by setting up corresponding model bank, unified management being carried out to Reusable Model, breaking the restriction of professional domain, realize sharing and reusing of each class model resource, reduce the development and maintenance cost of Simulation Application.
Research at present for model reusability mainly comprises following direction:
1, based on the Reusable Model development approach of modeling language
Modeling language is special Simulation-Oriented Modeling and Design, the copying modular design of specific area is normally modeling primitive by its principle, the scheduling of emulation and control module are designed to emulator, the bottom layer realization automatic mapping function of modeling language to universal programming language.Modeling language achieves being separated of model and emulator, greatly reduces modeling difficulty, improves the reusability of realistic model.But, modeling language does not have field independence usually, as the Modelica language etc. of the ACSL language towards continuous system simulation, the GPSS language towards discrete event system simulation, multi-domain Oriented physical simulation, when applying towards complication system multi-domain simulation, modeling language also exists inborn deficiency [2].
2, based on the Reusable Model development approach of modeling specification
Simulation modeling specification is that realistic model defines unified inner structure, behavior and external interface, makes realistic model after having developed, without the need to or only need do a small amount of amendment and just can directly reuse in new Simulation Application.Usual simulation modeling specification does not limit concrete programming language and operation support platform, may be used for instructing building reusable realistic model.
Ou Hang office (ESA) proposed the realistic model Description standard SMP2(SimulationModelPortabilityStandards2 of Reuse-oriented in 2004) [3].The object of SMP2 standard is to provide a model development framework, reuses so that the platform realizing realistic model is independent, cross-platform, adopts the thought based on assembly to support the modular design of realistic model and service of simulation.But SMP2 specification abstraction hierarchy is higher, be not suitable for the exploitation of guiding function level, low level realistic model.
Arizona State University Zeigler professor proposed parallel discrete event system modularization modeling specification PDEVS(ParallelDiscreteEventSystemSpecifications in 2000) [4].PDEVS comprises atomic model and coupling model two normal forms.How atomic model normal form regulation grows out of nothing structure minimodel, and coupling model normal form specifies the model that how to utilize the structure of existing atomic model or coupling model hierarchy type larger.But because PDEVS specification is too complicated, and the event handling logic of atomic model is too concentrated, and operational efficiency is undesirable, is not therefore up to the present accepted extensively by industry.
3, based on the Reusable Model development approach of modeling environment
Simulation modeling environment is that reusable realistic model provides operation support platform, and modeling personnel can make full use of the feature of platform, builds the reusable realistic model of simulation modeling environmental interior.But based on the Reusable Model of simulation modeling environment owing to binding with concrete platform, its scope of reusing is usually limited.
The JSIMS system of one of U.S. army's associative simulation three large project provides a series of support facility, and wherein, the synthetic indicator that common component simulation engine CCSE is JSIMS provides core support service [5].CCSE has used for reference assembly type idea about modeling, provides entity and assembly two kinds of base class, for the component model of User Exploitation oneself, assembles in entity to assembly, be then applied in the simulation frame of CCSE and go.But in CCSE modeling framework there is efficiency in the communication mode of inter-module announcement order formula, and its modeling pattern is also bound with its emulation platform, the model reusability not between supporting platform.
HLA is proposed by U.S. Department of Defense (DoD) modeling and simulating office, is intended to solve interoperability between numerous Heterogeneous simulation system and reuses problem.But the practice effect of HLA in reusing is unsatisfactory, and main manifestations is as follows [6]:
(1) granularity of reusing is excessively thick.What HLA supported reuses granularity at analogue system or emulation member of an alliance level, is difficult to meet the demand that level inner model is reused.
(2) HLA itself does not solve model reusability sex chromosome mosaicism.For this reason, SISO proposes basic object Model B OM, attempts to make up HLA and is reusing the deficiency in support.But BOM is mainly used in the modeling of facing assembly model, the support on unified model interface specification and Reusable Model development approach still needs to strengthen.
In a word, unified standard is not yet formed both at home and abroad in reusable Simulation Model Development, and existing reusable Simulation Model Development method or not model reusability between supporting platform, be not suitable for the exploitation of the grade simulated solid model of guiding function, be difficult to the fast Development of model reusability and Simulation Application between the distribution Efficient Development of implementation model and platform.Therefore, little in the urgent need to the degree of coupling between a kind of model and do not deposit reusable realistic model and the development approach thereof of binding with emulation platform.
Above-mentioned each document source of quoting is as follows:
[1]StewartRobinson,RichardE.Nance,RayJ.Paul,MichaelPidd,SimonJ.E.Taylor.SimulationModelReuse:Definitions,BenefitsandObstacles[J].SimulationModelingPracticeandTheory12(2004)479-494.
[2] Wang Weiping, Lei Yonglin, Zhu Yifan. based on the reusable Simulation model representation technique study of meta-model, Computer Simulation, 2007,24 (8): 93-97.
[3]ESA.SMP2.0Handbook[Z].Paris,France:EuropeanSpaceAgency,2005.
[4]B.P.Zeigler,H.Praehofer,andT.G.Kim,TheoryofModelingandSimulation[M].SanDiegoUSA:AcademicPress,2000.
[5]MariaValinski,JonathanDriscoll.ProvidingaParallelandDistributedCapabilityforJMASSusingSPEEDES[C].ProceedingsofSPIE2002.2002:88-98.
[6] Gong Jianxing, Wang Da, Qiu Xiaogang, the reusability research [J] of model in yellow Ke Di .HLA federal member. Journal of System Simulation, 2005.
Summary of the invention
For prior art Problems existing, the object of the present invention is to provide a kind of reusable realistic model and development approach thereof, described reusable realistic model outwards provides seven class standard service interfaces, and described reusable realistic model is as an independently service entities, the sole mode carrying out information interaction with the external world is exactly realized by described seven class standard service interfaces, thus, between model, the degree of coupling is little and do not deposit binding with emulation platform, and then, promote application between and between platform model reuse the fast Development with Simulation Application.
The reusable realistic model of one provided by the invention, is characterized in that, it comprises Simulation Calculation and seven class standard service interfaces, and wherein, described Simulation Calculation refers to that the computer program of simulated system, process or function realizes; Described seven class standard service interfaces specifically comprise model initialization interface, model state restoration interface, running parameter and state adjustment interface, mode input interface, Models computed interface, model state acquisition interface and model output interface, above-mentioned each interface is made up of the interface function of one or more heavy duty respectively, total interface function can call by SNNP, wherein
Described model initialization interface Simulation Calculation according to the data initialization in corresponding interface parameters;
The state of described model state restoration interface in order to the recovering state of described Simulation Calculation is specified to interface parameters;
Described running parameter and state adjustment interface arrange described Simulation Calculation running parameter and state according to the data in corresponding interface parameters;
Described mode input interface arranges the input parameter of described Simulation Calculation according to the data in corresponding interface parameters;
Described Models computed interface, in order to call described Simulation Calculation, makes described Simulation Calculation resolve the value in corresponding moment according to given simulation time;
Described model state obtains interface in order to obtain the state of current described Simulation Calculation, and is kept in interface parameters by status data;
Described model output interface in order to read the output data of Simulation Calculation from output buffer, and is corresponding export structure element assignment;
Described reusable realistic model is as an independently service entities, and the sole mode carrying out information interaction with the external world is exactly realized by described seven class standard service interfaces.
Particularly, the citation form of described model initialization interface is as follows:
IntCXXModel::Initialize (InitStructType1*pScenarioData1) or intCXXModel::Initialize (Vector<InitStructType2*>*pSce narioData2); Wherein, the pointer of interface parameters to be model initialization data structure body pointer or element the be Vector type of structure pointer, InitStructType1, InitStructType2 ... the self-defining structured data type in model development side, pScenarioData1, pScenarioData2 ... contain the value that Simulation Calculation needs initialized all state variables and property parameters.
Particularly, the citation form of described model state restoration interface is as follows:
IntCXXModel::SetSimuStatus (string & SimuStatus); Wherein, interface parameters SimuStatus is binary stream corresponding to Simulation Calculation state.
Particularly, described running parameter and state adjustment interface citation form are:
IntCXXModel::SetWorkingPara (WorkingStructType1*pWorkingData1) or intCXXModel::SetWorkingPara (Vector<WorkingStructType2*>*p WorkingData2); Wherein, the pointer of interface parameters to be the structured fingers of model running parameter and status data or element the be Vector type of structure pointer, WorkingStructTypeX is the self-defining structured data type in model development side, and pWorkingDataX contains the value that Simulation Calculation needs running parameter and the state variable arranged.
Particularly, the citation form of described mode input interface is as follows:
IntCXXModel::SetInputData (InputStructType1*pInputData1) or intCXXModel::SetInputData (Vector<InputStructType2*>*pIn putData2); Wherein, the pointer of interface parameters to be the input structured fingers of data or element the be Vector type of structure pointer, InputStructTypeX is the self-defining structured data type in model development side, and pInputDataX contains the input data that Simulation Calculation needs to arrange.
Particularly, the citation form of described Models computed interface is as follows:
IntCXXModel::ModelProcess (doubledSimuTime); Wherein, interface parameters is the given simulation time of dispatching party.
Particularly, the citation form of described model state acquisition interface is as follows:
IntCXXModel::GetSimuStatus (string & SimuStatus); Wherein, interface parameters SimuStatus is binary stream corresponding to Simulation Calculation state.
Particularly, the citation form of described model output interface is as follows:
IntCXXModel::GetOutputData (OutputStructType1*pOutputData1) or intCXXModel::GetOutputData (Vector<OutputStructType2*>*pO utputData2); Wherein, interface parameters is export the pointer that the structured fingers of data or element are the Vector type of structure pointer, OutputStructTypeX is the self-defining structured data type in model development side, and pOutputDataX contains the data that Simulation Calculation needs to export.
Present invention also offers a kind of development approach of reusable realistic model, it comprises the following steps:
Step S91, Simulation Calculation obtain: obtain the Simulation Calculation that model development side provides;
Step S92, model initialization interface encapsulation: described model initialization interface Simulation Calculation according to the data initialization in corresponding interface parameters;
Step S93, model state restoration interface encapsulate: the state that the recovering state of described Simulation Calculation is specified to interface parameters by described model state restoration interface;
Step S94, running parameter and state adjustment interface encapsulation: described running parameter and state adjustment interface arrange described Simulation Calculation running parameter and state according to the data in corresponding interface parameters;
Step S95, mode input interface encapsulation: described mode input interface arranges the input parameter of described Simulation Calculation according to the data in corresponding interface parameters;
Step S96, Models computed interface encapsulation: described Models computed interface, in order to call described Simulation Calculation, makes described Simulation Calculation resolve the value in corresponding moment according to given simulation time;
Step S97, model state obtain interface encapsulation: described model state obtains interface in order to obtain the state of current described Simulation Calculation, and is kept in interface parameters by status data;
Step S98, model output interface encapsulate: described model output interface in order to read the output data of Simulation Calculation from output buffer, and is corresponding export structure element assignment.
Present invention also offers a kind of using method of reusable realistic model, it comprises the following steps:
Step S01, model initialization: described model initialization interface obtains the value of all elements in structure corresponding to structure pointer that dispatching party imports into, to attribute and the state variable initialize of described Simulation Calculation;
Step S02, model state are arranged: before execution cost Simulation Calculation is resolved, and described model state restoration interface recovers the state of the described Simulation Calculation under current simulation time;
Step S03, running parameter and state adjust: be the demand of the running parameter and state that meet Simulation Calculation described in dynamic conditioning, before execution cost Models computed interface, described running parameter and state adjustment interface according to adjustment instruction, and arrange running parameter and the state of described Simulation Calculation according to the supplemental characteristic that dispatching party provides;
Step S04, mode input data are arranged: described mode input interface carries out assignment according to the data in corresponding interface parameters to the input variable of Simulation Calculation;
Step S05, Models computed operate: after described mode input interface carries out assignment to the input variable of Simulation Calculation, the simulation time that described Simulation Calculation is specified according to the currency of variable and dispatching party, carries out corresponding model calculating;
Step S06, model state obtain: be the needs of satisfied optimistic synchronization mechanism recovering state, need the state of the described Simulation Calculation under preservation current simulation time after execution cost Simulation Calculation is resolved;
Step S07, model export data acquisition: after Models computed is finished, various output data are kept in output buffer, and calling model output interface can read Simulation Calculation from output buffer and export data.
Based on disclosing of above technical scheme, the present invention possesses following beneficial effect:
The reusable realistic model of one provided by the invention, it comprises Simulation Calculation and seven class standard service interfaces, and wherein, described Simulation Calculation refers to that the computer program of simulated system, process or function realizes; Described seven class standard service interfaces specifically comprise model initialization interface, mode input interface, model state restoration interface, running parameter and state adjustment interface, model output interface, model state acquisition interface and Models computed interface; Described reusable realistic model outwards provides seven class standard service interfaces, and described reusable realistic model is as an independently service entities, the sole mode carrying out information interaction with the external world is exactly realized by described seven class standard service interfaces, thus, between model, the degree of coupling is little and do not deposit the problems such as binding with emulation platform, and then, promote application between and between platform model reuse the fast Development with Simulation Application.
Accompanying drawing explanation
Fig. 1 is the structured flowchart of reusable realistic model provided by the invention;
Fig. 2 is the general flow chart of the using method of reusable realistic model provided by the invention.
Drawing reference numeral explanation
Reusable realistic model 100
Simulation Calculation 1
Model initialization interface 2
Model state restoration interface 3
Running parameter and state adjustment interface 4
Mode input interface 5
Models computed interface 6
Model state obtains interface 7
Model output interface 8
Embodiment
Technical scheme of the present invention is further illustrated by embodiment below in conjunction with accompanying drawing:
For prior art Problems existing, the object of the present invention is to provide a kind of reusable realistic model and development approach thereof, described reusable realistic model 100 outwards provides seven class standard service interfaces, and described reusable realistic model 100 is as an independently service entities, the sole mode carrying out information interaction with the external world is exactly realized by described seven class standard service interfaces, thus, between model, the degree of coupling is little and do not deposit the problems such as binding with emulation platform, and then, promote application between and between platform model reuse the fast Development with Simulation Application.
Refer to Fig. 1, the reusable realistic model 100 of one provided by the invention, it comprises Simulation Calculation 1 and seven class standard service interfaces, and wherein, described Simulation Calculation 1 refers to that the computer program of simulated system, process or function realizes; Described seven class standard service interfaces specifically comprise model initialization interface 2, model state restoration interface 3, running parameter and state adjustment interface 4, mode input interface 5, Models computed interface 6, model state acquisition interface 7 and model output interface 8, each interface is made up of the interface function of one or more heavy duty, and total interface function can call by SNNP.
Described model initialization interface 2 carrys out Simulation Calculation 1 described in initialization according to the data obtained in corresponding interface parameters, and its citation form is as follows:
IntCXXModel::Initialize (InitStructType1*pScenarioData1) or intCXXModel::Initialize (Vector<InitStructType2*>*pSce narioData2); Wherein, the pointer of interface parameters to be model initialization data structure body pointer or element the be Vector type of structure pointer, InitStructType1, InitStructType2 ... the self-defining structured data type in model development side, pScenarioData1, pScenarioData2 ... contain the value that Simulation Calculation needs initialized all state variables and property parameters.
Before calling Initialize function, InitStructTypeX* type or Vector<InitStructTypeX*>* type definition pScenarioDataX pointer variable is adopted by dispatching party program, and apply for corresponding storage space, then resolve simulation scenario file, obtaining the relevant data that prefer is structure element assignment corresponding to this pointer variable.Rreturn value represents the result that model initialization interface 2 performs, and wherein 1 represents initialization success, and 0 represents initialization failure.Dispatching party may need scheduling Initialize many times with to dissimilar structure (different parameter) initialize.
The state of described model state restoration interface 3 in order to the recovering state of described Simulation Calculation 1 is specified to interface parameters (binary stream), its citation form of tool is as follows:
IntCXXModel::SetSimuStatus (string & SimuStatus); Wherein, interface parameters SimuStatus is binary stream corresponding to Simulation Calculation 1 state.Rreturn value represents the result that model state restoration interface 3 performs, and 1 for running succeeded, and 0 for perform failure.When content in SimuStatus is (first time calls) time empty, what SetSimuStatus operates and do not do, and returns immediately.
Described running parameter and state adjustment interface 4 arrange described Simulation Calculation 1 running parameter and state according to the data of corresponding interface parameters, and its citation form of tool is as follows:
IntCXXModel::SetWorkingPara (WorkingStructType1*pWorkingData1) or intCXXModel::SetWorkingPara (Vector<WorkingStructType2*>*p WorkingData2); Wherein, the pointer of interface parameters to be the structured fingers of model running parameter and status data or element the be Vector type of structure pointer, WorkingStructTypeX is the self-defining structured data type in model development side, and pWorkingDataX contains the value that model needs running parameter and the state variable arranged.
Before calling SetWorkingPara function, WorkingStructTypeX* type or Vector<WorkingStructTypeX*>* type definition pointer variable pWorkingDataX is adopted by dispatching party, and apply for corresponding storage space, be the structure element assignment that these pointer variables are corresponding.Rreturn value represents the execution result of running parameter and state adjustment interface 4, and 1 for running succeeded, and 0 for perform failure.
Described mode input interface 5 arranges the input parameter of described Simulation Calculation 1 according to the data in corresponding interface parameters, and its citation form is as follows:
IntCXXModel::SetInputData (InputStructType1*pInputData1) or intCXXModel::SetInputData (Vector<InputStructType2*>*pIn putData2); Wherein, the pointer of interface parameters to be the input structured fingers of data or element the be Vector type of structure pointer, InputStructTypeX is the self-defining structured data type in model development side, and pInputDataX contains the input data that model needs to arrange.
Before calling SetInputData function, InputStructTypeX* type or Vector<InputStructTypeX*>* type definition pointer variable pInputDataX is adopted by dispatching party, and apply for corresponding storage space, be the structure element assignment that these pointer variables are corresponding.Rreturn value represents the execution result of mode input interface 5, and 1 for running succeeded, and 0 for perform failure.Dispatching party may need to dispatch SetInputData many times with to different input parameter assignment.
Described Models computed interface 6 is in order to call described Simulation Calculation 1, and make described Simulation Calculation 1 resolve the value in corresponding moment according to given simulation time, its citation form is as follows:
IntCXXModel::ModelProcess (doubledSimuTime); Wherein, interface parameters is the given simulation time of dispatching party.Rreturn value represents the execution result of Models computed interface 6, and wherein 1 expression runs succeeded, and 0 expression performs failure.Possible scheduling mode is: ModelProcess (dSimuTime+L).
Described model state obtains interface 7 in order to obtain the state of current described Simulation Calculation 1, and is kept at by status data in interface parameters (binary stream), and its citation form is as follows:
IntCXXModel::GetSimuStatus (string & SimuStatus); Wherein, interface parameters SimuStatus is simulation status binary stream.Rreturn value is expressed as the execution result that model state obtains interface 7, and 1 for running succeeded, and 0 for perform failure.
Described model output interface 8 in order to read the output data of Simulation Calculation from output buffer, and is corresponding export structure element assignment, and its citation form is as follows:
IntCXXModel::GetOutputData (OutputStructType1*pOutputData1) or intCXXModel::GetOutputData (Vector<OutputStructType2*>*pO utputData2); Wherein, interface parameters is export the pointer that the structured fingers of data or element are the Vector type of structure pointer, OutputStructTypeX is the self-defining structured data type in model development side, and pOutputDataX contains the data that Simulation Calculation needs to export.
Before calling GetOutputData function, adopt OutputStructTypeX* type or Vector<OutputStructTypeX*>* type definition pointer variable pOutputDataX by dispatching party program.Rreturn value represents the execution result of model output interface 8, and wherein 1 indicates data, and 0 represents countless certificate.The data that the Simulation Calculation that containing user in pOutputDataX needs exports.Dispatching party may need scheduling GetOutputData many times to obtain different output data.
Refer to Fig. 1, the invention provides a kind of development approach of reusable realistic model, it comprises the following steps:
Step S91, Simulation Calculation obtain: obtain the Simulation Calculation that model development side provides;
Step S92, model initialization interface encapsulation: described model initialization interface Simulation Calculation according to the data initialization in corresponding interface parameters;
Step S93, model state restoration interface encapsulate: the state that the recovering state of described Simulation Calculation is specified to interface parameters by described model state restoration interface;
Step S94, running parameter and state adjustment interface encapsulation: described running parameter and state adjustment interface arrange described Simulation Calculation running parameter and state according to the data in corresponding interface parameters;
Step S95, mode input interface encapsulation: described mode input interface arranges the input parameter of described Simulation Calculation according to the data in corresponding interface parameters;
Step S96, Models computed interface encapsulation: described Models computed interface, in order to call described Simulation Calculation, makes described Simulation Calculation resolve the value in corresponding moment according to given simulation time;
Step S97, model state obtain interface encapsulation: described model state obtains interface in order to obtain the state of current described Simulation Calculation, and is kept in interface parameters by status data;
Step S98, model output interface encapsulate: described model output interface in order to read the output data of Simulation Calculation from output buffer, and is corresponding export structure element assignment.
Refer to Fig. 1 and Fig. 2, the development approach of a kind of reusable realistic model provided by the invention, it comprises the following steps:
Step S01, model initialization: described model initialization interface 2 obtains the value of all elements in structure corresponding to structure pointer that dispatching party imports into, to attribute and the state variable initialize of described Simulation Calculation 1;
Step S02, model state are arranged: before execution cost Simulation Calculation 1 is resolved, described model state restoration interface 3 recovers the state of the described Simulation Calculation 1 under current simulation time, the status data of the binary stream form namely provided according to dispatching party, by the state that the recovering state of described Simulation Calculation 1 is specified to binary stream;
Step S03, running parameter and state adjust: for meeting the running parameter of Simulation Calculation 1 described in dynamic conditioning and the demand of state, before execution cost scheduling model resolves interface 6, described running parameter and state adjustment interface 4 according to adjustment instruction, and arrange running parameter and the state of described Simulation Calculation 1 according to the supplemental characteristic that dispatching party provides;
Step S04, mode input data are arranged: described mode input interface 5 carries out assignment according to the data in corresponding interface parameters to the input variable of Simulation Calculation 1;
Step S05, Models computed operate: after the input variable of described mode input interface 5 pairs of Simulation Calculation 1 carries out assignment, the simulation time that described Simulation Calculation 1 is specified according to the currency of variable and dispatching party, carries out corresponding model calculating;
Step S06, model state obtain: be the needs of satisfied optimistic synchronization mechanism recovering state, need the state of the described Simulation Calculation 1 under preservation current simulation time after execution cost Simulation Calculation 1 is resolved;
Step S07, model export data acquisition: after Models computed is finished, various output data are kept in output buffer, and calling model output interface 8 can read from output buffer and export data.
In order to understand the present invention better, be described further below in conjunction with specific embodiment.The present embodiment is based on standard C ++ and the reusable realistic model of weaponry of language is example, describes performance history and the code structure of such reusable realistic model.Seven external service interface methods of weaponry reusable realistic model definition are all defined as empty method in base class CSimuModel, and rewrite in concrete realistic model class CXXModel and realize corresponding function, the base class of reusable realistic model is described below:
The reusable realistic model class CXXModel of weaponry inherits from emulation basic model class CSimuModel, user's heavily loaded service interface define oneself member variable in CXXModel class, power function etc., with the auxiliary logical process function realizing external service interface, it is as follows that concrete realistic model class describes example:
Based on disclosing of above technical scheme, the present invention possesses following beneficial effect:
The reusable realistic model 100 of one provided by the invention, it comprises Simulation Calculation 1 and seven class standard service interfaces, and wherein, described Simulation Calculation 1 refers to that the computer program of simulated system, process or function realizes; Described seven class standard service interfaces specifically comprise model initialization interface 2, mode input interface 5, model state restoration interface 3, running parameter and state adjustment interface 4, model output interface 8, model state acquisition interface 7 and Models computed interface 6; Described reusable realistic model 100 outwards provides seven class standard service interfaces, and described reusable realistic model 100 is as an independently service entities, the sole mode carrying out information interaction with the external world is exactly realized by described seven class standard service interfaces, thus, between model, the degree of coupling is little and do not deposit the problems such as binding with emulation platform, and then, promote application between and between platform model repeat to call the fast Development with Simulation Application.
Above by reference to the accompanying drawings to invention has been exemplary description; obvious realization of the present invention is not subject to the restrictions described above; as long as have employed the various improvement that method of the present invention is conceived and technical scheme is carried out; or design of the present invention and technical scheme directly applied to other occasion, all in protection scope of the present invention without to improve.

Claims (10)

1. a reusable realistic model, it is characterized in that, it comprises Simulation Calculation and seven class standard service interfaces, wherein, described Simulation Calculation refers to the model for simulated real system, process or function, and this Simulation Calculation adopts computer program to realize; Described seven class standard service interfaces specifically comprise model initialization interface, model state restoration interface, running parameter and state adjustment interface, mode input interface, Models computed interface, model state acquisition interface and model output interface, above-mentioned each interface is made up of the interface function of one or more heavy duty respectively, total interface function can call by SNNP, wherein
Described model initialization interface Simulation Calculation according to the data initialization in corresponding interface parameters;
The state of described model state restoration interface in order to the recovering state of described Simulation Calculation is specified to interface parameters;
Described running parameter and state adjustment interface arrange described Simulation Calculation running parameter and state according to the data in corresponding interface parameters;
Described mode input interface arranges the input parameter of described Simulation Calculation according to the data in corresponding interface parameters;
Described Models computed interface, in order to call described Simulation Calculation, makes described Simulation Calculation resolve the value in corresponding moment according to given simulation time;
Described model state obtains interface in order to obtain the state of current described Simulation Calculation, and is kept in interface parameters by status data;
Described model output interface in order to read the output data of Simulation Calculation from output buffer, and is corresponding export structure element assignment;
Described reusable realistic model is as an independently service entities, and the sole mode carrying out information interaction with the external world is exactly realized by described seven class standard service interfaces.
2. reusable realistic model according to claim 1, is characterized in that, the citation form of described model initialization interface is as follows:
IntCXXModel::Initialize (InitStructType1*pScenarioData1) or intCXXModel::Initialize (Vector<InitStructType2*>*pSce narioData2); Wherein, the pointer of interface parameters to be model initialization data structure body pointer or element the be Vector type of structure pointer, InitStructType1, InitStructType2 are the self-defining structured data types in model development side, and pScenarioData1, pScenarioData2 contain the value that Simulation Calculation needs initialized all state variables and property parameters.
3. reusable realistic model according to claim 1, is characterized in that, the citation form of described model state restoration interface is as follows:
IntCXXModel::SetSimuStatus (string & SimuStatus); Wherein, interface parameters SimuStatus is binary stream corresponding to Simulation Calculation state.
4. reusable realistic model according to claim 1, is characterized in that, described running parameter and state adjustment interface citation form are:
IntCXXModel::SetWorkingPara (WorkingStructType1*pWorkingData1) or intCXXModel::SetWorkingPara (Vector<WorkingStructType2*>*p WorkingData2); Wherein, the pointer of interface parameters to be the structured fingers of model running parameter and status data or element the be Vector type of structure pointer, WorkingStructTypeX is the self-defining structured data type in model development side, and pWorkingDataX contains the value that Simulation Calculation needs running parameter and the state variable arranged.
5. reusable realistic model according to claim 1, is characterized in that, the citation form of described mode input interface is as follows:
IntCXXModel::SetInputData (InputStructType1*pInputData1) or intCXXModel::SetInputData (Vector<InputStructType2*>*pIn putData2); Wherein, the pointer of interface parameters to be the input structured fingers of data or element the be Vector type of structure pointer, InputStructTypeX is the self-defining structured data type in model development side, and pInputDataX contains the input data that Simulation Calculation needs to arrange.
6. reusable realistic model according to claim 1, is characterized in that, the citation form of described Models computed interface is as follows:
IntCXXModel::ModelProcess (doubledSimuTime); Wherein, interface parameters is the given simulation time of dispatching party.
7. reusable realistic model according to claim 1, is characterized in that, the citation form that described model state obtains interface is as follows:
IntCXXModel::GetSimuStatus (string & SimuStatus); Wherein, interface parameters SimuStatus is binary stream corresponding to Simulation Calculation state.
8. reusable realistic model according to claim 1, is characterized in that, the citation form of described model output interface is as follows:
IntCXXModel::GetOutputData (OutputStructType1*pOutputData1) or intCXXModel::GetOutputData (Vector<OutputStructType2*>*pO utputData2); Wherein, interface parameters is export the pointer that the structured fingers of data or element are the Vector type of structure pointer, OutputStructTypeX is the self-defining structured data type in model development side, and pOutputDataX contains the data that Simulation Calculation needs to export.
9. a development approach for reusable realistic model as described in as arbitrary in claim 1 to 8, it is characterized in that, it comprises the following steps:
Step S91, Simulation Calculation obtain: obtain the Simulation Calculation that model development side provides;
Step S92, model initialization interface encapsulation: described model initialization interface Simulation Calculation according to the data initialization in corresponding interface parameters;
Step S93, model state restoration interface encapsulate: the state that the recovering state of described Simulation Calculation is specified to interface parameters by described model state restoration interface;
Step S94, running parameter and state adjustment interface encapsulation: described running parameter and state adjustment interface arrange described Simulation Calculation running parameter and state according to the data in corresponding interface parameters;
Step S95, mode input interface encapsulation: described mode input interface arranges the input parameter of described Simulation Calculation according to the data in corresponding interface parameters;
Step S96, Models computed interface encapsulation: described Models computed interface, in order to call described Simulation Calculation, makes described Simulation Calculation resolve the value in corresponding moment according to given simulation time;
Step S97, model state obtain interface encapsulation: described model state obtains interface in order to obtain the state of current described Simulation Calculation, and is kept in interface parameters by status data;
Step S98, model output interface encapsulate: described model output interface in order to read the output data of Simulation Calculation from output buffer, and is corresponding export structure element assignment.
10. a using method for reusable realistic model as described in as arbitrary in claim 1 to 8, it is characterized in that, it comprises the following steps:
Step S01, model initialization: described model initialization interface obtains the value of all elements in structure corresponding to structure pointer that dispatching party imports into, to attribute and the state variable initialize of described Simulation Calculation;
Step S02, model state are arranged: before execution cost Simulation Calculation is resolved, and described model state restoration interface recovers the state of the described Simulation Calculation under current simulation time;
Step S03, running parameter and state adjust: be the demand of the running parameter and state that meet Simulation Calculation described in dynamic conditioning, before execution cost Models computed interface, described running parameter and state adjustment interface according to adjustment instruction, and arrange running parameter and the state of described Simulation Calculation according to the supplemental characteristic that dispatching party provides;
Step S04, mode input data are arranged: described mode input interface carries out assignment according to the data in corresponding interface parameters to the input variable of Simulation Calculation;
Step S05, Models computed operate: after described mode input interface carries out assignment to the input variable of Simulation Calculation, the simulation time that described Simulation Calculation is specified according to the currency of variable and dispatching party, carries out corresponding model calculating;
Step S106, model state obtain: be the needs of satisfied optimistic synchronization mechanism recovering state, need the state of the described Simulation Calculation under preservation current simulation time after execution cost Simulation Calculation is resolved;
Step S07, model export data acquisition: after Models computed is finished, various output data are kept in output buffer, and calling model output interface can read Simulation Calculation from output buffer and export data.
CN201310353755.5A 2013-08-14 2013-08-14 A kind of reusable realistic model and exploitation thereof and using method Active CN103400013B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310353755.5A CN103400013B (en) 2013-08-14 2013-08-14 A kind of reusable realistic model and exploitation thereof and using method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310353755.5A CN103400013B (en) 2013-08-14 2013-08-14 A kind of reusable realistic model and exploitation thereof and using method

Publications (2)

Publication Number Publication Date
CN103400013A CN103400013A (en) 2013-11-20
CN103400013B true CN103400013B (en) 2016-01-13

Family

ID=49563641

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310353755.5A Active CN103400013B (en) 2013-08-14 2013-08-14 A kind of reusable realistic model and exploitation thereof and using method

Country Status (1)

Country Link
CN (1) CN103400013B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104268346B (en) * 2014-09-30 2018-06-22 中国人民解放军国防科学技术大学 A kind of implementation method of the Simulation Application visualization the integration environment based on object class interaction figure
CN105068858A (en) * 2015-07-29 2015-11-18 北京世冠金洋科技发展有限公司 Multi-source heterogeneous system emulation method and apparatus
CN106202681A (en) * 2016-07-04 2016-12-07 北京空间飞行器总体设计部 Reusable satellite power supply energy balance analogue system and modeling method thereof
CN106777450B (en) * 2016-11-04 2020-10-20 中软信息系统工程有限公司 Model description and generation method supporting combined model
CN107832551B (en) * 2017-11-24 2021-10-01 北京宇航系统工程研究所 Modularized system simulation system and method for space equipment
CN108648086A (en) * 2018-05-22 2018-10-12 中国银行股份有限公司 A kind of finance quantization transaction processing method and device
CN109669671B (en) * 2018-12-07 2022-05-17 中国人民解放军国防科技大学 Multi-level self-adaptive method based on micro-service
CN109542827A (en) * 2019-01-25 2019-03-29 上海创景信息科技有限公司 General purpose simulation, system and medium based on model
CN111124897B (en) * 2019-12-06 2023-01-10 北京京航计算通讯研究所 Method for generating reusable simulation interface model
CN111124790B (en) * 2019-12-06 2023-01-10 北京京航计算通讯研究所 Generation system of reusable simulation interface model
CN112433806A (en) * 2020-10-19 2021-03-02 湖南和信智仿信息科技有限公司 Computing model structure and scheduling execution method for cloud simulation service
CN112559643A (en) * 2020-12-21 2021-03-26 北京仿真中心 Simulation entity model description method
CN112988147A (en) * 2021-03-17 2021-06-18 南京仁谷系统集成有限公司 Cross-platform simulation model development method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101710361A (en) * 2009-11-13 2010-05-19 北京航空航天大学 Distributed traffic simulating platform based on Service-Oriented Architecture (SOA) and simulating method thereof

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101710361A (en) * 2009-11-13 2010-05-19 北京航空航天大学 Distributed traffic simulating platform based on Service-Oriented Architecture (SOA) and simulating method thereof

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
基于元模型的可重用仿真模型表示方法研究;王维平等;《计算机仿真》;20070831;第24卷(第8期);93-97 *
支持虚拟样机的仿真模型重用方法研究;雷永林;《计算机集成制造系统》;20070228;第13卷(第2期);287-294 *
面向并行离散事件仿真组件的调试框架设计;朱峰;《计算机科学》;20101231;第37卷(第12A期);68-76 *

Also Published As

Publication number Publication date
CN103400013A (en) 2013-11-20

Similar Documents

Publication Publication Date Title
CN103400013B (en) A kind of reusable realistic model and exploitation thereof and using method
EP3304229B1 (en) Method and system for generating plc code with a connectivity model
Pidd et al. Simulation software: not the same yesterday, today or forever
CN104391701A (en) Method for developing energy efficiency assessment software
CN103092645A (en) Geographic spatial information application system and implement method thereof based on microkernel technology
CN105446730A (en) Construction method of resource environment model base
CN109656635A (en) Development approach and system are assembled based on the electric analog application software of platform and plug-in unit
CN103020021A (en) Heterogeneous PDM (product data management) system data conversion method and conversion adapter
CN108984236A (en) A kind of implementation method and equipment of virtual management platform
CN116661766A (en) Software low-code development method based on artificial intelligence
CN101620592A (en) Method for storing data by combination of PDF and XML
CN111399829A (en) Waveform modeling method and terminal based on model driving
Radeski et al. Component-based development extensions to HLA
CN109614140A (en) Configuration data processing method and device, electronic equipment, storage medium
CN112347534B (en) Water conservancy and hydropower engineering BIM model conversion method based on IFC extension
Tong Design and implementation of context calculus in the GIPSY
CN109597611A (en) Front end data flow control Components Development system, method, equipment and storage medium
KR20180037487A (en) Method and recording medium for compatibility between iec61850 and opc ua
Smeda et al. Software connectors reuse in component-based systems
Telleschi et al. Reference Missile Functional Architecture, Addressing Design in a Multinational Defense Company.
Romdhane et al. Multi-agent solutions for energy systems: a model driven approach
Emerson GME-MOF: an MDA metamodeling environment for GME
Rossoni et al. From customer requirements to detailed design: How do product data change?
Schmidt et al. Management of UML clusters
Streekmann Model-driven software development

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant