1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
5 * Do not make changes to this file unless you know what you are doing--modify
6 * the SWIG interface file instead.
7 * ----------------------------------------------------------------------------- */
9 package org.simgrid.surf;
12 * A component (e.g., Cpu, Network, Storage, ...) is composed of three classes:
14 * <li> Model: It handle the interactions between resoucses and actions</li>
15 * <li> Resource: A resource used by the model (e.g., a cpu, a network link)</li>
16 * <li> Action: An action generated by the resources (e.g., execution, communication)</li>
22 private long swigCPtr;
23 protected boolean swigCMemOwn;
25 protected Model(long cPtr, boolean cMemoryOwn) {
26 swigCMemOwn = cMemoryOwn;
30 protected static long getCPtr(Model obj) {
31 return (obj == null) ? 0 : obj.swigCPtr;
34 protected void finalize() {
38 public synchronized void delete() {
42 SurfJNI.delete_Model(swigCPtr);
50 * @return The name of the model
52 public String getName() {
53 return SurfJNI.Model_getName(swigCPtr, this);
58 * Share the resources between the actions
59 * @param now the current time
60 * @return the date of the next action of the model will finish
62 public double shareResources(double now) {
63 return SurfJNI.Model_shareResources(swigCPtr, this, now);
66 public double shareResourcesLazy(double now) {
67 return SurfJNI.Model_shareResourcesLazy(swigCPtr, this, now);
70 public double shareResourcesFull(double now) {
71 return SurfJNI.Model_shareResourcesFull(swigCPtr, this, now);
76 * Update time of actions and eventually their states
77 * @param now the new current time
78 * @param delta the delta between previous and new current time
80 public void updateActionsState(double now, double delta) {
81 SurfJNI.Model_updateActionsState(swigCPtr, this, now, delta);
84 public void updateActionsStateLazy(double now, double delta) {
85 SurfJNI.Model_updateActionsStateLazy(swigCPtr, this, now, delta);
88 public void updateActionsStateFull(double now, double delta) {
89 SurfJNI.Model_updateActionsStateFull(swigCPtr, this, now, delta);
94 * Get the List of running Actions
96 public ActionList getRunningActionSet() {
97 long cPtr = SurfJNI.Model_getRunningActionSet(swigCPtr, this);
98 return (cPtr == 0) ? null : new ActionList(cPtr, false);
101 public void addTraces() {
102 SurfJNI.Model_addTraces(swigCPtr, this);